How can I remove all unversioned files from a Bazaar workspace? I'm looking to do the equivalent of hg purge --all
or git clean -fd
.
views:
215answers:
3
+5
A:
I've seen this only in BzrTools -- http://wiki.bazaar.canonical.com/BzrTools, as the cleen-tree command.
Kornel Kisielewicz
2009-12-31 01:46:18
It was installed by default in a virgin copy of Bazaar 2.0, so its functionality has apparently been merged. That said, I'm disappointed that "bzr help" didn't show that command, or anything about it.
Benjamin Pollack
2009-12-31 01:49:59
Actually command named `clean-tree.` If you have `bzrtools` plugin installed you'll see this command in the output of `bzr help commands`. To check is you have `bzrtools` plugin installed run `bzr plugins` command.
bialix
2009-12-31 07:52:25
According to `bzr plugins`, I do not have `bzrtools` installed; just `netrc_credential_store` and `launchpad`. According to `bzr help`, I have no `clean-tree` command. Yet `bzr help clean-tree` shows me the help for `clean-tree`, and executing `bzr clean-tree` works just fine. So, while I'm happy, the above information is either out-of-date or confused, as near as I can tell.
Benjamin Pollack
2009-12-31 16:55:12
+3
A:
Benjamin Pollack said:
According to bzr help, I have no clean-tree command. Yet bzr help clean-tree shows me the help for clean-tree, and executing bzr clean-tree works just fine.
bzr help
only shows a summary of the most commonly used commands. To see all available commands, use bzr help commands
.
(Sorry to answer instead of comment ... I don't have sufficient reputation yet)
Adam Glauser
2010-01-04 13:36:15
A:
I wrote a bash one liner for this:
rm -i $(bzr status -S | grep "^?" | cut -d ? -f 2- )
Taurus Olson
2010-10-11 13:05:48