Restoring history of a "bzr remove"d file

Eli Zaretskii eliz at gnu.org
Sat Feb 5 11:09:47 UTC 2011


Recently, someone made a mistake in Emacs development: instead of
using "bzr mv" to move a file to another directory, she used "bzr rm"
followed by "bzr add" in the new directory.  This effectively lost all
the history of the file prior to that.

To restore the lost history, the following procedure was used:

  . Reverse cherry-pick (with "bzr merge -r R1..R2") the offending
    revisions.
  . "bzr revert" everything except the file that was moved.
  . "bzr rm" the file in its new directory.
  . "bzr mv" the file from the old to the new directory.
  . "bzr commit"

The problem is with the second step: it needs to manually specify a
potentially long list of files, gleaned from "bzr status" or some
such.

Is there a better way of doing the above?

TIA



More information about the bazaar mailing list