Fossil

View Ticket
Login
2009-10-16
09:40 Ticket [b7fc3f0569] fossil clean --force doesn't empty remove directories status still Open with 1 other change artifact: 3429dabdc2 user: anonymous
2009-10-15
07:54 Ticket [b7fc3f0569]: 5 changes artifact: 3f0f79ac6f user: anonymous
2009-10-11
21:30
Update documentation for "clean" command. Ticket [c3d668ad52]. check-in: 25ede6e369 user: dmitry tags: trunk
20:29 Ticket [c3d668ad52] "clean" command has an option --all, but documentation says it's --force status still Fixed with 1 other change artifact: 8c7350ea85 user: anonymous
19:53 Fixed ticket [c3d668ad52]. artifact: f53de0ceaf user: drh
19:52
Fix the "clean" command to use --force instead of --all. Ticket [c3d668ad52] check-in: 5308e46815 user: drh tags: trunk
18:51 New ticket [c3d668ad52] "clean" command has an option --all, but documentation says it's --force. artifact: 86859cb831 user: anonymous

Ticket Hash: c3d668ad5286f0e780b47c54449314beea5edca2
Title: "clean" command has an option --all, but documentation says it's --force
Status: Fixed Type: Code_Defect
Severity: Priority:
Subsystem: Resolution: Fixed
Last Modified: 2009-10-11 20:29:39
16.47 years ago
Created: 2009-10-11 18:51:15
16.47 years ago
Version Found In: b99aa66d1f
Description:
Either documentation or code is wrong about the "clean" command option to disable prompt before removing files.

Documentation says:

$ fossil help clean
Usage: fossil clean ?--force? ?--dotfiles?
...
You will be prompted before removing each file. If you are
sure you wish to remove all "extra" files you can specify the
optional --force flag and no prmpts will be issued.

However, --force doesn't work (Fossil asks before removing files). Code in checkin.c ([2e4a6e1c0f]) says it wants "--all" option:

  allFlag = find_option("all","a",0)!=0;

And "--all" option actually works.

So either code or documentation needs to be updated.


drh added on 2009-10-11 19:53:14:
Check-in [5308e468153]


anonymous added on 2009-10-11 20:29:39:
Thanks!

Also, here's an update for www/reference.wiki, since it has the old -all option and lacked --dotfiles.

--- www/reference.wiki
+++ www/reference.wiki
@@ -214,18 +214,22 @@
     unless the "--nosign" options is used.  All files that have
     changed will be committed unless some subset of files is specified
     on the command line.
 
 <hr><a href="#tof">&#710;</a>
-    <a name="clean">Usage: </a><a href="cmd_clean.wiki">fossil clean</a> ?-all?
+    <a name="clean">Usage: </a><a href="cmd_clean.wiki">fossil clean</a> ?--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.
 
 <hr><a href="#tof">&#710;</a>
     <a name="clone">Usage: </a><a href="cmd_clone.wiki">fossil clone</a> URL FILENAME
     Make a clone of a repository specified by URL in the local
     file named FILENAME.