##// END OF EJS Templates
localrepo: add destroyed() method for strip/rollback to use (issue548).
Greg Ward -
r9150:09a1ee49 default
parent child Browse files
Show More
@@ -612,6 +612,7 b' class localrepository(repo.repository):'
612 612 % encoding.tolocal(self.dirstate.branch()))
613 613 self.invalidate()
614 614 self.dirstate.invalidate()
615 self.destroyed()
615 616 else:
616 617 self.ui.warn(_("no rollback information available\n"))
617 618 finally:
@@ -910,6 +911,16 b' class localrepository(repo.repository):'
910 911 del tr
911 912 lock.release()
912 913
914 def destroyed(self):
915 '''Inform the repository that nodes have been destroyed.
916 Intended for use by strip and rollback, so there's a common
917 place for anything that has to be done after destroying history.'''
918 # Do nothing for now: this is a placeholder that will be used
919 # when we add tag caching.
920 # XXX it might be nice if we could take the list of destroyed
921 # nodes, but I don't see an easy way for rollback() to do that
922 pass
923
913 924 def walk(self, match, node=None):
914 925 '''
915 926 walk recursively through the directory tree or a given
@@ -142,3 +142,4 b' def strip(ui, repo, node, backup="all"):'
142 142 if backup != "strip":
143 143 os.unlink(chgrpfile)
144 144
145 repo.destroyed()
General Comments 0
You need to be logged in to leave comments. Login now