comparison mercurial/branchmap.py @ 19838:23386881abeb

branchmap: remove the droppednodes logic It was unused. note how it is only extended if the list is empty. So it's always empty at the end. We could try to fix that, however this would part of the code is to be removed in the next changeset as we do not run `branchmap` on truncated repo since `repoview` in 2.5.
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Mon, 30 Sep 2013 17:31:39 +0200
parents c38eaeb3b45e
children a32ef044b99a
comparison
equal deleted inserted replaced
19837:c38eaeb3b45e 19838:23386881abeb
201 # There may be branches that cease to exist when the last commit in the 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 202 # branch was stripped. This code filters them out. Note that the
203 # branch that ceased to exist may not be in newbranches because 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 204 # newbranches is the set of candidate heads, which when you strip the
205 # last commit in a branch will be the parent branch. 205 # last commit in a branch will be the parent branch.
206 droppednodes = []
207 for branch in self.keys(): 206 for branch in self.keys():
208 nodes = [head for head in self[branch] 207 nodes = [head for head in self[branch]
209 if cl.hasnode(head)] 208 if cl.hasnode(head)]
210 if not nodes: 209 if not nodes:
211 droppednodes.extend(nodes)
212 del self[branch] 210 del self[branch]
213 211
214 if ((not self.validfor(repo)) or (self.tipnode in droppednodes)): 212 if not self.validfor(repo):
215 # cache key are not valid anymore 213 # cache key are not valid anymore
216 self.tipnode = nullid 214 self.tipnode = nullid
217 self.tiprev = nullrev 215 self.tiprev = nullrev
218 for heads in self.values(): 216 for heads in self.values():
219 tiprev = max(cl.rev(node) for node in heads) 217 tiprev = max(cl.rev(node) for node in heads)