Fossil SCM
Fix the "scrub" command so that it works from within a checkout without having to specify the repository. Ticket [77c58e1415e06fd]. Also fix help text for the "deconstruct" command.
Commit
c92ec16f819eeee6e4a886a6292fdce3a83eee22
Parent
2985120d93c5fa7…
1 file changed
+11
-2
+11
-2
| --- src/rebuild.c | ||
| +++ src/rebuild.c | ||
| @@ -630,11 +630,16 @@ | ||
| 630 | 630 | int bForce = find_option("force", "f", 0)!=0; |
| 631 | 631 | int privateOnly = find_option("private",0,0)!=0; |
| 632 | 632 | int bNeedRebuild = 0; |
| 633 | 633 | if( g.argc!=2 && g.argc!=3 ) usage("?REPOSITORY?"); |
| 634 | 634 | if( g.argc==2 ){ |
| 635 | - db_must_be_within_tree(); | |
| 635 | + db_find_and_open_repository(OPEN_ANY_SCHEMA, 0); | |
| 636 | + if( g.argc!=2 ){ | |
| 637 | + usage("?REPOSITORY-FILENAME?"); | |
| 638 | + } | |
| 639 | + db_close(1); | |
| 640 | + db_open_repository(g.zRepositoryName); | |
| 636 | 641 | }else{ |
| 637 | 642 | db_open_repository(g.argv[2]); |
| 638 | 643 | } |
| 639 | 644 | if( !bForce ){ |
| 640 | 645 | Blob ans; |
| @@ -780,11 +785,15 @@ | ||
| 780 | 785 | } |
| 781 | 786 | |
| 782 | 787 | /* |
| 783 | 788 | ** COMMAND: deconstruct |
| 784 | 789 | ** |
| 785 | -** Usage %fossil deconstruct ?-R|--repository REPOSITORY? ?-L|--prefixlength N? DESTINATION | |
| 790 | +** Usage %fossil deconstruct ?OPTIONS? DESTIONATION | |
| 791 | +** | |
| 792 | +** Options: | |
| 793 | +** -R|--repository REPOSITORY | |
| 794 | +** -L|--prefixlength N | |
| 786 | 795 | ** |
| 787 | 796 | ** This command exports all artifacts of a given repository and |
| 788 | 797 | ** writes all artifacts to the file system. The DESTINATION directory |
| 789 | 798 | ** will be populated with subdirectories AA and files AA/BBBBBBBBB.., where |
| 790 | 799 | ** AABBBBBBBBB.. is the 40 character artifact ID, AA the first 2 characters. |
| 791 | 800 |
| --- src/rebuild.c | |
| +++ src/rebuild.c | |
| @@ -630,11 +630,16 @@ | |
| 630 | int bForce = find_option("force", "f", 0)!=0; |
| 631 | int privateOnly = find_option("private",0,0)!=0; |
| 632 | int bNeedRebuild = 0; |
| 633 | if( g.argc!=2 && g.argc!=3 ) usage("?REPOSITORY?"); |
| 634 | if( g.argc==2 ){ |
| 635 | db_must_be_within_tree(); |
| 636 | }else{ |
| 637 | db_open_repository(g.argv[2]); |
| 638 | } |
| 639 | if( !bForce ){ |
| 640 | Blob ans; |
| @@ -780,11 +785,15 @@ | |
| 780 | } |
| 781 | |
| 782 | /* |
| 783 | ** COMMAND: deconstruct |
| 784 | ** |
| 785 | ** Usage %fossil deconstruct ?-R|--repository REPOSITORY? ?-L|--prefixlength N? DESTINATION |
| 786 | ** |
| 787 | ** This command exports all artifacts of a given repository and |
| 788 | ** writes all artifacts to the file system. The DESTINATION directory |
| 789 | ** will be populated with subdirectories AA and files AA/BBBBBBBBB.., where |
| 790 | ** AABBBBBBBBB.. is the 40 character artifact ID, AA the first 2 characters. |
| 791 |
| --- src/rebuild.c | |
| +++ src/rebuild.c | |
| @@ -630,11 +630,16 @@ | |
| 630 | int bForce = find_option("force", "f", 0)!=0; |
| 631 | int privateOnly = find_option("private",0,0)!=0; |
| 632 | int bNeedRebuild = 0; |
| 633 | if( g.argc!=2 && g.argc!=3 ) usage("?REPOSITORY?"); |
| 634 | if( g.argc==2 ){ |
| 635 | db_find_and_open_repository(OPEN_ANY_SCHEMA, 0); |
| 636 | if( g.argc!=2 ){ |
| 637 | usage("?REPOSITORY-FILENAME?"); |
| 638 | } |
| 639 | db_close(1); |
| 640 | db_open_repository(g.zRepositoryName); |
| 641 | }else{ |
| 642 | db_open_repository(g.argv[2]); |
| 643 | } |
| 644 | if( !bForce ){ |
| 645 | Blob ans; |
| @@ -780,11 +785,15 @@ | |
| 785 | } |
| 786 | |
| 787 | /* |
| 788 | ** COMMAND: deconstruct |
| 789 | ** |
| 790 | ** Usage %fossil deconstruct ?OPTIONS? DESTIONATION |
| 791 | ** |
| 792 | ** Options: |
| 793 | ** -R|--repository REPOSITORY |
| 794 | ** -L|--prefixlength N |
| 795 | ** |
| 796 | ** This command exports all artifacts of a given repository and |
| 797 | ** writes all artifacts to the file system. The DESTINATION directory |
| 798 | ** will be populated with subdirectories AA and files AA/BBBBBBBBB.., where |
| 799 | ** AABBBBBBBBB.. is the 40 character artifact ID, AA the first 2 characters. |
| 800 |