Fossil SCM

Help syntax change to match project conventions: [--] to ?--?

stephan 2019-09-27 16:37 double-dash-flag
Commit 95ed189424cc8568fc8b0503959d2496df995a7799304222398c8a3c973f249d
+6 -6
--- src/add.c
+++ src/add.c
@@ -244,11 +244,11 @@
244244
}
245245
246246
/*
247247
** COMMAND: add
248248
**
249
-** Usage: %fossil add ?OPTIONS? [--] FILE1 ?FILE2 ...?
249
+** Usage: %fossil add ?OPTIONS? ?--? FILE1 ?FILE2 ...?
250250
**
251251
** Make arrangements to add one or more files or directories to the
252252
** current checkout at the next commit.
253253
**
254254
** When adding files or directories recursively, filenames that begin
@@ -420,11 +420,11 @@
420420
/*
421421
** COMMAND: rm
422422
** COMMAND: delete
423423
** COMMAND: forget*
424424
**
425
-** Usage: %fossil rm|delete|forget ?OPTIONS? [--] FILE1 ?FILE2 ...?
425
+** Usage: %fossil rm|delete|forget ?OPTIONS? ?--? FILE1 ?FILE2 ...?
426426
**
427427
** Remove one or more files or directories from the repository.
428428
**
429429
** The 'rm' and 'delete' commands do NOT normally remove the files from
430430
** disk. They just mark the files as no longer being part of the project.
@@ -828,12 +828,12 @@
828828
829829
/*
830830
** COMMAND: mv
831831
** COMMAND: rename*
832832
**
833
-** Usage: %fossil mv|rename ?OPTIONS? [--] OLDNAME NEWNAME
834
-** or: %fossil mv|rename ?OPTIONS? [--] OLDNAME... DIR
833
+** Usage: %fossil mv|rename ?OPTIONS? ?--? OLDNAME NEWNAME
834
+** or: %fossil mv|rename ?OPTIONS? ?--? OLDNAME... DIR
835835
**
836836
** Move or rename one or more files or directories within the repository tree.
837837
** You can either rename a file or directory or move it to another subdirectory.
838838
**
839839
** The 'mv' command does NOT normally rename or move the files on disk.
@@ -885,11 +885,11 @@
885885
vid = db_lget_int("checkout", 0);
886886
if( vid==0 ){
887887
fossil_fatal("no checkout in which to rename files");
888888
}
889889
if( g.argc<4 ){
890
- usage("?OPTIONS? [--] OLDNAME NEWNAME");
890
+ usage("?OPTIONS? ?--? OLDNAME NEWNAME");
891891
}
892892
zDest = g.argv[g.argc-1];
893893
db_begin_transaction();
894894
if( g.argv[1][0]=='r' ){ /* i.e. "rename" */
895895
moveFiles = 0;
@@ -916,11 +916,11 @@
916916
}else{
917917
origType = (file_isdir(g.argv[2], RepoFILE) == 1);
918918
}
919919
destType = file_isdir(zDest, RepoFILE);
920920
if( origType==-1 && destType!=1 ){
921
- usage("?OPTIONS? [--] OLDNAME NEWNAME");
921
+ usage("?OPTIONS? ?--? OLDNAME NEWNAME");
922922
}else if( origType==1 && destType==2 ){
923923
fossil_fatal("cannot rename '%s' to '%s' since another file named"
924924
" '%s' exists", g.argv[2], zDest, zDest);
925925
}else if( origType==0 && destType!=1 ){
926926
Blob orig;
927927
--- src/add.c
+++ src/add.c
@@ -244,11 +244,11 @@
244 }
245
246 /*
247 ** COMMAND: add
248 **
249 ** Usage: %fossil add ?OPTIONS? [--] FILE1 ?FILE2 ...?
250 **
251 ** Make arrangements to add one or more files or directories to the
252 ** current checkout at the next commit.
253 **
254 ** When adding files or directories recursively, filenames that begin
@@ -420,11 +420,11 @@
420 /*
421 ** COMMAND: rm
422 ** COMMAND: delete
423 ** COMMAND: forget*
424 **
425 ** Usage: %fossil rm|delete|forget ?OPTIONS? [--] FILE1 ?FILE2 ...?
426 **
427 ** Remove one or more files or directories from the repository.
428 **
429 ** The 'rm' and 'delete' commands do NOT normally remove the files from
430 ** disk. They just mark the files as no longer being part of the project.
@@ -828,12 +828,12 @@
828
829 /*
830 ** COMMAND: mv
831 ** COMMAND: rename*
832 **
833 ** Usage: %fossil mv|rename ?OPTIONS? [--] OLDNAME NEWNAME
834 ** or: %fossil mv|rename ?OPTIONS? [--] OLDNAME... DIR
835 **
836 ** Move or rename one or more files or directories within the repository tree.
837 ** You can either rename a file or directory or move it to another subdirectory.
838 **
839 ** The 'mv' command does NOT normally rename or move the files on disk.
@@ -885,11 +885,11 @@
885 vid = db_lget_int("checkout", 0);
886 if( vid==0 ){
887 fossil_fatal("no checkout in which to rename files");
888 }
889 if( g.argc<4 ){
890 usage("?OPTIONS? [--] OLDNAME NEWNAME");
891 }
892 zDest = g.argv[g.argc-1];
893 db_begin_transaction();
894 if( g.argv[1][0]=='r' ){ /* i.e. "rename" */
895 moveFiles = 0;
@@ -916,11 +916,11 @@
916 }else{
917 origType = (file_isdir(g.argv[2], RepoFILE) == 1);
918 }
919 destType = file_isdir(zDest, RepoFILE);
920 if( origType==-1 && destType!=1 ){
921 usage("?OPTIONS? [--] OLDNAME NEWNAME");
922 }else if( origType==1 && destType==2 ){
923 fossil_fatal("cannot rename '%s' to '%s' since another file named"
924 " '%s' exists", g.argv[2], zDest, zDest);
925 }else if( origType==0 && destType!=1 ){
926 Blob orig;
927
--- src/add.c
+++ src/add.c
@@ -244,11 +244,11 @@
244 }
245
246 /*
247 ** COMMAND: add
248 **
249 ** Usage: %fossil add ?OPTIONS? ?--? FILE1 ?FILE2 ...?
250 **
251 ** Make arrangements to add one or more files or directories to the
252 ** current checkout at the next commit.
253 **
254 ** When adding files or directories recursively, filenames that begin
@@ -420,11 +420,11 @@
420 /*
421 ** COMMAND: rm
422 ** COMMAND: delete
423 ** COMMAND: forget*
424 **
425 ** Usage: %fossil rm|delete|forget ?OPTIONS? ?--? FILE1 ?FILE2 ...?
426 **
427 ** Remove one or more files or directories from the repository.
428 **
429 ** The 'rm' and 'delete' commands do NOT normally remove the files from
430 ** disk. They just mark the files as no longer being part of the project.
@@ -828,12 +828,12 @@
828
829 /*
830 ** COMMAND: mv
831 ** COMMAND: rename*
832 **
833 ** Usage: %fossil mv|rename ?OPTIONS? ?--? OLDNAME NEWNAME
834 ** or: %fossil mv|rename ?OPTIONS? ?--? OLDNAME... DIR
835 **
836 ** Move or rename one or more files or directories within the repository tree.
837 ** You can either rename a file or directory or move it to another subdirectory.
838 **
839 ** The 'mv' command does NOT normally rename or move the files on disk.
@@ -885,11 +885,11 @@
885 vid = db_lget_int("checkout", 0);
886 if( vid==0 ){
887 fossil_fatal("no checkout in which to rename files");
888 }
889 if( g.argc<4 ){
890 usage("?OPTIONS? ?--? OLDNAME NEWNAME");
891 }
892 zDest = g.argv[g.argc-1];
893 db_begin_transaction();
894 if( g.argv[1][0]=='r' ){ /* i.e. "rename" */
895 moveFiles = 0;
@@ -916,11 +916,11 @@
916 }else{
917 origType = (file_isdir(g.argv[2], RepoFILE) == 1);
918 }
919 destType = file_isdir(zDest, RepoFILE);
920 if( origType==-1 && destType!=1 ){
921 usage("?OPTIONS? ?--? OLDNAME NEWNAME");
922 }else if( origType==1 && destType==2 ){
923 fossil_fatal("cannot rename '%s' to '%s' since another file named"
924 " '%s' exists", g.argv[2], zDest, zDest);
925 }else if( origType==0 && destType!=1 ){
926 Blob orig;
927
+6 -6
--- src/checkin.c
+++ src/checkin.c
@@ -352,11 +352,11 @@
352352
353353
/*
354354
** COMMAND: changes
355355
** COMMAND: status
356356
**
357
-** Usage: %fossil changes|status ?OPTIONS? [--] ?PATHS ...?
357
+** Usage: %fossil changes|status ?OPTIONS? ?--? ?PATHS ...?
358358
**
359359
** Report the change status of files in the current checkout. If one or
360360
** more PATHS are specified, only changes among the named files and
361361
** directories are reported. Directories are searched recursively.
362362
**
@@ -649,11 +649,11 @@
649649
}
650650
651651
/*
652652
** COMMAND: ls
653653
**
654
-** Usage: %fossil ls ?OPTIONS? [--] ?PATHS ...?
654
+** Usage: %fossil ls ?OPTIONS? ?--? ?PATHS ...?
655655
**
656656
** List all files in the current checkout. If PATHS is included, only the
657657
** named files (or their children if directories) are shown.
658658
**
659659
** The ls command is essentially two related commands in one, depending on
@@ -809,11 +809,11 @@
809809
}
810810
811811
/*
812812
** COMMAND: extras
813813
**
814
-** Usage: %fossil extras ?OPTIONS? [--] ?PATH1 ...?
814
+** Usage: %fossil extras ?OPTIONS? ?--? ?PATH1 ...?
815815
**
816816
** Print a list of all files in the source tree that are not part of the
817817
** current checkout. See also the "clean" command. If paths are specified,
818818
** only files in the given directories will be listed.
819819
**
@@ -882,11 +882,11 @@
882882
}
883883
884884
/*
885885
** COMMAND: clean
886886
**
887
-** Usage: %fossil clean ?OPTIONS? [--] ?PATH ...?
887
+** Usage: %fossil clean ?OPTIONS? ?--? ?PATH ...?
888888
**
889889
** Delete all "extra" files in the source tree. "Extra" files are files
890890
** that are not officially part of the checkout. If one or more PATH
891891
** arguments appear, then only the files named, or files contained with
892892
** directories named, will be removed.
@@ -1946,12 +1946,12 @@
19461946
19471947
/*
19481948
** COMMAND: ci*
19491949
** COMMAND: commit
19501950
**
1951
-** Usage: %fossil commit ?OPTIONS? [--] ?FILE...?
1952
-** or: %fossil ci ?OPTIONS? [--] ?FILE...?
1951
+** Usage: %fossil commit ?OPTIONS? ?--? ?FILE...?
1952
+** or: %fossil ci ?OPTIONS? ?--? ?FILE...?
19531953
**
19541954
** Create a new version containing all of the changes in the current
19551955
** checkout. You will be prompted to enter a check-in comment unless
19561956
** the comment has been specified on the command-line using "-m" or a
19571957
** file containing the comment using -M. The editor defined in the
19581958
--- src/checkin.c
+++ src/checkin.c
@@ -352,11 +352,11 @@
352
353 /*
354 ** COMMAND: changes
355 ** COMMAND: status
356 **
357 ** Usage: %fossil changes|status ?OPTIONS? [--] ?PATHS ...?
358 **
359 ** Report the change status of files in the current checkout. If one or
360 ** more PATHS are specified, only changes among the named files and
361 ** directories are reported. Directories are searched recursively.
362 **
@@ -649,11 +649,11 @@
649 }
650
651 /*
652 ** COMMAND: ls
653 **
654 ** Usage: %fossil ls ?OPTIONS? [--] ?PATHS ...?
655 **
656 ** List all files in the current checkout. If PATHS is included, only the
657 ** named files (or their children if directories) are shown.
658 **
659 ** The ls command is essentially two related commands in one, depending on
@@ -809,11 +809,11 @@
809 }
810
811 /*
812 ** COMMAND: extras
813 **
814 ** Usage: %fossil extras ?OPTIONS? [--] ?PATH1 ...?
815 **
816 ** Print a list of all files in the source tree that are not part of the
817 ** current checkout. See also the "clean" command. If paths are specified,
818 ** only files in the given directories will be listed.
819 **
@@ -882,11 +882,11 @@
882 }
883
884 /*
885 ** COMMAND: clean
886 **
887 ** Usage: %fossil clean ?OPTIONS? [--] ?PATH ...?
888 **
889 ** Delete all "extra" files in the source tree. "Extra" files are files
890 ** that are not officially part of the checkout. If one or more PATH
891 ** arguments appear, then only the files named, or files contained with
892 ** directories named, will be removed.
@@ -1946,12 +1946,12 @@
1946
1947 /*
1948 ** COMMAND: ci*
1949 ** COMMAND: commit
1950 **
1951 ** Usage: %fossil commit ?OPTIONS? [--] ?FILE...?
1952 ** or: %fossil ci ?OPTIONS? [--] ?FILE...?
1953 **
1954 ** Create a new version containing all of the changes in the current
1955 ** checkout. You will be prompted to enter a check-in comment unless
1956 ** the comment has been specified on the command-line using "-m" or a
1957 ** file containing the comment using -M. The editor defined in the
1958
--- src/checkin.c
+++ src/checkin.c
@@ -352,11 +352,11 @@
352
353 /*
354 ** COMMAND: changes
355 ** COMMAND: status
356 **
357 ** Usage: %fossil changes|status ?OPTIONS? ?--? ?PATHS ...?
358 **
359 ** Report the change status of files in the current checkout. If one or
360 ** more PATHS are specified, only changes among the named files and
361 ** directories are reported. Directories are searched recursively.
362 **
@@ -649,11 +649,11 @@
649 }
650
651 /*
652 ** COMMAND: ls
653 **
654 ** Usage: %fossil ls ?OPTIONS? ?--? ?PATHS ...?
655 **
656 ** List all files in the current checkout. If PATHS is included, only the
657 ** named files (or their children if directories) are shown.
658 **
659 ** The ls command is essentially two related commands in one, depending on
@@ -809,11 +809,11 @@
809 }
810
811 /*
812 ** COMMAND: extras
813 **
814 ** Usage: %fossil extras ?OPTIONS? ?--? ?PATH1 ...?
815 **
816 ** Print a list of all files in the source tree that are not part of the
817 ** current checkout. See also the "clean" command. If paths are specified,
818 ** only files in the given directories will be listed.
819 **
@@ -882,11 +882,11 @@
882 }
883
884 /*
885 ** COMMAND: clean
886 **
887 ** Usage: %fossil clean ?OPTIONS? ?--? ?PATH ...?
888 **
889 ** Delete all "extra" files in the source tree. "Extra" files are files
890 ** that are not officially part of the checkout. If one or more PATH
891 ** arguments appear, then only the files named, or files contained with
892 ** directories named, will be removed.
@@ -1946,12 +1946,12 @@
1946
1947 /*
1948 ** COMMAND: ci*
1949 ** COMMAND: commit
1950 **
1951 ** Usage: %fossil commit ?OPTIONS? ?--? ?FILE...?
1952 ** or: %fossil ci ?OPTIONS? ?--? ?FILE...?
1953 **
1954 ** Create a new version containing all of the changes in the current
1955 ** checkout. You will be prompted to enter a check-in comment unless
1956 ** the comment has been specified on the command-line using "-m" or a
1957 ** file containing the comment using -M. The editor defined in the
1958
--- src/unversioned.c
+++ src/unversioned.c
@@ -218,11 +218,11 @@
218218
** of each UV-file is retained. Changes to an UV-file are permanent and cannot
219219
** be undone, so use appropriate caution with this command.
220220
**
221221
** Subcommands:
222222
**
223
-** add [--] FILE ... Add or update one or more unversioned files in
223
+** add ?--? FILE ... Add or update one or more unversioned files in
224224
** the local repository so that they match FILEs
225225
** on disk. Changes are not pushed to other
226226
** repositories until the next sync.
227227
**
228228
** add FILE --as UVFILE
@@ -232,15 +232,15 @@
232232
** namespace. This variant of the 'add' command allows
233233
** the name to be different in the repository versus
234234
** what appears on disk, but it only allows adding
235235
** a single file at a time.
236236
**
237
-** cat [--] FILE ... Concatenate the content of FILEs to stdout.
237
+** cat ?--? FILE ... Concatenate the content of FILEs to stdout.
238238
**
239
-** edit [--] FILE Bring up FILE in a text editor for modification.
239
+** edit ?--? FILE Bring up FILE in a text editor for modification.
240240
**
241
-** export [--] FILE OUTPUT
241
+** export ?--? FILE OUTPUT
242242
** Write the content of FILE into OUTPUT on disk
243243
**
244244
** list | ls Show all unversioned files held in the local
245245
** repository.
246246
**
@@ -250,11 +250,11 @@
250250
**
251251
** Options:
252252
** -v|--verbose Extra diagnostic output
253253
** -n|--dryrun Show what would have happened
254254
**
255
-** remove|rm|delete [--] FILE ...
255
+** remove|rm|delete ?--? FILE ...
256256
** Remove unversioned files from the local repository.
257257
** Changes are not pushed to other repositories until
258258
** the next sync.
259259
**
260260
** sync ?URL? Synchronize the state of all unversioned files with
@@ -264,11 +264,11 @@
264264
**
265265
** Options:
266266
** -v|--verbose Extra diagnostic output
267267
** -n|--dryrun Show what would have happened
268268
**
269
-** touch [--] FILE ... Update the TIMESTAMP on all of the listed files
269
+** touch ?--? FILE ... Update the TIMESTAMP on all of the listed files
270270
**
271271
** Options:
272272
**
273273
** --mtime TIMESTAMP Use TIMESTAMP instead of "now" for the "add",
274274
** "edit", "remove", and "touch" subcommands.
@@ -298,11 +298,11 @@
298298
const char *zFileArg;
299299
Blob file;
300300
int i;
301301
zAs = find_option("as",0,1);
302302
verify_all_options2();
303
- if( zAs && g.argc!=4 ) usage("add --as UVFILE [--] DISKFILE");
303
+ if( zAs && g.argc!=4 ) usage("add --as UVFILE ?--? DISKFILE");
304304
db_begin_transaction();
305305
content_rcvid_init("#!fossil unversioned add");
306306
for(i=3; i<g.argc; i++){
307307
zIn = zAs ? zAs : g.argv[i];
308308
if( zIn[0]==0 ){
@@ -342,11 +342,11 @@
342342
const char *zUVFile; /* Name of the unversioned file */
343343
char *zCmd; /* Command to run the text editor */
344344
Blob content; /* Content of the unversioned file */
345345
346346
verify_all_options2();
347
- if( g.argc!=4) usage("edit [--] UVFILE");
347
+ if( g.argc!=4) usage("edit ?--? UVFILE");
348348
zUVFile = g.argv[3];
349349
zEditor = fossil_text_editor();
350350
if( zEditor==0 ) fossil_fatal("no text editor - set the VISUAL env variable");
351351
zTFile = fossil_temp_filename();
352352
if( zTFile==0 ) fossil_fatal("cannot find a temporary filename");
@@ -379,11 +379,11 @@
379379
blob_reset(&content);
380380
}else if( memcmp(zCmd, "export", nCmd)==0 ){
381381
Blob content;
382382
const char * zOutfile;
383383
verify_all_options2();
384
- if( g.argc!=5 ) usage("export [--] UVFILE OUTPUT");
384
+ if( g.argc!=5 ) usage("export ?--? UVFILE OUTPUT");
385385
if( unversioned_content(g.argv[3], &content) ){
386386
fossil_fatal("no such uv-file: %Q", g.argv[3]);
387387
}
388388
/*
389389
** Pathological(?) corner case:
390390
--- src/unversioned.c
+++ src/unversioned.c
@@ -218,11 +218,11 @@
218 ** of each UV-file is retained. Changes to an UV-file are permanent and cannot
219 ** be undone, so use appropriate caution with this command.
220 **
221 ** Subcommands:
222 **
223 ** add [--] FILE ... Add or update one or more unversioned files in
224 ** the local repository so that they match FILEs
225 ** on disk. Changes are not pushed to other
226 ** repositories until the next sync.
227 **
228 ** add FILE --as UVFILE
@@ -232,15 +232,15 @@
232 ** namespace. This variant of the 'add' command allows
233 ** the name to be different in the repository versus
234 ** what appears on disk, but it only allows adding
235 ** a single file at a time.
236 **
237 ** cat [--] FILE ... Concatenate the content of FILEs to stdout.
238 **
239 ** edit [--] FILE Bring up FILE in a text editor for modification.
240 **
241 ** export [--] FILE OUTPUT
242 ** Write the content of FILE into OUTPUT on disk
243 **
244 ** list | ls Show all unversioned files held in the local
245 ** repository.
246 **
@@ -250,11 +250,11 @@
250 **
251 ** Options:
252 ** -v|--verbose Extra diagnostic output
253 ** -n|--dryrun Show what would have happened
254 **
255 ** remove|rm|delete [--] FILE ...
256 ** Remove unversioned files from the local repository.
257 ** Changes are not pushed to other repositories until
258 ** the next sync.
259 **
260 ** sync ?URL? Synchronize the state of all unversioned files with
@@ -264,11 +264,11 @@
264 **
265 ** Options:
266 ** -v|--verbose Extra diagnostic output
267 ** -n|--dryrun Show what would have happened
268 **
269 ** touch [--] FILE ... Update the TIMESTAMP on all of the listed files
270 **
271 ** Options:
272 **
273 ** --mtime TIMESTAMP Use TIMESTAMP instead of "now" for the "add",
274 ** "edit", "remove", and "touch" subcommands.
@@ -298,11 +298,11 @@
298 const char *zFileArg;
299 Blob file;
300 int i;
301 zAs = find_option("as",0,1);
302 verify_all_options2();
303 if( zAs && g.argc!=4 ) usage("add --as UVFILE [--] DISKFILE");
304 db_begin_transaction();
305 content_rcvid_init("#!fossil unversioned add");
306 for(i=3; i<g.argc; i++){
307 zIn = zAs ? zAs : g.argv[i];
308 if( zIn[0]==0 ){
@@ -342,11 +342,11 @@
342 const char *zUVFile; /* Name of the unversioned file */
343 char *zCmd; /* Command to run the text editor */
344 Blob content; /* Content of the unversioned file */
345
346 verify_all_options2();
347 if( g.argc!=4) usage("edit [--] UVFILE");
348 zUVFile = g.argv[3];
349 zEditor = fossil_text_editor();
350 if( zEditor==0 ) fossil_fatal("no text editor - set the VISUAL env variable");
351 zTFile = fossil_temp_filename();
352 if( zTFile==0 ) fossil_fatal("cannot find a temporary filename");
@@ -379,11 +379,11 @@
379 blob_reset(&content);
380 }else if( memcmp(zCmd, "export", nCmd)==0 ){
381 Blob content;
382 const char * zOutfile;
383 verify_all_options2();
384 if( g.argc!=5 ) usage("export [--] UVFILE OUTPUT");
385 if( unversioned_content(g.argv[3], &content) ){
386 fossil_fatal("no such uv-file: %Q", g.argv[3]);
387 }
388 /*
389 ** Pathological(?) corner case:
390
--- src/unversioned.c
+++ src/unversioned.c
@@ -218,11 +218,11 @@
218 ** of each UV-file is retained. Changes to an UV-file are permanent and cannot
219 ** be undone, so use appropriate caution with this command.
220 **
221 ** Subcommands:
222 **
223 ** add ?--? FILE ... Add or update one or more unversioned files in
224 ** the local repository so that they match FILEs
225 ** on disk. Changes are not pushed to other
226 ** repositories until the next sync.
227 **
228 ** add FILE --as UVFILE
@@ -232,15 +232,15 @@
232 ** namespace. This variant of the 'add' command allows
233 ** the name to be different in the repository versus
234 ** what appears on disk, but it only allows adding
235 ** a single file at a time.
236 **
237 ** cat ?--? FILE ... Concatenate the content of FILEs to stdout.
238 **
239 ** edit ?--? FILE Bring up FILE in a text editor for modification.
240 **
241 ** export ?--? FILE OUTPUT
242 ** Write the content of FILE into OUTPUT on disk
243 **
244 ** list | ls Show all unversioned files held in the local
245 ** repository.
246 **
@@ -250,11 +250,11 @@
250 **
251 ** Options:
252 ** -v|--verbose Extra diagnostic output
253 ** -n|--dryrun Show what would have happened
254 **
255 ** remove|rm|delete ?--? FILE ...
256 ** Remove unversioned files from the local repository.
257 ** Changes are not pushed to other repositories until
258 ** the next sync.
259 **
260 ** sync ?URL? Synchronize the state of all unversioned files with
@@ -264,11 +264,11 @@
264 **
265 ** Options:
266 ** -v|--verbose Extra diagnostic output
267 ** -n|--dryrun Show what would have happened
268 **
269 ** touch ?--? FILE ... Update the TIMESTAMP on all of the listed files
270 **
271 ** Options:
272 **
273 ** --mtime TIMESTAMP Use TIMESTAMP instead of "now" for the "add",
274 ** "edit", "remove", and "touch" subcommands.
@@ -298,11 +298,11 @@
298 const char *zFileArg;
299 Blob file;
300 int i;
301 zAs = find_option("as",0,1);
302 verify_all_options2();
303 if( zAs && g.argc!=4 ) usage("add --as UVFILE ?--? DISKFILE");
304 db_begin_transaction();
305 content_rcvid_init("#!fossil unversioned add");
306 for(i=3; i<g.argc; i++){
307 zIn = zAs ? zAs : g.argv[i];
308 if( zIn[0]==0 ){
@@ -342,11 +342,11 @@
342 const char *zUVFile; /* Name of the unversioned file */
343 char *zCmd; /* Command to run the text editor */
344 Blob content; /* Content of the unversioned file */
345
346 verify_all_options2();
347 if( g.argc!=4) usage("edit ?--? UVFILE");
348 zUVFile = g.argv[3];
349 zEditor = fossil_text_editor();
350 if( zEditor==0 ) fossil_fatal("no text editor - set the VISUAL env variable");
351 zTFile = fossil_temp_filename();
352 if( zTFile==0 ) fossil_fatal("cannot find a temporary filename");
@@ -379,11 +379,11 @@
379 blob_reset(&content);
380 }else if( memcmp(zCmd, "export", nCmd)==0 ){
381 Blob content;
382 const char * zOutfile;
383 verify_all_options2();
384 if( g.argc!=5 ) usage("export ?--? UVFILE OUTPUT");
385 if( unversioned_content(g.argv[3], &content) ){
386 fossil_fatal("no such uv-file: %Q", g.argv[3]);
387 }
388 /*
389 ** Pathological(?) corner case:
390
+5 -5
--- src/wiki.c
+++ src/wiki.c
@@ -1364,12 +1364,12 @@
13641364
**
13651365
** Usage: %fossil wiki (export|create|commit|list) WikiName
13661366
**
13671367
** Run various subcommands to work with wiki entries or tech notes.
13681368
**
1369
-** %fossil wiki export PAGENAME [--] ?FILE?
1370
-** %fossil wiki export -t|--technote DATETIME|TECHNOTE-ID [--] ?FILE?
1369
+** %fossil wiki export PAGENAME ?--? ?FILE?
1370
+** %fossil wiki export -t|--technote DATETIME|TECHNOTE-ID ?--? ?FILE?
13711371
**
13721372
** Sends the latest version of either a wiki page or of a tech note
13731373
** to the given file or standard output.
13741374
** If PAGENAME is provided, the wiki page will be output. For
13751375
** a tech note either DATETIME or TECHNOTE-ID must be specified. If
@@ -1454,11 +1454,11 @@
14541454
Manifest *pWiki = 0; /* Parsed wiki page content */
14551455
zETime = find_option("technote","t",1);
14561456
verify_all_options2();
14571457
if( !zETime ){
14581458
if( (g.argc!=4) && (g.argc!=5) ){
1459
- usage("export PAGENAME [--] ?FILE?");
1459
+ usage("export PAGENAME ?--? ?FILE?");
14601460
}
14611461
zPageName = g.argv[3];
14621462
rid = db_int(0, "SELECT x.rid FROM tag t, tagxref x"
14631463
" WHERE x.tagid=t.tagid AND t.tagname='wiki-%q'"
14641464
" ORDER BY x.mtime DESC LIMIT 1",
@@ -1471,11 +1471,11 @@
14711471
fossil_fatal("wiki page [%s] not found",zPageName);
14721472
}
14731473
zFile = g.argc==4 ? "-" : get_dash_filename_arg(4);
14741474
}else{
14751475
if( (g.argc!=3) && (g.argc!=4) ){
1476
- usage("export --technote DATETIME|TECHNOTE-ID [--] ?FILE?");
1476
+ usage("export --technote DATETIME|TECHNOTE-ID ?--? ?FILE?");
14771477
}
14781478
rid = wiki_technote_to_rid(zETime);
14791479
if ( rid==-1 ){
14801480
fossil_fatal("ambiguous tech note id: %s", zETime);
14811481
}
@@ -1507,11 +1507,11 @@
15071507
const char *zClr = find_option("technote-bgcolor", NULL, 1);
15081508
verify_all_options2();
15091509
if( g.argc!=4 && g.argc!=5 ){
15101510
usage("commit|create PAGENAME [--mimetype TEXT-FORMAT]"
15111511
" [--technote DATETIME] [--technote-tags TAGS]"
1512
- " [--technote-bgcolor COLOR] [--] ?FILE?");
1512
+ " [--technote-bgcolor COLOR] ?--? ?FILE?");
15131513
}
15141514
zPageName = g.argv[3];
15151515
if( g.argc==4 ){
15161516
blob_read_from_channel(&content, stdin, -1);
15171517
}else{
15181518
--- src/wiki.c
+++ src/wiki.c
@@ -1364,12 +1364,12 @@
1364 **
1365 ** Usage: %fossil wiki (export|create|commit|list) WikiName
1366 **
1367 ** Run various subcommands to work with wiki entries or tech notes.
1368 **
1369 ** %fossil wiki export PAGENAME [--] ?FILE?
1370 ** %fossil wiki export -t|--technote DATETIME|TECHNOTE-ID [--] ?FILE?
1371 **
1372 ** Sends the latest version of either a wiki page or of a tech note
1373 ** to the given file or standard output.
1374 ** If PAGENAME is provided, the wiki page will be output. For
1375 ** a tech note either DATETIME or TECHNOTE-ID must be specified. If
@@ -1454,11 +1454,11 @@
1454 Manifest *pWiki = 0; /* Parsed wiki page content */
1455 zETime = find_option("technote","t",1);
1456 verify_all_options2();
1457 if( !zETime ){
1458 if( (g.argc!=4) && (g.argc!=5) ){
1459 usage("export PAGENAME [--] ?FILE?");
1460 }
1461 zPageName = g.argv[3];
1462 rid = db_int(0, "SELECT x.rid FROM tag t, tagxref x"
1463 " WHERE x.tagid=t.tagid AND t.tagname='wiki-%q'"
1464 " ORDER BY x.mtime DESC LIMIT 1",
@@ -1471,11 +1471,11 @@
1471 fossil_fatal("wiki page [%s] not found",zPageName);
1472 }
1473 zFile = g.argc==4 ? "-" : get_dash_filename_arg(4);
1474 }else{
1475 if( (g.argc!=3) && (g.argc!=4) ){
1476 usage("export --technote DATETIME|TECHNOTE-ID [--] ?FILE?");
1477 }
1478 rid = wiki_technote_to_rid(zETime);
1479 if ( rid==-1 ){
1480 fossil_fatal("ambiguous tech note id: %s", zETime);
1481 }
@@ -1507,11 +1507,11 @@
1507 const char *zClr = find_option("technote-bgcolor", NULL, 1);
1508 verify_all_options2();
1509 if( g.argc!=4 && g.argc!=5 ){
1510 usage("commit|create PAGENAME [--mimetype TEXT-FORMAT]"
1511 " [--technote DATETIME] [--technote-tags TAGS]"
1512 " [--technote-bgcolor COLOR] [--] ?FILE?");
1513 }
1514 zPageName = g.argv[3];
1515 if( g.argc==4 ){
1516 blob_read_from_channel(&content, stdin, -1);
1517 }else{
1518
--- src/wiki.c
+++ src/wiki.c
@@ -1364,12 +1364,12 @@
1364 **
1365 ** Usage: %fossil wiki (export|create|commit|list) WikiName
1366 **
1367 ** Run various subcommands to work with wiki entries or tech notes.
1368 **
1369 ** %fossil wiki export PAGENAME ?--? ?FILE?
1370 ** %fossil wiki export -t|--technote DATETIME|TECHNOTE-ID ?--? ?FILE?
1371 **
1372 ** Sends the latest version of either a wiki page or of a tech note
1373 ** to the given file or standard output.
1374 ** If PAGENAME is provided, the wiki page will be output. For
1375 ** a tech note either DATETIME or TECHNOTE-ID must be specified. If
@@ -1454,11 +1454,11 @@
1454 Manifest *pWiki = 0; /* Parsed wiki page content */
1455 zETime = find_option("technote","t",1);
1456 verify_all_options2();
1457 if( !zETime ){
1458 if( (g.argc!=4) && (g.argc!=5) ){
1459 usage("export PAGENAME ?--? ?FILE?");
1460 }
1461 zPageName = g.argv[3];
1462 rid = db_int(0, "SELECT x.rid FROM tag t, tagxref x"
1463 " WHERE x.tagid=t.tagid AND t.tagname='wiki-%q'"
1464 " ORDER BY x.mtime DESC LIMIT 1",
@@ -1471,11 +1471,11 @@
1471 fossil_fatal("wiki page [%s] not found",zPageName);
1472 }
1473 zFile = g.argc==4 ? "-" : get_dash_filename_arg(4);
1474 }else{
1475 if( (g.argc!=3) && (g.argc!=4) ){
1476 usage("export --technote DATETIME|TECHNOTE-ID ?--? ?FILE?");
1477 }
1478 rid = wiki_technote_to_rid(zETime);
1479 if ( rid==-1 ){
1480 fossil_fatal("ambiguous tech note id: %s", zETime);
1481 }
@@ -1507,11 +1507,11 @@
1507 const char *zClr = find_option("technote-bgcolor", NULL, 1);
1508 verify_all_options2();
1509 if( g.argc!=4 && g.argc!=5 ){
1510 usage("commit|create PAGENAME [--mimetype TEXT-FORMAT]"
1511 " [--technote DATETIME] [--technote-tags TAGS]"
1512 " [--technote-bgcolor COLOR] ?--? ?FILE?");
1513 }
1514 zPageName = g.argv[3];
1515 if( g.argc==4 ){
1516 blob_read_from_channel(&content, stdin, -1);
1517 }else{
1518

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button