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.

drh 2011-03-04 13:19 trunk
Commit c92ec16f819eeee6e4a886a6292fdce3a83eee22
1 file changed +11 -2
+11 -2
--- src/rebuild.c
+++ src/rebuild.c
@@ -630,11 +630,16 @@
630630
int bForce = find_option("force", "f", 0)!=0;
631631
int privateOnly = find_option("private",0,0)!=0;
632632
int bNeedRebuild = 0;
633633
if( g.argc!=2 && g.argc!=3 ) usage("?REPOSITORY?");
634634
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);
636641
}else{
637642
db_open_repository(g.argv[2]);
638643
}
639644
if( !bForce ){
640645
Blob ans;
@@ -780,11 +785,15 @@
780785
}
781786
782787
/*
783788
** COMMAND: deconstruct
784789
**
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
786795
**
787796
** This command exports all artifacts of a given repository and
788797
** writes all artifacts to the file system. The DESTINATION directory
789798
** will be populated with subdirectories AA and files AA/BBBBBBBBB.., where
790799
** AABBBBBBBBB.. is the 40 character artifact ID, AA the first 2 characters.
791800
--- 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

Keyboard Shortcuts

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