comparison hgext/obsolete.py @ 302:d68ccae92d52

obsolete: make collapse create less markers Collapsing A and B into C was registering: A -> C B -> C A -> B At this point, the last relation brings nothing and is removed for the sake of simplicity: A -> C B -> C test-evolve.t is slightly modified as one of the relations let stabilize compute a target outside of the parent revision tree. This is a stabilize bug, not trivial to fix, so let's tweak the test for now.
author Patrick Mezard <patrick@mezard.eu>
date Sat, 23 Jun 2012 11:14:09 +0200
parents b41ff69388a8
children 7c68899b521e
comparison
equal deleted inserted replaced
301:b41ff69388a8 302:d68ccae92d52
842 # Assume oldnodes are all descendants of a single rev 842 # Assume oldnodes are all descendants of a single rev
843 rootrevs = self.revs('roots(%ln)', oldnodes) 843 rootrevs = self.revs('roots(%ln)', oldnodes)
844 assert len(rootrevs) == 1, rootrevs 844 assert len(rootrevs) == 1, rootrevs
845 rootnode = self[rootrevs[0]].node() 845 rootnode = self[rootrevs[0]].node()
846 for n in oldnodes: 846 for n in oldnodes:
847 if n != rootnode:
848 self.addobsolete(n, rootnode)
849 self.addobsolete(newnode, n) 847 self.addobsolete(newnode, n)
850 848
851 def _turn_extinct_secret(self): 849 def _turn_extinct_secret(self):
852 """ensure all extinct changeset are secret""" 850 """ensure all extinct changeset are secret"""
853 self._clearobsoletecache() 851 self._clearobsoletecache()