Show More
@@ -1394,7 +1394,7 b' class queue(object):' | |||||
1394 | diffopts = self.diffopts() |
|
1394 | diffopts = self.diffopts() | |
1395 | with repo.wlock(): |
|
1395 | with repo.wlock(): | |
1396 | heads = [] |
|
1396 | heads = [] | |
1397 |
for hs in repo.branchmap().iter |
|
1397 | for hs in repo.branchmap().iterheads(): | |
1398 | heads.extend(hs) |
|
1398 | heads.extend(hs) | |
1399 | if not heads: |
|
1399 | if not heads: | |
1400 | heads = [nullid] |
|
1400 | heads = [nullid] |
@@ -178,9 +178,6 b' class branchcache(object):' | |||||
178 | def iteritems(self): |
|
178 | def iteritems(self): | |
179 | return self.entries.iteritems() |
|
179 | return self.entries.iteritems() | |
180 |
|
180 | |||
181 | def itervalues(self): |
|
|||
182 | return self.entries.itervalues() |
|
|||
183 |
|
||||
184 | @classmethod |
|
181 | @classmethod | |
185 | def fromfile(cls, repo): |
|
182 | def fromfile(cls, repo): | |
186 | f = None |
|
183 | f = None | |
@@ -287,6 +284,10 b' class branchcache(object):' | |||||
287 | for bn, heads in self.iteritems(): |
|
284 | for bn, heads in self.iteritems(): | |
288 | yield (bn, heads) + self._branchtip(heads) |
|
285 | yield (bn, heads) + self._branchtip(heads) | |
289 |
|
286 | |||
|
287 | def iterheads(self): | |||
|
288 | """ returns all the heads """ | |||
|
289 | return self.entries.itervalues() | |||
|
290 | ||||
290 | def copy(self): |
|
291 | def copy(self): | |
291 | """return an deep copy of the branchcache object""" |
|
292 | """return an deep copy of the branchcache object""" | |
292 | return branchcache( |
|
293 | return branchcache( | |
@@ -369,7 +370,7 b' class branchcache(object):' | |||||
369 | # cache key are not valid anymore |
|
370 | # cache key are not valid anymore | |
370 | self.tipnode = nullid |
|
371 | self.tipnode = nullid | |
371 | self.tiprev = nullrev |
|
372 | self.tiprev = nullrev | |
372 |
for heads in self.iter |
|
373 | for heads in self.iterheads(): | |
373 | tiprev = max(cl.rev(node) for node in heads) |
|
374 | tiprev = max(cl.rev(node) for node in heads) | |
374 | if tiprev > self.tiprev: |
|
375 | if tiprev > self.tiprev: | |
375 | self.tipnode = cl.node(tiprev) |
|
376 | self.tipnode = cl.node(tiprev) |
@@ -1980,7 +1980,7 b' def handlecheckupdatedheads(op, inpart):' | |||||
1980 | op.gettransaction() |
|
1980 | op.gettransaction() | |
1981 |
|
1981 | |||
1982 | currentheads = set() |
|
1982 | currentheads = set() | |
1983 |
for ls in op.repo.branchmap().iter |
|
1983 | for ls in op.repo.branchmap().iterheads(): | |
1984 | currentheads.update(ls) |
|
1984 | currentheads.update(ls) | |
1985 |
|
1985 | |||
1986 | for h in heads: |
|
1986 | for h in heads: |
@@ -1240,7 +1240,7 b' def head(repo, subset, x):' | |||||
1240 | getargs(x, 0, 0, _("head takes no arguments")) |
|
1240 | getargs(x, 0, 0, _("head takes no arguments")) | |
1241 | hs = set() |
|
1241 | hs = set() | |
1242 | cl = repo.changelog |
|
1242 | cl = repo.changelog | |
1243 |
for ls in repo.branchmap().iter |
|
1243 | for ls in repo.branchmap().iterheads(): | |
1244 | hs.update(cl.rev(h) for h in ls) |
|
1244 | hs.update(cl.rev(h) for h in ls) | |
1245 | return subset & baseset(hs) |
|
1245 | return subset & baseset(hs) | |
1246 |
|
1246 |
General Comments 0
You need to be logged in to leave comments.
Login now