Fossil SCM
Add 'unversioned remove' as an alias for 'unversioned rm'. Update and improve help text.
Commit
182adc0290305cc16f58f4d5b64deae34f4e89a3
Parent
b045d0774ed4893…
1 file changed
+16
-11
+16
-11
| --- src/unversioned.c | ||
| +++ src/unversioned.c | ||
| @@ -227,35 +227,40 @@ | ||
| 227 | 227 | ** |
| 228 | 228 | ** edit FILE Bring up FILE in a text editor for modification. |
| 229 | 229 | ** |
| 230 | 230 | ** export FILE OUTPUT Write the content of FILE into OUTPUT on disk |
| 231 | 231 | ** |
| 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. | |
| 233 | 234 | ** |
| 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 | +** | |
| 236 | 239 | ** Options: |
| 237 | 240 | ** -v|--verbose Extra diagnostic output |
| 238 | 241 | ** -n|--dryrun Show what would have happened |
| 239 | 242 | ** |
| 240 | -** rm FILE ... Remove an unversioned files from the local repository. | |
| 243 | +** remove | rm FILE ... Remove unversioned files from the local repository. | |
| 241 | 244 | ** Changes are not pushed to other repositories until |
| 242 | -** the next sync. | |
| 245 | +** the next sync. | |
| 243 | 246 | ** |
| 244 | 247 | ** 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 | +** | |
| 248 | 252 | ** Options: |
| 249 | 253 | ** -v|--verbose Extra diagnostic output |
| 250 | 254 | ** -n|--dryrun Show what would have happened |
| 251 | 255 | ** |
| 252 | 256 | ** touch FILE ... Update the TIMESTAMP on all of the listed files |
| 253 | 257 | ** |
| 254 | 258 | ** Options: |
| 255 | 259 | ** |
| 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. | |
| 257 | 262 | */ |
| 258 | 263 | void unversioned_cmd(void){ |
| 259 | 264 | const char *zCmd; |
| 260 | 265 | int nCmd; |
| 261 | 266 | const char *zMtime = find_option("mtime", 0, 1); |
| @@ -405,11 +410,11 @@ | ||
| 405 | 410 | }else if( memcmp(zCmd, "revert", nCmd)==0 ){ |
| 406 | 411 | unsigned syncFlags = unversioned_sync_flags(SYNC_UNVERSIONED|SYNC_UV_REVERT); |
| 407 | 412 | g.argv[1] = "sync"; |
| 408 | 413 | g.argv[2] = "--uv-noop"; |
| 409 | 414 | sync_unversioned(syncFlags); |
| 410 | - }else if( memcmp(zCmd, "rm", nCmd)==0 ){ | |
| 415 | + }else if( memcmp(zCmd, "remove", nCmd)==0 || memcmp(zCmd, "rm", nCmd)==0 ){ | |
| 411 | 416 | int i; |
| 412 | 417 | verify_all_options(); |
| 413 | 418 | db_begin_transaction(); |
| 414 | 419 | for(i=3; i<g.argc; i++){ |
| 415 | 420 | db_multi_exec( |
| @@ -436,11 +441,11 @@ | ||
| 436 | 441 | ); |
| 437 | 442 | } |
| 438 | 443 | db_unset("uv-hash", 0); |
| 439 | 444 | db_end_transaction(0); |
| 440 | 445 | }else{ |
| 441 | - usage("add|cat|edit|export|ls|revert|rm|sync|touch"); | |
| 446 | + usage("add|cat|edit|export|list|revert|remove|sync|touch"); | |
| 442 | 447 | } |
| 443 | 448 | } |
| 444 | 449 | |
| 445 | 450 | /* |
| 446 | 451 | ** WEBPAGE: uvlist |
| 447 | 452 |
| --- 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 |