mercurial/branchmap.py
changeset 19839 a32ef044b99a
parent 19838 23386881abeb
child 20032 175c6fd8cacc
equal deleted inserted replaced
19838:23386881abeb 19839:a32ef044b99a
   196             tiprev = max(bheadrevs)
   196             tiprev = max(bheadrevs)
   197             if tiprev > self.tiprev:
   197             if tiprev > self.tiprev:
   198                 self.tipnode = cl.node(tiprev)
   198                 self.tipnode = cl.node(tiprev)
   199                 self.tiprev = tiprev
   199                 self.tiprev = tiprev
   200 
   200 
   201         # There may be branches that cease to exist when the last commit in the
       
   202         # branch was stripped.  This code filters them out.  Note that the
       
   203         # branch that ceased to exist may not be in newbranches because
       
   204         # newbranches is the set of candidate heads, which when you strip the
       
   205         # last commit in a branch will be the parent branch.
       
   206         for branch in self.keys():
       
   207             nodes = [head for head in self[branch]
       
   208                      if cl.hasnode(head)]
       
   209             if not nodes:
       
   210                 del self[branch]
       
   211 
       
   212         if not self.validfor(repo):
   201         if not self.validfor(repo):
   213             # cache key are not valid anymore
   202             # cache key are not valid anymore
   214             self.tipnode = nullid
   203             self.tipnode = nullid
   215             self.tiprev = nullrev
   204             self.tiprev = nullrev
   216             for heads in self.values():
   205             for heads in self.values():