Mercurial > public > mercurial-scm > hg
comparison mercurial/branchmap.py @ 19839:a32ef044b99a
branchmap: stop looking for stripped branch
Since repoview in 2.5 we do not make special call to `branchmap` when stripping.
We just recompute the branchmap from a lower subset that still has valid
branchmap. So I'm dropping this dead code.
author | Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
---|---|
date | Mon, 30 Sep 2013 17:42:38 +0200 |
parents | 23386881abeb |
children | 175c6fd8cacc |
comparison
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(): |