[MERGE][bug #177855] ``bzr reconcile`` fixes invalid branch history
Ian Clatworthy
ian.clatworthy at internode.on.net
Wed Apr 30 13:22:41 BST 2008
John Arbash Meinel wrote:
> We had several repeated bug reports about branches with non-canonical
> histories.
> The attached batch implements a Branch.reconcile() which can fix this, and
> updates Branch.check() to look for it.
bb: tweak
The docstring for reconcile() in reconcile.py needs to have
fixed_branch_history added as an attribute.
> + def _reconcile_branch(self):
> + try:
> + self.branch = self.bzrdir.open_branch()
> + except errors.NotBranchError:
> + # Nothing to check here
> + return
> + self.pb.note('Reconciling branch %s',
> + self.branch.base)
> + branch_reconciler = self.branch.reconcile(thorough=True)
> + self.fixed_branch_history = branch_reconciler.fixed_history
self.fixed_branch_history should be set to None (or False if you prefer)
in the except clause.
> + @needs_write_lock
> + def reconcile(self, thorough=True):
> + """Make sure the data stored in this branch is consistent."""
> + """Reconcile this repository."""
The """Reconcile this repository.""" line looks like a cut-and-paste
buglet and should go.
Ian C.
More information about the bazaar
mailing list