Restoring history of a "bzr remove"d file
Forest Bond
forest at alittletooquiet.net
Sat Feb 5 13:44:04 UTC 2011
Hi,
On Sat, Feb 05, 2011 at 03:32:02PM +0200, Eli Zaretskii wrote:
> > Date: Sat, 5 Feb 2011 07:54:26 -0500
> > From: Forest Bond <forest at alittletooquiet.net>
> > Cc: bazaar at lists.canonical.com
> > Jabber-ID: forestatq at jabber.org
> >
> > bzr merge -r R1..R2 old-path
> > rm new-path # OR bzr merge --force -r R1..R2 new-path
> > bzr mv old-path new-path
> > bzr commit
Sorry, "rm new-path" is not sufficient, you have to do "bzr rm new-path".
> Thanks. But would old-path exist without "bzr revert"? That is,
> would "bzr merge" reintroduce it in its old place and remove it in its
> new place?
It would if R1 > R2 (i.e. you are doing a reverse merge) since that would merge
the old revision contents in and old-path exists in the older revision.
E.g. Fixing move of "foo" to "bar" without disrupting baz:
bzr init
echo foo >foo; bzr add foo
bzr commit -m 'add foo'
echo bar >bar; bzr add bar
echo baz >baz; bzr add baz
bzr rm foo
bzr commit -m 'add bar and baz, remove foo'
bzr merge -r 2..1 foo
bzr rm bar
bzr mv foo bar
bzr commit -m 'fix move of foo to bar'
-Forest
--
Forest Bond
http://www.alittletooquiet.net
http://www.pytagsfs.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/bazaar/attachments/20110205/30380f85/attachment.pgp>
More information about the bazaar
mailing list