[PATCH 0 of 3] Add a 'forget' command for untracking files

Steve Losh steve at stevelosh.com
Sun May 31 18:38:48 UTC 2009


This patch adds a new top-level command: 'forget'.  This command does exactly what 'hg remove -Af' does: it untracks files without deleting them.

Why implement a new command?  Because the options of 'hg remove' are confusing and non-intuitive.  If -A only removes deleted files, and -f forces deletion, why should using both do *the opposite of both of them*?

The forget command is meant to be a simple way to say: "stop tracking this file, but don't delete it from the disk" without needing to look up which 'hg remove' options you need in a table.

The unit tests have been updated to take the new command into account when displaying help, and a new test has been added to test forget's functionality.

This is my first time sending a patch, so if I did something wrong or forgot to do something please let me know!

These changes are also in a repository on BitBucket, if you prefer pulling over patching from email: http://bitbucket.org/sjl/hg-crew-sjl/


More information about the Mercurial-devel mailing list