Restoring history of a "bzr remove"d file

Matthew D. Fuller fullermd at over-yonder.net
Sun Feb 6 04:16:11 UTC 2011


On Sun, Feb 06, 2011 at 06:00:44AM +0200 I heard the voice of
Eli Zaretskii, and lo! it spake thus:
> 
> Will "bzr revert" have this effect?  I was under the impression that
> it only restores the file's contents, but not its history.

It reverts 'state', and part of that state would be the file-id.  So it
would do what you're asking AFAICS.

Quick hackup example:

% bzr flog -v --show-ids
    1 Matthew Fuller    2011-02-05
      revision-id:fullermd at over-yonder.net-20110206041349-8r72xg9y0wgbsfgr
      add
      A  foo                            foo-20110206041347-58zskz2fmhw3qrgo-1

    2 Matthew Fuller    2011-02-05
      revision-id:fullermd at over-yonder.net-20110206041351-8aru9d39fqz9jqqc
      rm
      D  foo                            foo-20110206041347-58zskz2fmhw3qrgo-1

    3 Matthew Fuller    2011-02-05
      revision-id:fullermd at over-yonder.net-20110206041358-vji30303p82siti6
      revert 1
      A  foo                            foo-20110206041347-58zskz2fmhw3qrgo-1


I setup to commit 3 just via:

% bzr revert -r1 foo
+N  foo

and note that it keeps the same file-id.


-- 
Matthew Fuller     (MF4839)   |  fullermd at over-yonder.net
Systems/Network Administrator |  http://www.over-yonder.net/~fullermd/
           On the Internet, nobody can hear you scream.



More information about the bazaar mailing list