Diff
Not logged in

Differences From:

File src/allrepo.c part of check-in [4f0f992245] - Add missing 'rebuild' subcommand suggestion for command 'fossil all' subcommands. by bharder on 2009-01-29 02:57:37. [view]

To:

File src/allrepo.c part of check-in [7a2c37063a] - merge trunk into creole branch by bob on 2009-09-22 07:49:39. Also file src/allrepo.c part of check-in [0eb08b860c] - Change more system() calls into portable_system() in an effort to fix path quoting problems on windows. by drh on 2009-09-16 21:29:18. [view]

@@ -56,16 +56,18 @@
 
 /*
 ** COMMAND: all
 **
-** Usage: %fossil all (list|pull|push|rebuild|sync)
+** Usage: %fossil all (list|ls|pull|push|rebuild|sync)
 **
 ** The ~/.fossil file records the location of all repositories for a
 ** user.  This command performs certain operations on all repositories
 ** that can be useful before or after a period of disconnection operation.
 ** Available operations are:
 **
 **    list       Display the location of all repositories
+**
+**    ls         An alias for "list"
 **
 **    pull       Run a "pull" operation on all repositories
 **
 **    push       Run a "push" on all repositories
@@ -87,14 +89,16 @@
   char *zQFilename;
   int nMissing;
 
   if( g.argc<3 ){
-    usage("list|pull|push|rebuild|sync");
+    usage("list|ls|pull|push|rebuild|sync");
   }
   n = strlen(g.argv[2]);
-  db_open_config();
+  db_open_config(1);
   zCmd = g.argv[2];
   if( strncmp(zCmd, "list", n)==0 ){
+    zCmd = "list";
+  }else if( strncmp(zCmd, "ls", n)==0 ){ /* alias for "list" above */
     zCmd = "list";
   }else if( strncmp(zCmd, "push", n)==0 ){
     zCmd = "push -autourl -R";
   }else if( strncmp(zCmd, "pull", n)==0 ){
@@ -104,9 +108,9 @@
   }else if( strncmp(zCmd, "sync", n)==0 ){
     zCmd = "sync -autourl -R";
   }else{
     fossil_fatal("\"all\" subcommand should be one of: "
-                 "list push pull rebuild sync");
+                 "list ls push pull rebuild sync");
   }
   zFossil = quoteFilename(g.argv[0]);
   nMissing = 0;
   db_prepare(&q, "SELECT substr(name, 6) FROM global_config"
@@ -124,9 +128,9 @@
     zQFilename = quoteFilename(zFilename);
     zSyscmd = mprintf("%s %s %s", zFossil, zCmd, zQFilename);
     printf("%s\n", zSyscmd);
     fflush(stdout);
-    system(zSyscmd);
+    portable_system(zSyscmd);
     free(zSyscmd);
     free(zQFilename);
   }