# HG changeset patch # User Greg Ward # Date 2011-12-01 22:39:30 # Node ID b8d8599410dac7a757b059e30f1053e55e77fb3f # Parent 2f2ca019569feddfc39eae4f1cda0b3da62d4e00 rollback: always call destroyed() (regression from 1.9) The contract for repo.destroyed() is that it is called whenever changesets are destroyed, either by strip or by rollback. That contract was inadvertently broken in 7c26ce9edbd2, when we made a chunk of code conditional on destroying one of the working dir's parents. Oops: it doesn't matter *which* changesets are destroyed or what their relationship is to the working dir, we should call repo.destroyed() whenever we destroy changesets. diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py --- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -820,7 +820,6 @@ class localrepository(repo.repository): % self.dirstate.branch()) self.dirstate.invalidate() - self.destroyed() parents = tuple([p.rev() for p in self.parents()]) if len(parents) > 1: ui.status(_('working directory now based on ' @@ -828,6 +827,7 @@ class localrepository(repo.repository): else: ui.status(_('working directory now based on ' 'revision %d\n') % parents) + self.destroyed() return 0 def invalidatecaches(self):