Fossil SCM

Add 'unversioned remove' as an alias for 'unversioned rm'. Update and improve help text.

mistachkin 2016-10-04 23:44 trunk
Commit 182adc0290305cc16f58f4d5b64deae34f4e89a3
1 file changed +16 -11
+16 -11
--- src/unversioned.c
+++ src/unversioned.c
@@ -227,35 +227,40 @@
227227
**
228228
** edit FILE Bring up FILE in a text editor for modification.
229229
**
230230
** export FILE OUTPUT Write the content of FILE into OUTPUT on disk
231231
**
232
-** list | ls Show all unversioned files held in the local repository.
232
+** list | ls Show all unversioned files held in the local
233
+** repository.
233234
**
234
-** revert ?URL? Restore the state of all unversioned files in the local
235
-** repository to match the remote repository URL.
235
+** revert ?URL? Restore the state of all unversioned files in the
236
+** local repository to match the remote repository
237
+** URL.
238
+**
236239
** Options:
237240
** -v|--verbose Extra diagnostic output
238241
** -n|--dryrun Show what would have happened
239242
**
240
-** rm FILE ... Remove an unversioned files from the local repository.
243
+** remove | rm FILE ... Remove unversioned files from the local repository.
241244
** Changes are not pushed to other repositories until
242
-** the next sync.
245
+** the next sync.
243246
**
244247
** sync ?URL? Synchronize the state of all unversioned files with
245
-** the remote repository URL. The most recent version of
246
-** each file is propagate to all repositories and all
247
-** prior versions are permanently forgotten.
248
+** the remote repository URL. The most recent version
249
+** of each file is propagate to all repositories and
250
+** all prior versions are permanently forgotten.
251
+**
248252
** Options:
249253
** -v|--verbose Extra diagnostic output
250254
** -n|--dryrun Show what would have happened
251255
**
252256
** touch FILE ... Update the TIMESTAMP on all of the listed files
253257
**
254258
** Options:
255259
**
256
-** --mtime TIMESTAMP Use TIMESTAMP instead of "now" for "add" and "rm".
260
+** --mtime TIMESTAMP Use TIMESTAMP instead of "now" for the "add",
261
+** "edit", and "remove" subcommands.
257262
*/
258263
void unversioned_cmd(void){
259264
const char *zCmd;
260265
int nCmd;
261266
const char *zMtime = find_option("mtime", 0, 1);
@@ -405,11 +410,11 @@
405410
}else if( memcmp(zCmd, "revert", nCmd)==0 ){
406411
unsigned syncFlags = unversioned_sync_flags(SYNC_UNVERSIONED|SYNC_UV_REVERT);
407412
g.argv[1] = "sync";
408413
g.argv[2] = "--uv-noop";
409414
sync_unversioned(syncFlags);
410
- }else if( memcmp(zCmd, "rm", nCmd)==0 ){
415
+ }else if( memcmp(zCmd, "remove", nCmd)==0 || memcmp(zCmd, "rm", nCmd)==0 ){
411416
int i;
412417
verify_all_options();
413418
db_begin_transaction();
414419
for(i=3; i<g.argc; i++){
415420
db_multi_exec(
@@ -436,11 +441,11 @@
436441
);
437442
}
438443
db_unset("uv-hash", 0);
439444
db_end_transaction(0);
440445
}else{
441
- usage("add|cat|edit|export|ls|revert|rm|sync|touch");
446
+ usage("add|cat|edit|export|list|revert|remove|sync|touch");
442447
}
443448
}
444449
445450
/*
446451
** WEBPAGE: uvlist
447452
--- src/unversioned.c
+++ src/unversioned.c
@@ -227,35 +227,40 @@
227 **
228 ** edit FILE Bring up FILE in a text editor for modification.
229 **
230 ** export FILE OUTPUT Write the content of FILE into OUTPUT on disk
231 **
232 ** list | ls Show all unversioned files held in the local repository.
 
233 **
234 ** revert ?URL? Restore the state of all unversioned files in the local
235 ** repository to match the remote repository URL.
 
 
236 ** Options:
237 ** -v|--verbose Extra diagnostic output
238 ** -n|--dryrun Show what would have happened
239 **
240 ** rm FILE ... Remove an unversioned files from the local repository.
241 ** Changes are not pushed to other repositories until
242 ** the next sync.
243 **
244 ** sync ?URL? Synchronize the state of all unversioned files with
245 ** the remote repository URL. The most recent version of
246 ** each file is propagate to all repositories and all
247 ** prior versions are permanently forgotten.
 
248 ** Options:
249 ** -v|--verbose Extra diagnostic output
250 ** -n|--dryrun Show what would have happened
251 **
252 ** touch FILE ... Update the TIMESTAMP on all of the listed files
253 **
254 ** Options:
255 **
256 ** --mtime TIMESTAMP Use TIMESTAMP instead of "now" for "add" and "rm".
 
257 */
258 void unversioned_cmd(void){
259 const char *zCmd;
260 int nCmd;
261 const char *zMtime = find_option("mtime", 0, 1);
@@ -405,11 +410,11 @@
405 }else if( memcmp(zCmd, "revert", nCmd)==0 ){
406 unsigned syncFlags = unversioned_sync_flags(SYNC_UNVERSIONED|SYNC_UV_REVERT);
407 g.argv[1] = "sync";
408 g.argv[2] = "--uv-noop";
409 sync_unversioned(syncFlags);
410 }else if( memcmp(zCmd, "rm", nCmd)==0 ){
411 int i;
412 verify_all_options();
413 db_begin_transaction();
414 for(i=3; i<g.argc; i++){
415 db_multi_exec(
@@ -436,11 +441,11 @@
436 );
437 }
438 db_unset("uv-hash", 0);
439 db_end_transaction(0);
440 }else{
441 usage("add|cat|edit|export|ls|revert|rm|sync|touch");
442 }
443 }
444
445 /*
446 ** WEBPAGE: uvlist
447
--- src/unversioned.c
+++ src/unversioned.c
@@ -227,35 +227,40 @@
227 **
228 ** edit FILE Bring up FILE in a text editor for modification.
229 **
230 ** export FILE OUTPUT Write the content of FILE into OUTPUT on disk
231 **
232 ** list | ls Show all unversioned files held in the local
233 ** repository.
234 **
235 ** revert ?URL? Restore the state of all unversioned files in the
236 ** local repository to match the remote repository
237 ** URL.
238 **
239 ** Options:
240 ** -v|--verbose Extra diagnostic output
241 ** -n|--dryrun Show what would have happened
242 **
243 ** remove | rm FILE ... Remove unversioned files from the local repository.
244 ** Changes are not pushed to other repositories until
245 ** the next sync.
246 **
247 ** sync ?URL? Synchronize the state of all unversioned files with
248 ** the remote repository URL. The most recent version
249 ** of each file is propagate to all repositories and
250 ** all prior versions are permanently forgotten.
251 **
252 ** Options:
253 ** -v|--verbose Extra diagnostic output
254 ** -n|--dryrun Show what would have happened
255 **
256 ** touch FILE ... Update the TIMESTAMP on all of the listed files
257 **
258 ** Options:
259 **
260 ** --mtime TIMESTAMP Use TIMESTAMP instead of "now" for the "add",
261 ** "edit", and "remove" subcommands.
262 */
263 void unversioned_cmd(void){
264 const char *zCmd;
265 int nCmd;
266 const char *zMtime = find_option("mtime", 0, 1);
@@ -405,11 +410,11 @@
410 }else if( memcmp(zCmd, "revert", nCmd)==0 ){
411 unsigned syncFlags = unversioned_sync_flags(SYNC_UNVERSIONED|SYNC_UV_REVERT);
412 g.argv[1] = "sync";
413 g.argv[2] = "--uv-noop";
414 sync_unversioned(syncFlags);
415 }else if( memcmp(zCmd, "remove", nCmd)==0 || memcmp(zCmd, "rm", nCmd)==0 ){
416 int i;
417 verify_all_options();
418 db_begin_transaction();
419 for(i=3; i<g.argc; i++){
420 db_multi_exec(
@@ -436,11 +441,11 @@
441 );
442 }
443 db_unset("uv-hash", 0);
444 db_end_transaction(0);
445 }else{
446 usage("add|cat|edit|export|list|revert|remove|sync|touch");
447 }
448 }
449
450 /*
451 ** WEBPAGE: uvlist
452

Keyboard Shortcuts

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