Behavior of 'rm' and 'mv' under bazaar
Eric Siegerman
lists08-bzr at davor.org
Thu Sep 30 07:24:23 BST 2010
On Thu, 2010-09-30 at 11:09 +1000, Ben Finney wrote:
> That's right. An OS-level ‘rm’ or ‘mv’ is just another change Bazaar
> will track; if you ‘bzr status’ then you'll see Bazaar notices when
> files aren't there any more, and will record that fact when you
commit.
For "rm" that's fine, but for "mv" it's better to tell bzr about
it explicitly. If you don't, bzr loses track of the fact that
the old and new names refer to (different revisions of) the same
file; thus, it can't do diffs, merges, etc. across the rename.
As Ben alludes to later, you can either "bzr mv oldname newname"
to have bzr move the file; or move it yourself and then tell bzr
about it after the fact, using "bzr mv --after oldname newname".
The latter is especially useful if your IDE moves files around,
e.g. during automated refactorings.
- Eric
More information about the bazaar
mailing list