Mercurial > hg
changeset 9150:09a1ee498756
localrepo: add destroyed() method for strip/rollback to use (issue548).
author | Greg Ward <greg-hg@gerg.ca> |
---|---|
date | Thu, 16 Jul 2009 10:39:41 -0400 |
parents | abb7d4d43a5f |
children | f528d1a93491 |
files | mercurial/localrepo.py mercurial/repair.py |
diffstat | 2 files changed, 12 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/localrepo.py Thu Jul 16 10:39:41 2009 -0400 +++ b/mercurial/localrepo.py Thu Jul 16 10:39:41 2009 -0400 @@ -612,6 +612,7 @@ % encoding.tolocal(self.dirstate.branch())) self.invalidate() self.dirstate.invalidate() + self.destroyed() else: self.ui.warn(_("no rollback information available\n")) finally: @@ -910,6 +911,16 @@ del tr lock.release() + def destroyed(self): + '''Inform the repository that nodes have been destroyed. + Intended for use by strip and rollback, so there's a common + place for anything that has to be done after destroying history.''' + # Do nothing for now: this is a placeholder that will be used + # when we add tag caching. + # XXX it might be nice if we could take the list of destroyed + # nodes, but I don't see an easy way for rollback() to do that + pass + def walk(self, match, node=None): ''' walk recursively through the directory tree or a given