Diff
Not logged in

Differences From:

File src/checkin.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]

To:

File src/checkin.c part of check-in [7a2c37063a] - merge trunk into creole branch by bob on 2009-09-22 07:49:39. Also file src/checkin.c part of check-in [a2749215b7] - Add the --dotfiles option to the "extra" and "clean" commands. Ticket 4de876322f066. by drh on 2009-09-19 15:32:14. [view]

@@ -165,23 +165,27 @@
 }
 
 /*
 ** COMMAND: extras
-** Usage: %fossil extras
+** Usage: %fossil extras ?--dotfiles?
 **
 ** Print a list of all files in the source tree that are not part of
 ** the current checkout.  See also the "clean" command.
+**
+** Files and subdirectories whose names begin with "." are normally
+** ignored but can be included by adding the --dotfiles option.
 */
 void extra_cmd(void){
   Blob path;
   Blob repo;
   Stmt q;
   int n;
+  int allFlag = find_option("dotfiles",0,0)!=0;
   db_must_be_within_tree();
   db_multi_exec("CREATE TEMP TABLE sfile(x TEXT PRIMARY KEY)");
   n = strlen(g.zLocalRoot);
   blob_init(&path, g.zLocalRoot, n-1);
-  vfile_scan(0, &path, blob_size(&path));
+  vfile_scan(0, &path, blob_size(&path), allFlag);
   db_prepare(&q,
       "SELECT x FROM sfile"
       " WHERE x NOT IN ('manifest','manifest.uuid','_FOSSIL_')"
       " ORDER BY 1");
@@ -195,29 +199,35 @@
 }
 
 /*
 ** COMMAND: clean
-** Usage: %fossil clean ?-all?
+** Usage: %fossil clean ?--force? ?--dotfiles?
 **
 ** Delete all "extra" files in the source tree.  "Extra" files are
 ** files that are not officially part of the checkout.  See also
 ** the "extra" command. This operation cannot be undone.
 **
 ** You will be prompted before removing each file. If you are
 ** sure you wish to remove all "extra" files you can specify the
-** optional -all flag.
+** optional --force flag and no prmpts will be issued.
+**
+** Files and subdirectories whose names begin with "." are
+** normally ignored.  They are included if the "--dotfiles" option
+** is used.
 */
 void clean_cmd(void){
   int allFlag;
+  int dotfilesFlag;
   Blob path, repo;
   Stmt q;
   int n;
   allFlag = find_option("all","a",0)!=0;
+  dotfilesFlag = find_option("dotfiles",0,0)!=0;
   db_must_be_within_tree();
   db_multi_exec("CREATE TEMP TABLE sfile(x TEXT PRIMARY KEY)");
   n = strlen(g.zLocalRoot);
   blob_init(&path, g.zLocalRoot, n-1);
-  vfile_scan(0, &path, blob_size(&path));
+  vfile_scan(0, &path, blob_size(&path), dotfilesFlag);
   db_prepare(&q,
       "SELECT %Q || x FROM sfile"
       " WHERE x NOT IN ('manifest','manifest.uuid','_FOSSIL_')"
       " ORDER BY 1", g.zLocalRoot);