Fossil SCM
Added -- support to (3-way-merge, open, sqlar, stash save|snapshot, tarball, touch, undo/redo, update, zip).
Commit
52ae3288abed44167db30773fa7d8aa47c2903215dff71457f0d5522a9940ef8
Parent
639b2c183e216c2…
9 files changed
+5
-2
+4
-2
+5
-3
+4
-2
+10
-5
+5
-2
+5
-3
+9
-4
+9
-3
M
src/db.c
+5
-2
| --- src/db.c | ||
| +++ src/db.c | ||
| @@ -2904,11 +2904,11 @@ | ||
| 2904 | 2904 | } |
| 2905 | 2905 | |
| 2906 | 2906 | /* |
| 2907 | 2907 | ** COMMAND: open |
| 2908 | 2908 | ** |
| 2909 | -** Usage: %fossil open FILENAME ?VERSION? ?OPTIONS? | |
| 2909 | +** Usage: %fossil open ?OPTIONS? ?--? FILENAME ?VERSION? | |
| 2910 | 2910 | ** |
| 2911 | 2911 | ** Open a connection to the local repository in FILENAME. A checkout |
| 2912 | 2912 | ** for the repository is created with its root at the working directory. |
| 2913 | 2913 | ** If VERSION is specified then that version is checked out. Otherwise |
| 2914 | 2914 | ** the latest version is checked out. No files other than "manifest" |
| @@ -2922,10 +2922,13 @@ | ||
| 2922 | 2922 | ** --nested Allow opening a repository inside an opened checkout |
| 2923 | 2923 | ** --force-missing Force opening a repository with missing content |
| 2924 | 2924 | ** --setmtime Set timestamps of all files to match their SCM-side |
| 2925 | 2925 | ** times (the timestamp of the last checkin which modified |
| 2926 | 2926 | ** them). |
| 2927 | +** -- Treat all following arguments as files, even if they | |
| 2928 | +** look like flags. Use before the FILENAME or VERSION, | |
| 2929 | +** but not both. | |
| 2927 | 2930 | ** |
| 2928 | 2931 | ** See also: close |
| 2929 | 2932 | */ |
| 2930 | 2933 | void cmd_open(void){ |
| 2931 | 2934 | int emptyFlag; |
| @@ -2942,11 +2945,11 @@ | ||
| 2942 | 2945 | forceMissingFlag = find_option("force-missing",0,0)!=0; |
| 2943 | 2946 | allowNested = find_option("nested",0,0)!=0; |
| 2944 | 2947 | setmtimeFlag = find_option("setmtime",0,0)!=0; |
| 2945 | 2948 | |
| 2946 | 2949 | /* We should be done with options.. */ |
| 2947 | - verify_all_options(); | |
| 2950 | + verify_all_options2(); | |
| 2948 | 2951 | |
| 2949 | 2952 | if( g.argc!=3 && g.argc!=4 ){ |
| 2950 | 2953 | usage("REPOSITORY-FILENAME ?VERSION?"); |
| 2951 | 2954 | } |
| 2952 | 2955 | if( !allowNested && db_open_local(0) ){ |
| 2953 | 2956 |
| --- src/db.c | |
| +++ src/db.c | |
| @@ -2904,11 +2904,11 @@ | |
| 2904 | } |
| 2905 | |
| 2906 | /* |
| 2907 | ** COMMAND: open |
| 2908 | ** |
| 2909 | ** Usage: %fossil open FILENAME ?VERSION? ?OPTIONS? |
| 2910 | ** |
| 2911 | ** Open a connection to the local repository in FILENAME. A checkout |
| 2912 | ** for the repository is created with its root at the working directory. |
| 2913 | ** If VERSION is specified then that version is checked out. Otherwise |
| 2914 | ** the latest version is checked out. No files other than "manifest" |
| @@ -2922,10 +2922,13 @@ | |
| 2922 | ** --nested Allow opening a repository inside an opened checkout |
| 2923 | ** --force-missing Force opening a repository with missing content |
| 2924 | ** --setmtime Set timestamps of all files to match their SCM-side |
| 2925 | ** times (the timestamp of the last checkin which modified |
| 2926 | ** them). |
| 2927 | ** |
| 2928 | ** See also: close |
| 2929 | */ |
| 2930 | void cmd_open(void){ |
| 2931 | int emptyFlag; |
| @@ -2942,11 +2945,11 @@ | |
| 2942 | forceMissingFlag = find_option("force-missing",0,0)!=0; |
| 2943 | allowNested = find_option("nested",0,0)!=0; |
| 2944 | setmtimeFlag = find_option("setmtime",0,0)!=0; |
| 2945 | |
| 2946 | /* We should be done with options.. */ |
| 2947 | verify_all_options(); |
| 2948 | |
| 2949 | if( g.argc!=3 && g.argc!=4 ){ |
| 2950 | usage("REPOSITORY-FILENAME ?VERSION?"); |
| 2951 | } |
| 2952 | if( !allowNested && db_open_local(0) ){ |
| 2953 |
| --- src/db.c | |
| +++ src/db.c | |
| @@ -2904,11 +2904,11 @@ | |
| 2904 | } |
| 2905 | |
| 2906 | /* |
| 2907 | ** COMMAND: open |
| 2908 | ** |
| 2909 | ** Usage: %fossil open ?OPTIONS? ?--? FILENAME ?VERSION? |
| 2910 | ** |
| 2911 | ** Open a connection to the local repository in FILENAME. A checkout |
| 2912 | ** for the repository is created with its root at the working directory. |
| 2913 | ** If VERSION is specified then that version is checked out. Otherwise |
| 2914 | ** the latest version is checked out. No files other than "manifest" |
| @@ -2922,10 +2922,13 @@ | |
| 2922 | ** --nested Allow opening a repository inside an opened checkout |
| 2923 | ** --force-missing Force opening a repository with missing content |
| 2924 | ** --setmtime Set timestamps of all files to match their SCM-side |
| 2925 | ** times (the timestamp of the last checkin which modified |
| 2926 | ** them). |
| 2927 | ** -- Treat all following arguments as files, even if they |
| 2928 | ** look like flags. Use before the FILENAME or VERSION, |
| 2929 | ** but not both. |
| 2930 | ** |
| 2931 | ** See also: close |
| 2932 | */ |
| 2933 | void cmd_open(void){ |
| 2934 | int emptyFlag; |
| @@ -2942,11 +2945,11 @@ | |
| 2945 | forceMissingFlag = find_option("force-missing",0,0)!=0; |
| 2946 | allowNested = find_option("nested",0,0)!=0; |
| 2947 | setmtimeFlag = find_option("setmtime",0,0)!=0; |
| 2948 | |
| 2949 | /* We should be done with options.. */ |
| 2950 | verify_all_options2(); |
| 2951 | |
| 2952 | if( g.argc!=3 && g.argc!=4 ){ |
| 2953 | usage("REPOSITORY-FILENAME ?VERSION?"); |
| 2954 | } |
| 2955 | if( !allowNested && db_open_local(0) ){ |
| 2956 |
+4
-2
| --- src/file.c | ||
| +++ src/file.c | ||
| @@ -1999,11 +1999,11 @@ | ||
| 1999 | 1999 | } |
| 2000 | 2000 | |
| 2001 | 2001 | /* |
| 2002 | 2002 | ** COMMAND: touch* |
| 2003 | 2003 | ** |
| 2004 | -** Usage: %fossil touch ?OPTIONS? ?FILENAME...? | |
| 2004 | +** Usage: %fossil touch ?OPTIONS? ?--? ?FILENAME...? | |
| 2005 | 2005 | ** |
| 2006 | 2006 | ** For each file in the current checkout matching one of the provided |
| 2007 | 2007 | ** list of glob patterns and/or file names, the file's mtime is |
| 2008 | 2008 | ** updated to a value specified by one of the flags --checkout, |
| 2009 | 2009 | ** --checkin, or --now. |
| @@ -2028,10 +2028,12 @@ | ||
| 2028 | 2028 | ** and each file it touches. |
| 2029 | 2029 | ** -n|--dry-run Outputs which files would require touching, |
| 2030 | 2030 | ** but does not touch them. |
| 2031 | 2031 | ** -q|--quiet Suppress warnings, e.g. when skipping unmanaged |
| 2032 | 2032 | ** or out-of-tree files. |
| 2033 | +** -- Treat all following arguments as non-flags, even if | |
| 2034 | +** they look like flags. | |
| 2033 | 2035 | ** |
| 2034 | 2036 | ** Only one of --now, --checkin, and --checkout may be used. The |
| 2035 | 2037 | ** default is --now. |
| 2036 | 2038 | ** |
| 2037 | 2039 | ** Only one of -g or -G may be used. If neither is provided and no |
| @@ -2100,11 +2102,11 @@ | ||
| 2100 | 2102 | fossil_print("Timestamp = current system time.\n"); |
| 2101 | 2103 | } |
| 2102 | 2104 | } |
| 2103 | 2105 | } |
| 2104 | 2106 | |
| 2105 | - verify_all_options(); | |
| 2107 | + verify_all_options2(); | |
| 2106 | 2108 | |
| 2107 | 2109 | db_must_be_within_tree(); |
| 2108 | 2110 | vid = db_lget_int("checkout", 0); |
| 2109 | 2111 | if(vid==0){ |
| 2110 | 2112 | fossil_fatal("Cannot determine checkout version."); |
| 2111 | 2113 |
| --- src/file.c | |
| +++ src/file.c | |
| @@ -1999,11 +1999,11 @@ | |
| 1999 | } |
| 2000 | |
| 2001 | /* |
| 2002 | ** COMMAND: touch* |
| 2003 | ** |
| 2004 | ** Usage: %fossil touch ?OPTIONS? ?FILENAME...? |
| 2005 | ** |
| 2006 | ** For each file in the current checkout matching one of the provided |
| 2007 | ** list of glob patterns and/or file names, the file's mtime is |
| 2008 | ** updated to a value specified by one of the flags --checkout, |
| 2009 | ** --checkin, or --now. |
| @@ -2028,10 +2028,12 @@ | |
| 2028 | ** and each file it touches. |
| 2029 | ** -n|--dry-run Outputs which files would require touching, |
| 2030 | ** but does not touch them. |
| 2031 | ** -q|--quiet Suppress warnings, e.g. when skipping unmanaged |
| 2032 | ** or out-of-tree files. |
| 2033 | ** |
| 2034 | ** Only one of --now, --checkin, and --checkout may be used. The |
| 2035 | ** default is --now. |
| 2036 | ** |
| 2037 | ** Only one of -g or -G may be used. If neither is provided and no |
| @@ -2100,11 +2102,11 @@ | |
| 2100 | fossil_print("Timestamp = current system time.\n"); |
| 2101 | } |
| 2102 | } |
| 2103 | } |
| 2104 | |
| 2105 | verify_all_options(); |
| 2106 | |
| 2107 | db_must_be_within_tree(); |
| 2108 | vid = db_lget_int("checkout", 0); |
| 2109 | if(vid==0){ |
| 2110 | fossil_fatal("Cannot determine checkout version."); |
| 2111 |
| --- src/file.c | |
| +++ src/file.c | |
| @@ -1999,11 +1999,11 @@ | |
| 1999 | } |
| 2000 | |
| 2001 | /* |
| 2002 | ** COMMAND: touch* |
| 2003 | ** |
| 2004 | ** Usage: %fossil touch ?OPTIONS? ?--? ?FILENAME...? |
| 2005 | ** |
| 2006 | ** For each file in the current checkout matching one of the provided |
| 2007 | ** list of glob patterns and/or file names, the file's mtime is |
| 2008 | ** updated to a value specified by one of the flags --checkout, |
| 2009 | ** --checkin, or --now. |
| @@ -2028,10 +2028,12 @@ | |
| 2028 | ** and each file it touches. |
| 2029 | ** -n|--dry-run Outputs which files would require touching, |
| 2030 | ** but does not touch them. |
| 2031 | ** -q|--quiet Suppress warnings, e.g. when skipping unmanaged |
| 2032 | ** or out-of-tree files. |
| 2033 | ** -- Treat all following arguments as non-flags, even if |
| 2034 | ** they look like flags. |
| 2035 | ** |
| 2036 | ** Only one of --now, --checkin, and --checkout may be used. The |
| 2037 | ** default is --now. |
| 2038 | ** |
| 2039 | ** Only one of -g or -G may be used. If neither is provided and no |
| @@ -2100,11 +2102,11 @@ | |
| 2102 | fossil_print("Timestamp = current system time.\n"); |
| 2103 | } |
| 2104 | } |
| 2105 | } |
| 2106 | |
| 2107 | verify_all_options2(); |
| 2108 | |
| 2109 | db_must_be_within_tree(); |
| 2110 | vid = db_lget_int("checkout", 0); |
| 2111 | if(vid==0){ |
| 2112 | fossil_fatal("Cannot determine checkout version."); |
| 2113 |
+5
-3
| --- src/merge3.c | ||
| +++ src/merge3.c | ||
| @@ -342,18 +342,20 @@ | ||
| 342 | 342 | } |
| 343 | 343 | |
| 344 | 344 | /* |
| 345 | 345 | ** COMMAND: 3-way-merge* |
| 346 | 346 | ** |
| 347 | -** Usage: %fossil 3-way-merge BASELINE V1 V2 MERGED | |
| 347 | +** Usage: %fossil 3-way-merge ?--? BASELINE V1 V2 MERGED | |
| 348 | 348 | ** |
| 349 | 349 | ** Inputs are files BASELINE, V1, and V2. The file MERGED is generated |
| 350 | 350 | ** as output. |
| 351 | 351 | ** |
| 352 | 352 | ** BASELINE is a common ancestor of two files V1 and V2 that have diverging |
| 353 | 353 | ** edits. The generated output file MERGED is the combination of all |
| 354 | -** changes in both V1 and V2. | |
| 354 | +** changes in both V1 and V2. The -- flag may be used one time, anywhere | |
| 355 | +** in the argument list, to mean that all following arguments should be | |
| 356 | +** treated as filenames even if they look like flags. | |
| 355 | 357 | ** |
| 356 | 358 | ** This command has no effect on the Fossil repository. It is a utility |
| 357 | 359 | ** command made available for the convenience of users. This command can |
| 358 | 360 | ** be used, for example, to help import changes from an upstream project. |
| 359 | 361 | ** |
| @@ -371,11 +373,11 @@ | ||
| 371 | 373 | void delta_3waymerge_cmd(void){ |
| 372 | 374 | Blob pivot, v1, v2, merged; |
| 373 | 375 | int nConflict; |
| 374 | 376 | |
| 375 | 377 | /* We should be done with options.. */ |
| 376 | - verify_all_options(); | |
| 378 | + verify_all_options2(); | |
| 377 | 379 | |
| 378 | 380 | if( g.argc!=6 ){ |
| 379 | 381 | usage("PIVOT V1 V2 MERGED"); |
| 380 | 382 | } |
| 381 | 383 | if( blob_read_from_file(&pivot, g.argv[2], ExtFILE)<0 ){ |
| 382 | 384 |
| --- src/merge3.c | |
| +++ src/merge3.c | |
| @@ -342,18 +342,20 @@ | |
| 342 | } |
| 343 | |
| 344 | /* |
| 345 | ** COMMAND: 3-way-merge* |
| 346 | ** |
| 347 | ** Usage: %fossil 3-way-merge BASELINE V1 V2 MERGED |
| 348 | ** |
| 349 | ** Inputs are files BASELINE, V1, and V2. The file MERGED is generated |
| 350 | ** as output. |
| 351 | ** |
| 352 | ** BASELINE is a common ancestor of two files V1 and V2 that have diverging |
| 353 | ** edits. The generated output file MERGED is the combination of all |
| 354 | ** changes in both V1 and V2. |
| 355 | ** |
| 356 | ** This command has no effect on the Fossil repository. It is a utility |
| 357 | ** command made available for the convenience of users. This command can |
| 358 | ** be used, for example, to help import changes from an upstream project. |
| 359 | ** |
| @@ -371,11 +373,11 @@ | |
| 371 | void delta_3waymerge_cmd(void){ |
| 372 | Blob pivot, v1, v2, merged; |
| 373 | int nConflict; |
| 374 | |
| 375 | /* We should be done with options.. */ |
| 376 | verify_all_options(); |
| 377 | |
| 378 | if( g.argc!=6 ){ |
| 379 | usage("PIVOT V1 V2 MERGED"); |
| 380 | } |
| 381 | if( blob_read_from_file(&pivot, g.argv[2], ExtFILE)<0 ){ |
| 382 |
| --- src/merge3.c | |
| +++ src/merge3.c | |
| @@ -342,18 +342,20 @@ | |
| 342 | } |
| 343 | |
| 344 | /* |
| 345 | ** COMMAND: 3-way-merge* |
| 346 | ** |
| 347 | ** Usage: %fossil 3-way-merge ?--? BASELINE V1 V2 MERGED |
| 348 | ** |
| 349 | ** Inputs are files BASELINE, V1, and V2. The file MERGED is generated |
| 350 | ** as output. |
| 351 | ** |
| 352 | ** BASELINE is a common ancestor of two files V1 and V2 that have diverging |
| 353 | ** edits. The generated output file MERGED is the combination of all |
| 354 | ** changes in both V1 and V2. The -- flag may be used one time, anywhere |
| 355 | ** in the argument list, to mean that all following arguments should be |
| 356 | ** treated as filenames even if they look like flags. |
| 357 | ** |
| 358 | ** This command has no effect on the Fossil repository. It is a utility |
| 359 | ** command made available for the convenience of users. This command can |
| 360 | ** be used, for example, to help import changes from an upstream project. |
| 361 | ** |
| @@ -371,11 +373,11 @@ | |
| 373 | void delta_3waymerge_cmd(void){ |
| 374 | Blob pivot, v1, v2, merged; |
| 375 | int nConflict; |
| 376 | |
| 377 | /* We should be done with options.. */ |
| 378 | verify_all_options2(); |
| 379 | |
| 380 | if( g.argc!=6 ){ |
| 381 | usage("PIVOT V1 V2 MERGED"); |
| 382 | } |
| 383 | if( blob_read_from_file(&pivot, g.argv[2], ExtFILE)<0 ){ |
| 384 |
+4
-2
| --- src/name.c | ||
| +++ src/name.c | ||
| @@ -790,11 +790,11 @@ | ||
| 790 | 790 | } |
| 791 | 791 | |
| 792 | 792 | /* |
| 793 | 793 | ** COMMAND: whatis* |
| 794 | 794 | ** |
| 795 | -** Usage: %fossil whatis NAME | |
| 795 | +** Usage: %fossil whatis ?--? NAME | |
| 796 | 796 | ** |
| 797 | 797 | ** Resolve the symbol NAME into its canonical artifact hash |
| 798 | 798 | ** artifact name and provide a description of what role that artifact |
| 799 | 799 | ** plays. |
| 800 | 800 | ** |
| @@ -801,10 +801,12 @@ | ||
| 801 | 801 | ** Options: |
| 802 | 802 | ** |
| 803 | 803 | ** --type TYPE Only find artifacts of TYPE (one of: 'ci', 't', |
| 804 | 804 | ** 'w', 'g', or 'e'). |
| 805 | 805 | ** -v|--verbose Provide extra information (such as the RID) |
| 806 | +** -- Treat all following arguments as non-flags, even if | |
| 807 | +** they look like flags. | |
| 806 | 808 | */ |
| 807 | 809 | void whatis_cmd(void){ |
| 808 | 810 | int rid; |
| 809 | 811 | const char *zName; |
| 810 | 812 | int verboseFlag; |
| @@ -813,11 +815,11 @@ | ||
| 813 | 815 | db_find_and_open_repository(0,0); |
| 814 | 816 | verboseFlag = find_option("verbose","v",0)!=0; |
| 815 | 817 | zType = find_option("type",0,1); |
| 816 | 818 | |
| 817 | 819 | /* We should be done with options.. */ |
| 818 | - verify_all_options(); | |
| 820 | + verify_all_options2(); | |
| 819 | 821 | |
| 820 | 822 | if( g.argc<3 ) usage("NAME ..."); |
| 821 | 823 | for(i=2; i<g.argc; i++){ |
| 822 | 824 | zName = g.argv[i]; |
| 823 | 825 | if( i>2 ) fossil_print("%.79c\n",'-'); |
| 824 | 826 |
| --- src/name.c | |
| +++ src/name.c | |
| @@ -790,11 +790,11 @@ | |
| 790 | } |
| 791 | |
| 792 | /* |
| 793 | ** COMMAND: whatis* |
| 794 | ** |
| 795 | ** Usage: %fossil whatis NAME |
| 796 | ** |
| 797 | ** Resolve the symbol NAME into its canonical artifact hash |
| 798 | ** artifact name and provide a description of what role that artifact |
| 799 | ** plays. |
| 800 | ** |
| @@ -801,10 +801,12 @@ | |
| 801 | ** Options: |
| 802 | ** |
| 803 | ** --type TYPE Only find artifacts of TYPE (one of: 'ci', 't', |
| 804 | ** 'w', 'g', or 'e'). |
| 805 | ** -v|--verbose Provide extra information (such as the RID) |
| 806 | */ |
| 807 | void whatis_cmd(void){ |
| 808 | int rid; |
| 809 | const char *zName; |
| 810 | int verboseFlag; |
| @@ -813,11 +815,11 @@ | |
| 813 | db_find_and_open_repository(0,0); |
| 814 | verboseFlag = find_option("verbose","v",0)!=0; |
| 815 | zType = find_option("type",0,1); |
| 816 | |
| 817 | /* We should be done with options.. */ |
| 818 | verify_all_options(); |
| 819 | |
| 820 | if( g.argc<3 ) usage("NAME ..."); |
| 821 | for(i=2; i<g.argc; i++){ |
| 822 | zName = g.argv[i]; |
| 823 | if( i>2 ) fossil_print("%.79c\n",'-'); |
| 824 |
| --- src/name.c | |
| +++ src/name.c | |
| @@ -790,11 +790,11 @@ | |
| 790 | } |
| 791 | |
| 792 | /* |
| 793 | ** COMMAND: whatis* |
| 794 | ** |
| 795 | ** Usage: %fossil whatis ?--? NAME |
| 796 | ** |
| 797 | ** Resolve the symbol NAME into its canonical artifact hash |
| 798 | ** artifact name and provide a description of what role that artifact |
| 799 | ** plays. |
| 800 | ** |
| @@ -801,10 +801,12 @@ | |
| 801 | ** Options: |
| 802 | ** |
| 803 | ** --type TYPE Only find artifacts of TYPE (one of: 'ci', 't', |
| 804 | ** 'w', 'g', or 'e'). |
| 805 | ** -v|--verbose Provide extra information (such as the RID) |
| 806 | ** -- Treat all following arguments as non-flags, even if |
| 807 | ** they look like flags. |
| 808 | */ |
| 809 | void whatis_cmd(void){ |
| 810 | int rid; |
| 811 | const char *zName; |
| 812 | int verboseFlag; |
| @@ -813,11 +815,11 @@ | |
| 815 | db_find_and_open_repository(0,0); |
| 816 | verboseFlag = find_option("verbose","v",0)!=0; |
| 817 | zType = find_option("type",0,1); |
| 818 | |
| 819 | /* We should be done with options.. */ |
| 820 | verify_all_options2(); |
| 821 | |
| 822 | if( g.argc<3 ) usage("NAME ..."); |
| 823 | for(i=2; i<g.argc; i++){ |
| 824 | zName = g.argv[i]; |
| 825 | if( i>2 ) fossil_print("%.79c\n",'-'); |
| 826 |
+10
-5
| --- src/stash.c | ||
| +++ src/stash.c | ||
| @@ -259,11 +259,11 @@ | ||
| 259 | 259 | const char *zComment; /* Comment to add to the stash */ |
| 260 | 260 | int stashid; /* ID of the new stash */ |
| 261 | 261 | int vid; /* Current checkout */ |
| 262 | 262 | |
| 263 | 263 | zComment = find_option("comment", "m", 1); |
| 264 | - verify_all_options(); | |
| 264 | + verify_all_options2(); | |
| 265 | 265 | if( zComment==0 ){ |
| 266 | 266 | Blob prompt; /* Prompt for stash comment */ |
| 267 | 267 | Blob comment; /* User comment reply */ |
| 268 | 268 | #if defined(_WIN32) || defined(__CYGWIN__) |
| 269 | 269 | int bomSize; |
| @@ -511,12 +511,12 @@ | ||
| 511 | 511 | ** COMMAND: stash |
| 512 | 512 | ** |
| 513 | 513 | ** Usage: %fossil stash SUBCOMMAND ARGS... |
| 514 | 514 | ** |
| 515 | 515 | ** fossil stash |
| 516 | -** fossil stash save ?-m|--comment COMMENT? ?FILES...? | |
| 517 | -** fossil stash snapshot ?-m|--comment COMMENT? ?FILES...? | |
| 516 | +** fossil stash save ?-m|--comment COMMENT? ?--? ?FILES...? | |
| 517 | +** fossil stash snapshot ?-m|--comment COMMENT? ?--? ?FILES...? | |
| 518 | 518 | ** |
| 519 | 519 | ** Save the current changes in the working tree as a new stash. |
| 520 | 520 | ** Then revert the changes back to the last check-in. If FILES |
| 521 | 521 | ** are listed, then only stash and revert the named files. The |
| 522 | 522 | ** "save" verb can be omitted if and only if there are no other |
| @@ -562,20 +562,25 @@ | ||
| 562 | 562 | ** directory would be if STASHID were applied. With gdiff, |
| 563 | 563 | ** gdiff-command is used instead of internal diff logic. |
| 564 | 564 | ** |
| 565 | 565 | ** SUMMARY: |
| 566 | 566 | ** fossil stash |
| 567 | -** fossil stash save ?-m|--comment COMMENT? ?FILES...? | |
| 568 | -** fossil stash snapshot ?-m|--comment COMMENT? ?FILES...? | |
| 567 | +** fossil stash save ?-m|--comment COMMENT? ?--? ?FILES...? | |
| 568 | +** fossil stash snapshot ?-m|--comment COMMENT? ?--? ?FILES...? | |
| 569 | 569 | ** fossil stash list|ls ?-v|--verbose? ?-W|--width <num>? |
| 570 | 570 | ** fossil stash show|cat ?STASHID? ?DIFF-OPTIONS? |
| 571 | 571 | ** fossil stash gshow|gcat ?STASHID? ?DIFF-OPTIONS? |
| 572 | 572 | ** fossil stash pop |
| 573 | 573 | ** fossil stash apply|goto ?STASHID? |
| 574 | 574 | ** fossil stash drop|rm ?STASHID? ?-a|--all? |
| 575 | 575 | ** fossil stash diff ?STASHID? ?DIFF-OPTIONS? |
| 576 | 576 | ** fossil stash gdiff ?STASHID? ?DIFF-OPTIONS? |
| 577 | +** | |
| 578 | +** Options: | |
| 579 | +** -- For commands which support it, treat all following | |
| 580 | +** arguments as non-flags, even if they look like flags. | |
| 581 | +** | |
| 577 | 582 | */ |
| 578 | 583 | void stash_cmd(void){ |
| 579 | 584 | const char *zCmd; |
| 580 | 585 | int nCmd; |
| 581 | 586 | int stashid = 0; |
| 582 | 587 |
| --- src/stash.c | |
| +++ src/stash.c | |
| @@ -259,11 +259,11 @@ | |
| 259 | const char *zComment; /* Comment to add to the stash */ |
| 260 | int stashid; /* ID of the new stash */ |
| 261 | int vid; /* Current checkout */ |
| 262 | |
| 263 | zComment = find_option("comment", "m", 1); |
| 264 | verify_all_options(); |
| 265 | if( zComment==0 ){ |
| 266 | Blob prompt; /* Prompt for stash comment */ |
| 267 | Blob comment; /* User comment reply */ |
| 268 | #if defined(_WIN32) || defined(__CYGWIN__) |
| 269 | int bomSize; |
| @@ -511,12 +511,12 @@ | |
| 511 | ** COMMAND: stash |
| 512 | ** |
| 513 | ** Usage: %fossil stash SUBCOMMAND ARGS... |
| 514 | ** |
| 515 | ** fossil stash |
| 516 | ** fossil stash save ?-m|--comment COMMENT? ?FILES...? |
| 517 | ** fossil stash snapshot ?-m|--comment COMMENT? ?FILES...? |
| 518 | ** |
| 519 | ** Save the current changes in the working tree as a new stash. |
| 520 | ** Then revert the changes back to the last check-in. If FILES |
| 521 | ** are listed, then only stash and revert the named files. The |
| 522 | ** "save" verb can be omitted if and only if there are no other |
| @@ -562,20 +562,25 @@ | |
| 562 | ** directory would be if STASHID were applied. With gdiff, |
| 563 | ** gdiff-command is used instead of internal diff logic. |
| 564 | ** |
| 565 | ** SUMMARY: |
| 566 | ** fossil stash |
| 567 | ** fossil stash save ?-m|--comment COMMENT? ?FILES...? |
| 568 | ** fossil stash snapshot ?-m|--comment COMMENT? ?FILES...? |
| 569 | ** fossil stash list|ls ?-v|--verbose? ?-W|--width <num>? |
| 570 | ** fossil stash show|cat ?STASHID? ?DIFF-OPTIONS? |
| 571 | ** fossil stash gshow|gcat ?STASHID? ?DIFF-OPTIONS? |
| 572 | ** fossil stash pop |
| 573 | ** fossil stash apply|goto ?STASHID? |
| 574 | ** fossil stash drop|rm ?STASHID? ?-a|--all? |
| 575 | ** fossil stash diff ?STASHID? ?DIFF-OPTIONS? |
| 576 | ** fossil stash gdiff ?STASHID? ?DIFF-OPTIONS? |
| 577 | */ |
| 578 | void stash_cmd(void){ |
| 579 | const char *zCmd; |
| 580 | int nCmd; |
| 581 | int stashid = 0; |
| 582 |
| --- src/stash.c | |
| +++ src/stash.c | |
| @@ -259,11 +259,11 @@ | |
| 259 | const char *zComment; /* Comment to add to the stash */ |
| 260 | int stashid; /* ID of the new stash */ |
| 261 | int vid; /* Current checkout */ |
| 262 | |
| 263 | zComment = find_option("comment", "m", 1); |
| 264 | verify_all_options2(); |
| 265 | if( zComment==0 ){ |
| 266 | Blob prompt; /* Prompt for stash comment */ |
| 267 | Blob comment; /* User comment reply */ |
| 268 | #if defined(_WIN32) || defined(__CYGWIN__) |
| 269 | int bomSize; |
| @@ -511,12 +511,12 @@ | |
| 511 | ** COMMAND: stash |
| 512 | ** |
| 513 | ** Usage: %fossil stash SUBCOMMAND ARGS... |
| 514 | ** |
| 515 | ** fossil stash |
| 516 | ** fossil stash save ?-m|--comment COMMENT? ?--? ?FILES...? |
| 517 | ** fossil stash snapshot ?-m|--comment COMMENT? ?--? ?FILES...? |
| 518 | ** |
| 519 | ** Save the current changes in the working tree as a new stash. |
| 520 | ** Then revert the changes back to the last check-in. If FILES |
| 521 | ** are listed, then only stash and revert the named files. The |
| 522 | ** "save" verb can be omitted if and only if there are no other |
| @@ -562,20 +562,25 @@ | |
| 562 | ** directory would be if STASHID were applied. With gdiff, |
| 563 | ** gdiff-command is used instead of internal diff logic. |
| 564 | ** |
| 565 | ** SUMMARY: |
| 566 | ** fossil stash |
| 567 | ** fossil stash save ?-m|--comment COMMENT? ?--? ?FILES...? |
| 568 | ** fossil stash snapshot ?-m|--comment COMMENT? ?--? ?FILES...? |
| 569 | ** fossil stash list|ls ?-v|--verbose? ?-W|--width <num>? |
| 570 | ** fossil stash show|cat ?STASHID? ?DIFF-OPTIONS? |
| 571 | ** fossil stash gshow|gcat ?STASHID? ?DIFF-OPTIONS? |
| 572 | ** fossil stash pop |
| 573 | ** fossil stash apply|goto ?STASHID? |
| 574 | ** fossil stash drop|rm ?STASHID? ?-a|--all? |
| 575 | ** fossil stash diff ?STASHID? ?DIFF-OPTIONS? |
| 576 | ** fossil stash gdiff ?STASHID? ?DIFF-OPTIONS? |
| 577 | ** |
| 578 | ** Options: |
| 579 | ** -- For commands which support it, treat all following |
| 580 | ** arguments as non-flags, even if they look like flags. |
| 581 | ** |
| 582 | */ |
| 583 | void stash_cmd(void){ |
| 584 | const char *zCmd; |
| 585 | int nCmd; |
| 586 | int stashid = 0; |
| 587 |
+5
-2
| --- src/tar.c | ||
| +++ src/tar.c | ||
| @@ -582,11 +582,11 @@ | ||
| 582 | 582 | } |
| 583 | 583 | |
| 584 | 584 | /* |
| 585 | 585 | ** COMMAND: tarball* |
| 586 | 586 | ** |
| 587 | -** Usage: %fossil tarball VERSION OUTPUTFILE [OPTIONS] | |
| 587 | +** Usage: %fossil tarball ?OPTIONS? VERSION ?--? OUTPUTFILE | |
| 588 | 588 | ** |
| 589 | 589 | ** Generate a compressed tarball for a specified version. If the --name |
| 590 | 590 | ** option is used, its argument becomes the name of the top-level directory |
| 591 | 591 | ** in the resulting tarball. If --name is omitted, the top-level directory |
| 592 | 592 | ** name is derived from the project name, the check-in date and time, and |
| @@ -600,10 +600,13 @@ | ||
| 600 | 600 | ** Options: |
| 601 | 601 | ** -X|--exclude GLOBLIST Comma-separated list of GLOBs of files to exclude |
| 602 | 602 | ** --include GLOBLIST Comma-separated list of GLOBs of files to include |
| 603 | 603 | ** --name DIRECTORYNAME The name of the top-level directory in the archive |
| 604 | 604 | ** -R REPOSITORY Specify a Fossil repository |
| 605 | +** -- Treat all following arguments as non-flags, even if | |
| 606 | +** they look like flags. Use before the VERSION or | |
| 607 | +** OUTPUTFILE, but not both. | |
| 605 | 608 | */ |
| 606 | 609 | void tarball_cmd(void){ |
| 607 | 610 | int rid; |
| 608 | 611 | Blob tarball; |
| 609 | 612 | const char *zName; |
| @@ -617,11 +620,11 @@ | ||
| 617 | 620 | zInclude = find_option("include", 0, 1); |
| 618 | 621 | if( zInclude ) pInclude = glob_create(zInclude); |
| 619 | 622 | db_find_and_open_repository(0, 0); |
| 620 | 623 | |
| 621 | 624 | /* We should be done with options.. */ |
| 622 | - verify_all_options(); | |
| 625 | + verify_all_options2(); | |
| 623 | 626 | |
| 624 | 627 | if( g.argc!=4 ){ |
| 625 | 628 | usage("VERSION OUTPUTFILE"); |
| 626 | 629 | } |
| 627 | 630 | g.zOpenRevision = g.argv[2]; |
| 628 | 631 |
| --- src/tar.c | |
| +++ src/tar.c | |
| @@ -582,11 +582,11 @@ | |
| 582 | } |
| 583 | |
| 584 | /* |
| 585 | ** COMMAND: tarball* |
| 586 | ** |
| 587 | ** Usage: %fossil tarball VERSION OUTPUTFILE [OPTIONS] |
| 588 | ** |
| 589 | ** Generate a compressed tarball for a specified version. If the --name |
| 590 | ** option is used, its argument becomes the name of the top-level directory |
| 591 | ** in the resulting tarball. If --name is omitted, the top-level directory |
| 592 | ** name is derived from the project name, the check-in date and time, and |
| @@ -600,10 +600,13 @@ | |
| 600 | ** Options: |
| 601 | ** -X|--exclude GLOBLIST Comma-separated list of GLOBs of files to exclude |
| 602 | ** --include GLOBLIST Comma-separated list of GLOBs of files to include |
| 603 | ** --name DIRECTORYNAME The name of the top-level directory in the archive |
| 604 | ** -R REPOSITORY Specify a Fossil repository |
| 605 | */ |
| 606 | void tarball_cmd(void){ |
| 607 | int rid; |
| 608 | Blob tarball; |
| 609 | const char *zName; |
| @@ -617,11 +620,11 @@ | |
| 617 | zInclude = find_option("include", 0, 1); |
| 618 | if( zInclude ) pInclude = glob_create(zInclude); |
| 619 | db_find_and_open_repository(0, 0); |
| 620 | |
| 621 | /* We should be done with options.. */ |
| 622 | verify_all_options(); |
| 623 | |
| 624 | if( g.argc!=4 ){ |
| 625 | usage("VERSION OUTPUTFILE"); |
| 626 | } |
| 627 | g.zOpenRevision = g.argv[2]; |
| 628 |
| --- src/tar.c | |
| +++ src/tar.c | |
| @@ -582,11 +582,11 @@ | |
| 582 | } |
| 583 | |
| 584 | /* |
| 585 | ** COMMAND: tarball* |
| 586 | ** |
| 587 | ** Usage: %fossil tarball ?OPTIONS? VERSION ?--? OUTPUTFILE |
| 588 | ** |
| 589 | ** Generate a compressed tarball for a specified version. If the --name |
| 590 | ** option is used, its argument becomes the name of the top-level directory |
| 591 | ** in the resulting tarball. If --name is omitted, the top-level directory |
| 592 | ** name is derived from the project name, the check-in date and time, and |
| @@ -600,10 +600,13 @@ | |
| 600 | ** Options: |
| 601 | ** -X|--exclude GLOBLIST Comma-separated list of GLOBs of files to exclude |
| 602 | ** --include GLOBLIST Comma-separated list of GLOBs of files to include |
| 603 | ** --name DIRECTORYNAME The name of the top-level directory in the archive |
| 604 | ** -R REPOSITORY Specify a Fossil repository |
| 605 | ** -- Treat all following arguments as non-flags, even if |
| 606 | ** they look like flags. Use before the VERSION or |
| 607 | ** OUTPUTFILE, but not both. |
| 608 | */ |
| 609 | void tarball_cmd(void){ |
| 610 | int rid; |
| 611 | Blob tarball; |
| 612 | const char *zName; |
| @@ -617,11 +620,11 @@ | |
| 620 | zInclude = find_option("include", 0, 1); |
| 621 | if( zInclude ) pInclude = glob_create(zInclude); |
| 622 | db_find_and_open_repository(0, 0); |
| 623 | |
| 624 | /* We should be done with options.. */ |
| 625 | verify_all_options2(); |
| 626 | |
| 627 | if( g.argc!=4 ){ |
| 628 | usage("VERSION OUTPUTFILE"); |
| 629 | } |
| 630 | g.zOpenRevision = g.argv[2]; |
| 631 |
+5
-3
| --- src/undo.c | ||
| +++ src/undo.c | ||
| @@ -420,12 +420,12 @@ | ||
| 420 | 420 | |
| 421 | 421 | /* |
| 422 | 422 | ** COMMAND: undo |
| 423 | 423 | ** COMMAND: redo* |
| 424 | 424 | ** |
| 425 | -** Usage: %fossil undo ?OPTIONS? ?FILENAME...? | |
| 426 | -** or: %fossil redo ?OPTIONS? ?FILENAME...? | |
| 425 | +** Usage: %fossil undo ?OPTIONS? ?--? ?FILENAME...? | |
| 426 | +** or: %fossil redo ?OPTIONS? ?--? ?FILENAME...? | |
| 427 | 427 | ** |
| 428 | 428 | ** Undo the changes to the working checkout caused by the most recent |
| 429 | 429 | ** of the following operations: |
| 430 | 430 | ** |
| 431 | 431 | ** (1) fossil update (5) fossil stash apply |
| @@ -447,10 +447,12 @@ | ||
| 447 | 447 | ** A single level of undo/redo is supported. The undo/redo stack |
| 448 | 448 | ** is cleared by the commit and checkout commands. |
| 449 | 449 | ** |
| 450 | 450 | ** Options: |
| 451 | 451 | ** -n|--dry-run do not make changes but show what would be done |
| 452 | +** -- Treat all following arguments as non-flags, even if | |
| 453 | +** they look like flags. | |
| 452 | 454 | ** |
| 453 | 455 | ** See also: commit, status |
| 454 | 456 | */ |
| 455 | 457 | void undo_cmd(void){ |
| 456 | 458 | int isRedo = g.argv[1][0]=='r'; |
| @@ -460,11 +462,11 @@ | ||
| 460 | 462 | |
| 461 | 463 | if( !dryRunFlag ){ |
| 462 | 464 | dryRunFlag = find_option("explain", 0, 0)!=0; |
| 463 | 465 | } |
| 464 | 466 | db_must_be_within_tree(); |
| 465 | - verify_all_options(); | |
| 467 | + verify_all_options2(); | |
| 466 | 468 | db_begin_transaction(); |
| 467 | 469 | undo_available = db_lget_int("undo_available", 0); |
| 468 | 470 | if( dryRunFlag ){ |
| 469 | 471 | if( undo_available==0 ){ |
| 470 | 472 | fossil_print("No undo or redo is available\n"); |
| 471 | 473 |
| --- src/undo.c | |
| +++ src/undo.c | |
| @@ -420,12 +420,12 @@ | |
| 420 | |
| 421 | /* |
| 422 | ** COMMAND: undo |
| 423 | ** COMMAND: redo* |
| 424 | ** |
| 425 | ** Usage: %fossil undo ?OPTIONS? ?FILENAME...? |
| 426 | ** or: %fossil redo ?OPTIONS? ?FILENAME...? |
| 427 | ** |
| 428 | ** Undo the changes to the working checkout caused by the most recent |
| 429 | ** of the following operations: |
| 430 | ** |
| 431 | ** (1) fossil update (5) fossil stash apply |
| @@ -447,10 +447,12 @@ | |
| 447 | ** A single level of undo/redo is supported. The undo/redo stack |
| 448 | ** is cleared by the commit and checkout commands. |
| 449 | ** |
| 450 | ** Options: |
| 451 | ** -n|--dry-run do not make changes but show what would be done |
| 452 | ** |
| 453 | ** See also: commit, status |
| 454 | */ |
| 455 | void undo_cmd(void){ |
| 456 | int isRedo = g.argv[1][0]=='r'; |
| @@ -460,11 +462,11 @@ | |
| 460 | |
| 461 | if( !dryRunFlag ){ |
| 462 | dryRunFlag = find_option("explain", 0, 0)!=0; |
| 463 | } |
| 464 | db_must_be_within_tree(); |
| 465 | verify_all_options(); |
| 466 | db_begin_transaction(); |
| 467 | undo_available = db_lget_int("undo_available", 0); |
| 468 | if( dryRunFlag ){ |
| 469 | if( undo_available==0 ){ |
| 470 | fossil_print("No undo or redo is available\n"); |
| 471 |
| --- src/undo.c | |
| +++ src/undo.c | |
| @@ -420,12 +420,12 @@ | |
| 420 | |
| 421 | /* |
| 422 | ** COMMAND: undo |
| 423 | ** COMMAND: redo* |
| 424 | ** |
| 425 | ** Usage: %fossil undo ?OPTIONS? ?--? ?FILENAME...? |
| 426 | ** or: %fossil redo ?OPTIONS? ?--? ?FILENAME...? |
| 427 | ** |
| 428 | ** Undo the changes to the working checkout caused by the most recent |
| 429 | ** of the following operations: |
| 430 | ** |
| 431 | ** (1) fossil update (5) fossil stash apply |
| @@ -447,10 +447,12 @@ | |
| 447 | ** A single level of undo/redo is supported. The undo/redo stack |
| 448 | ** is cleared by the commit and checkout commands. |
| 449 | ** |
| 450 | ** Options: |
| 451 | ** -n|--dry-run do not make changes but show what would be done |
| 452 | ** -- Treat all following arguments as non-flags, even if |
| 453 | ** they look like flags. |
| 454 | ** |
| 455 | ** See also: commit, status |
| 456 | */ |
| 457 | void undo_cmd(void){ |
| 458 | int isRedo = g.argv[1][0]=='r'; |
| @@ -460,11 +462,11 @@ | |
| 462 | |
| 463 | if( !dryRunFlag ){ |
| 464 | dryRunFlag = find_option("explain", 0, 0)!=0; |
| 465 | } |
| 466 | db_must_be_within_tree(); |
| 467 | verify_all_options2(); |
| 468 | db_begin_transaction(); |
| 469 | undo_available = db_lget_int("undo_available", 0); |
| 470 | if( dryRunFlag ){ |
| 471 | if( undo_available==0 ){ |
| 472 | fossil_print("No undo or redo is available\n"); |
| 473 |
+9
-4
| --- src/update.c | ||
| +++ src/update.c | ||
| @@ -60,11 +60,11 @@ | ||
| 60 | 60 | } |
| 61 | 61 | |
| 62 | 62 | /* |
| 63 | 63 | ** COMMAND: update |
| 64 | 64 | ** |
| 65 | -** Usage: %fossil update ?OPTIONS? ?VERSION? ?FILES...? | |
| 65 | +** Usage: %fossil update ?OPTIONS? ?--? ?VERSION? ?FILES...? | |
| 66 | 66 | ** |
| 67 | 67 | ** Change the version of the current checkout to VERSION. Any |
| 68 | 68 | ** uncommitted changes are retained and applied to the new checkout. |
| 69 | 69 | ** |
| 70 | 70 | ** The VERSION argument can be a specific version or tag or branch |
| @@ -102,10 +102,13 @@ | ||
| 102 | 102 | ** -W|--width <num> Width of lines (default is to auto-detect). Must be >20 |
| 103 | 103 | ** or 0 (= no limit, resulting in a single line per entry). |
| 104 | 104 | ** --setmtime Set timestamps of all files to match their SCM-side |
| 105 | 105 | ** times (the timestamp of the last checkin which modified |
| 106 | 106 | ** them). |
| 107 | +** -- Treat all following arguments as non-flags, even if | |
| 108 | +** they look like flags. Use before the VERSION or | |
| 109 | +** FILES..., but not both. | |
| 107 | 110 | ** |
| 108 | 111 | ** See also: revert |
| 109 | 112 | */ |
| 110 | 113 | void update_cmd(void){ |
| 111 | 114 | int vid; /* Current version */ |
| @@ -149,11 +152,11 @@ | ||
| 149 | 152 | forceMissingFlag = find_option("force-missing",0,0)!=0; |
| 150 | 153 | debugFlag = find_option("debug",0,0)!=0; |
| 151 | 154 | setmtimeFlag = find_option("setmtime",0,0)!=0; |
| 152 | 155 | |
| 153 | 156 | /* We should be done with options.. */ |
| 154 | - verify_all_options(); | |
| 157 | + verify_all_options2(); | |
| 155 | 158 | |
| 156 | 159 | db_must_be_within_tree(); |
| 157 | 160 | vid = db_lget_int("checkout", 0); |
| 158 | 161 | user_select(); |
| 159 | 162 | if( !dryRunFlag && !internalUpdate ){ |
| @@ -757,11 +760,11 @@ | ||
| 757 | 760 | } |
| 758 | 761 | |
| 759 | 762 | /* |
| 760 | 763 | ** COMMAND: revert |
| 761 | 764 | ** |
| 762 | -** Usage: %fossil revert ?-r REVISION? ?FILE ...? | |
| 765 | +** Usage: %fossil revert ?-r REVISION? ?--? ?FILE ...? | |
| 763 | 766 | ** |
| 764 | 767 | ** Revert to the current repository version of FILE, or to |
| 765 | 768 | ** the version associated with baseline REVISION if the -r flag |
| 766 | 769 | ** appears. |
| 767 | 770 | ** |
| @@ -773,10 +776,12 @@ | ||
| 773 | 776 | ** If a file is reverted accidentally, it can be restored using |
| 774 | 777 | ** the "fossil undo" command. |
| 775 | 778 | ** |
| 776 | 779 | ** Options: |
| 777 | 780 | ** -r REVISION revert given FILE(s) back to given REVISION |
| 781 | +** -- Treat all following arguments as files, even | |
| 782 | +** if they look like flags. | |
| 778 | 783 | ** |
| 779 | 784 | ** See also: redo, undo, update |
| 780 | 785 | */ |
| 781 | 786 | void revert_cmd(void){ |
| 782 | 787 | Manifest *pCoManifest; /* Manifest of current checkout */ |
| @@ -789,11 +794,11 @@ | ||
| 789 | 794 | int i; |
| 790 | 795 | Stmt q; |
| 791 | 796 | |
| 792 | 797 | undo_capture_command_line(); |
| 793 | 798 | zRevision = find_option("revision", "r", 1); |
| 794 | - verify_all_options(); | |
| 799 | + verify_all_options2(); | |
| 795 | 800 | |
| 796 | 801 | if( g.argc<2 ){ |
| 797 | 802 | usage("?OPTIONS? [FILE] ..."); |
| 798 | 803 | } |
| 799 | 804 | if( zRevision && g.argc<3 ){ |
| 800 | 805 |
| --- src/update.c | |
| +++ src/update.c | |
| @@ -60,11 +60,11 @@ | |
| 60 | } |
| 61 | |
| 62 | /* |
| 63 | ** COMMAND: update |
| 64 | ** |
| 65 | ** Usage: %fossil update ?OPTIONS? ?VERSION? ?FILES...? |
| 66 | ** |
| 67 | ** Change the version of the current checkout to VERSION. Any |
| 68 | ** uncommitted changes are retained and applied to the new checkout. |
| 69 | ** |
| 70 | ** The VERSION argument can be a specific version or tag or branch |
| @@ -102,10 +102,13 @@ | |
| 102 | ** -W|--width <num> Width of lines (default is to auto-detect). Must be >20 |
| 103 | ** or 0 (= no limit, resulting in a single line per entry). |
| 104 | ** --setmtime Set timestamps of all files to match their SCM-side |
| 105 | ** times (the timestamp of the last checkin which modified |
| 106 | ** them). |
| 107 | ** |
| 108 | ** See also: revert |
| 109 | */ |
| 110 | void update_cmd(void){ |
| 111 | int vid; /* Current version */ |
| @@ -149,11 +152,11 @@ | |
| 149 | forceMissingFlag = find_option("force-missing",0,0)!=0; |
| 150 | debugFlag = find_option("debug",0,0)!=0; |
| 151 | setmtimeFlag = find_option("setmtime",0,0)!=0; |
| 152 | |
| 153 | /* We should be done with options.. */ |
| 154 | verify_all_options(); |
| 155 | |
| 156 | db_must_be_within_tree(); |
| 157 | vid = db_lget_int("checkout", 0); |
| 158 | user_select(); |
| 159 | if( !dryRunFlag && !internalUpdate ){ |
| @@ -757,11 +760,11 @@ | |
| 757 | } |
| 758 | |
| 759 | /* |
| 760 | ** COMMAND: revert |
| 761 | ** |
| 762 | ** Usage: %fossil revert ?-r REVISION? ?FILE ...? |
| 763 | ** |
| 764 | ** Revert to the current repository version of FILE, or to |
| 765 | ** the version associated with baseline REVISION if the -r flag |
| 766 | ** appears. |
| 767 | ** |
| @@ -773,10 +776,12 @@ | |
| 773 | ** If a file is reverted accidentally, it can be restored using |
| 774 | ** the "fossil undo" command. |
| 775 | ** |
| 776 | ** Options: |
| 777 | ** -r REVISION revert given FILE(s) back to given REVISION |
| 778 | ** |
| 779 | ** See also: redo, undo, update |
| 780 | */ |
| 781 | void revert_cmd(void){ |
| 782 | Manifest *pCoManifest; /* Manifest of current checkout */ |
| @@ -789,11 +794,11 @@ | |
| 789 | int i; |
| 790 | Stmt q; |
| 791 | |
| 792 | undo_capture_command_line(); |
| 793 | zRevision = find_option("revision", "r", 1); |
| 794 | verify_all_options(); |
| 795 | |
| 796 | if( g.argc<2 ){ |
| 797 | usage("?OPTIONS? [FILE] ..."); |
| 798 | } |
| 799 | if( zRevision && g.argc<3 ){ |
| 800 |
| --- src/update.c | |
| +++ src/update.c | |
| @@ -60,11 +60,11 @@ | |
| 60 | } |
| 61 | |
| 62 | /* |
| 63 | ** COMMAND: update |
| 64 | ** |
| 65 | ** Usage: %fossil update ?OPTIONS? ?--? ?VERSION? ?FILES...? |
| 66 | ** |
| 67 | ** Change the version of the current checkout to VERSION. Any |
| 68 | ** uncommitted changes are retained and applied to the new checkout. |
| 69 | ** |
| 70 | ** The VERSION argument can be a specific version or tag or branch |
| @@ -102,10 +102,13 @@ | |
| 102 | ** -W|--width <num> Width of lines (default is to auto-detect). Must be >20 |
| 103 | ** or 0 (= no limit, resulting in a single line per entry). |
| 104 | ** --setmtime Set timestamps of all files to match their SCM-side |
| 105 | ** times (the timestamp of the last checkin which modified |
| 106 | ** them). |
| 107 | ** -- Treat all following arguments as non-flags, even if |
| 108 | ** they look like flags. Use before the VERSION or |
| 109 | ** FILES..., but not both. |
| 110 | ** |
| 111 | ** See also: revert |
| 112 | */ |
| 113 | void update_cmd(void){ |
| 114 | int vid; /* Current version */ |
| @@ -149,11 +152,11 @@ | |
| 152 | forceMissingFlag = find_option("force-missing",0,0)!=0; |
| 153 | debugFlag = find_option("debug",0,0)!=0; |
| 154 | setmtimeFlag = find_option("setmtime",0,0)!=0; |
| 155 | |
| 156 | /* We should be done with options.. */ |
| 157 | verify_all_options2(); |
| 158 | |
| 159 | db_must_be_within_tree(); |
| 160 | vid = db_lget_int("checkout", 0); |
| 161 | user_select(); |
| 162 | if( !dryRunFlag && !internalUpdate ){ |
| @@ -757,11 +760,11 @@ | |
| 760 | } |
| 761 | |
| 762 | /* |
| 763 | ** COMMAND: revert |
| 764 | ** |
| 765 | ** Usage: %fossil revert ?-r REVISION? ?--? ?FILE ...? |
| 766 | ** |
| 767 | ** Revert to the current repository version of FILE, or to |
| 768 | ** the version associated with baseline REVISION if the -r flag |
| 769 | ** appears. |
| 770 | ** |
| @@ -773,10 +776,12 @@ | |
| 776 | ** If a file is reverted accidentally, it can be restored using |
| 777 | ** the "fossil undo" command. |
| 778 | ** |
| 779 | ** Options: |
| 780 | ** -r REVISION revert given FILE(s) back to given REVISION |
| 781 | ** -- Treat all following arguments as files, even |
| 782 | ** if they look like flags. |
| 783 | ** |
| 784 | ** See also: redo, undo, update |
| 785 | */ |
| 786 | void revert_cmd(void){ |
| 787 | Manifest *pCoManifest; /* Manifest of current checkout */ |
| @@ -789,11 +794,11 @@ | |
| 794 | int i; |
| 795 | Stmt q; |
| 796 | |
| 797 | undo_capture_command_line(); |
| 798 | zRevision = find_option("revision", "r", 1); |
| 799 | verify_all_options2(); |
| 800 | |
| 801 | if( g.argc<2 ){ |
| 802 | usage("?OPTIONS? [FILE] ..."); |
| 803 | } |
| 804 | if( zRevision && g.argc<3 ){ |
| 805 |
+9
-3
| --- src/zip.c | ||
| +++ src/zip.c | ||
| @@ -747,11 +747,11 @@ | ||
| 747 | 747 | zInclude = find_option("include", 0, 1); |
| 748 | 748 | if( zInclude ) pInclude = glob_create(zInclude); |
| 749 | 749 | db_find_and_open_repository(0, 0); |
| 750 | 750 | |
| 751 | 751 | /* We should be done with options.. */ |
| 752 | - verify_all_options(); | |
| 752 | + verify_all_options2(); | |
| 753 | 753 | |
| 754 | 754 | if( g.argc!=4 ){ |
| 755 | 755 | usage("VERSION OUTPUTFILE"); |
| 756 | 756 | } |
| 757 | 757 | g.zOpenRevision = g.argv[2]; |
| @@ -780,11 +780,11 @@ | ||
| 780 | 780 | } |
| 781 | 781 | |
| 782 | 782 | /* |
| 783 | 783 | ** COMMAND: zip* |
| 784 | 784 | ** |
| 785 | -** Usage: %fossil zip VERSION OUTPUTFILE [OPTIONS] | |
| 785 | +** Usage: %fossil zip ?OPTIONS? VERSION ?--? OUTPUTFILE | |
| 786 | 786 | ** |
| 787 | 787 | ** Generate a ZIP archive for a check-in. If the --name option is |
| 788 | 788 | ** used, its argument becomes the name of the top-level directory in the |
| 789 | 789 | ** resulting ZIP archive. If --name is omitted, the top-level directory |
| 790 | 790 | ** name is derived from the project name, the check-in date and time, and |
| @@ -798,19 +798,22 @@ | ||
| 798 | 798 | ** Options: |
| 799 | 799 | ** -X|--exclude GLOBLIST Comma-separated list of GLOBs of files to exclude |
| 800 | 800 | ** --include GLOBLIST Comma-separated list of GLOBs of files to include |
| 801 | 801 | ** --name DIRECTORYNAME The name of the top-level directory in the archive |
| 802 | 802 | ** -R REPOSITORY Specify a Fossil repository |
| 803 | +** -- Treat all following arguments as non-flags, even if | |
| 804 | +** they look like flags. Use before the VERSION or | |
| 805 | +** OUTPUTFILE, but not both. | |
| 803 | 806 | */ |
| 804 | 807 | void zip_cmd(void){ |
| 805 | 808 | archive_cmd(ARCHIVE_ZIP); |
| 806 | 809 | } |
| 807 | 810 | |
| 808 | 811 | /* |
| 809 | 812 | ** COMMAND: sqlar* |
| 810 | 813 | ** |
| 811 | -** Usage: %fossil sqlar VERSION OUTPUTFILE [OPTIONS] | |
| 814 | +** Usage: %fossil sqlar ?OPTIONS? VERSION ?--? OUTPUTFILE | |
| 812 | 815 | ** |
| 813 | 816 | ** Generate an SQLAR archive for a check-in. If the --name option is |
| 814 | 817 | ** used, its argument becomes the name of the top-level directory in the |
| 815 | 818 | ** resulting SQLAR archive. If --name is omitted, the top-level directory |
| 816 | 819 | ** name is derived from the project name, the check-in date and time, and |
| @@ -824,10 +827,13 @@ | ||
| 824 | 827 | ** Options: |
| 825 | 828 | ** -X|--exclude GLOBLIST Comma-separated list of GLOBs of files to exclude |
| 826 | 829 | ** --include GLOBLIST Comma-separated list of GLOBs of files to include |
| 827 | 830 | ** --name DIRECTORYNAME The name of the top-level directory in the archive |
| 828 | 831 | ** -R REPOSITORY Specify a Fossil repository |
| 832 | +** -- Treat all following arguments as non-flags, even if | |
| 833 | +** they look like flags. Use before the VERSION or | |
| 834 | +** OUTPUTFILE, but not both. | |
| 829 | 835 | */ |
| 830 | 836 | void sqlar_cmd(void){ |
| 831 | 837 | archive_cmd(ARCHIVE_SQLAR); |
| 832 | 838 | } |
| 833 | 839 | |
| 834 | 840 |
| --- src/zip.c | |
| +++ src/zip.c | |
| @@ -747,11 +747,11 @@ | |
| 747 | zInclude = find_option("include", 0, 1); |
| 748 | if( zInclude ) pInclude = glob_create(zInclude); |
| 749 | db_find_and_open_repository(0, 0); |
| 750 | |
| 751 | /* We should be done with options.. */ |
| 752 | verify_all_options(); |
| 753 | |
| 754 | if( g.argc!=4 ){ |
| 755 | usage("VERSION OUTPUTFILE"); |
| 756 | } |
| 757 | g.zOpenRevision = g.argv[2]; |
| @@ -780,11 +780,11 @@ | |
| 780 | } |
| 781 | |
| 782 | /* |
| 783 | ** COMMAND: zip* |
| 784 | ** |
| 785 | ** Usage: %fossil zip VERSION OUTPUTFILE [OPTIONS] |
| 786 | ** |
| 787 | ** Generate a ZIP archive for a check-in. If the --name option is |
| 788 | ** used, its argument becomes the name of the top-level directory in the |
| 789 | ** resulting ZIP archive. If --name is omitted, the top-level directory |
| 790 | ** name is derived from the project name, the check-in date and time, and |
| @@ -798,19 +798,22 @@ | |
| 798 | ** Options: |
| 799 | ** -X|--exclude GLOBLIST Comma-separated list of GLOBs of files to exclude |
| 800 | ** --include GLOBLIST Comma-separated list of GLOBs of files to include |
| 801 | ** --name DIRECTORYNAME The name of the top-level directory in the archive |
| 802 | ** -R REPOSITORY Specify a Fossil repository |
| 803 | */ |
| 804 | void zip_cmd(void){ |
| 805 | archive_cmd(ARCHIVE_ZIP); |
| 806 | } |
| 807 | |
| 808 | /* |
| 809 | ** COMMAND: sqlar* |
| 810 | ** |
| 811 | ** Usage: %fossil sqlar VERSION OUTPUTFILE [OPTIONS] |
| 812 | ** |
| 813 | ** Generate an SQLAR archive for a check-in. If the --name option is |
| 814 | ** used, its argument becomes the name of the top-level directory in the |
| 815 | ** resulting SQLAR archive. If --name is omitted, the top-level directory |
| 816 | ** name is derived from the project name, the check-in date and time, and |
| @@ -824,10 +827,13 @@ | |
| 824 | ** Options: |
| 825 | ** -X|--exclude GLOBLIST Comma-separated list of GLOBs of files to exclude |
| 826 | ** --include GLOBLIST Comma-separated list of GLOBs of files to include |
| 827 | ** --name DIRECTORYNAME The name of the top-level directory in the archive |
| 828 | ** -R REPOSITORY Specify a Fossil repository |
| 829 | */ |
| 830 | void sqlar_cmd(void){ |
| 831 | archive_cmd(ARCHIVE_SQLAR); |
| 832 | } |
| 833 | |
| 834 |
| --- src/zip.c | |
| +++ src/zip.c | |
| @@ -747,11 +747,11 @@ | |
| 747 | zInclude = find_option("include", 0, 1); |
| 748 | if( zInclude ) pInclude = glob_create(zInclude); |
| 749 | db_find_and_open_repository(0, 0); |
| 750 | |
| 751 | /* We should be done with options.. */ |
| 752 | verify_all_options2(); |
| 753 | |
| 754 | if( g.argc!=4 ){ |
| 755 | usage("VERSION OUTPUTFILE"); |
| 756 | } |
| 757 | g.zOpenRevision = g.argv[2]; |
| @@ -780,11 +780,11 @@ | |
| 780 | } |
| 781 | |
| 782 | /* |
| 783 | ** COMMAND: zip* |
| 784 | ** |
| 785 | ** Usage: %fossil zip ?OPTIONS? VERSION ?--? OUTPUTFILE |
| 786 | ** |
| 787 | ** Generate a ZIP archive for a check-in. If the --name option is |
| 788 | ** used, its argument becomes the name of the top-level directory in the |
| 789 | ** resulting ZIP archive. If --name is omitted, the top-level directory |
| 790 | ** name is derived from the project name, the check-in date and time, and |
| @@ -798,19 +798,22 @@ | |
| 798 | ** Options: |
| 799 | ** -X|--exclude GLOBLIST Comma-separated list of GLOBs of files to exclude |
| 800 | ** --include GLOBLIST Comma-separated list of GLOBs of files to include |
| 801 | ** --name DIRECTORYNAME The name of the top-level directory in the archive |
| 802 | ** -R REPOSITORY Specify a Fossil repository |
| 803 | ** -- Treat all following arguments as non-flags, even if |
| 804 | ** they look like flags. Use before the VERSION or |
| 805 | ** OUTPUTFILE, but not both. |
| 806 | */ |
| 807 | void zip_cmd(void){ |
| 808 | archive_cmd(ARCHIVE_ZIP); |
| 809 | } |
| 810 | |
| 811 | /* |
| 812 | ** COMMAND: sqlar* |
| 813 | ** |
| 814 | ** Usage: %fossil sqlar ?OPTIONS? VERSION ?--? OUTPUTFILE |
| 815 | ** |
| 816 | ** Generate an SQLAR archive for a check-in. If the --name option is |
| 817 | ** used, its argument becomes the name of the top-level directory in the |
| 818 | ** resulting SQLAR archive. If --name is omitted, the top-level directory |
| 819 | ** name is derived from the project name, the check-in date and time, and |
| @@ -824,10 +827,13 @@ | |
| 827 | ** Options: |
| 828 | ** -X|--exclude GLOBLIST Comma-separated list of GLOBs of files to exclude |
| 829 | ** --include GLOBLIST Comma-separated list of GLOBs of files to include |
| 830 | ** --name DIRECTORYNAME The name of the top-level directory in the archive |
| 831 | ** -R REPOSITORY Specify a Fossil repository |
| 832 | ** -- Treat all following arguments as non-flags, even if |
| 833 | ** they look like flags. Use before the VERSION or |
| 834 | ** OUTPUTFILE, but not both. |
| 835 | */ |
| 836 | void sqlar_cmd(void){ |
| 837 | archive_cmd(ARCHIVE_SQLAR); |
| 838 | } |
| 839 | |
| 840 |