3490 try: |
3490 try: |
3491 qbase = self.unfiltered().changelog.rev(qbasenode) |
3491 qbase = self.unfiltered().changelog.rev(qbasenode) |
3492 except error.LookupError: |
3492 except error.LookupError: |
3493 self.ui.warn(_('mq status file refers to unknown node %s\n') |
3493 self.ui.warn(_('mq status file refers to unknown node %s\n') |
3494 % short(qbasenode)) |
3494 % short(qbasenode)) |
3495 if qbase is None: |
3495 ret = super(mqrepo, self)._cacheabletip() |
3496 return super(mqrepo, self)._branchtags(partial, lrev) |
3496 if qbase is not None: |
3497 |
3497 ret = min(qbase - 1, ret) |
3498 start = lrev + 1 |
3498 return ret |
3499 if start < qbase: |
|
3500 # update the cache (excluding the patches) and save it |
|
3501 ctxgen = (self[r] for r in xrange(lrev + 1, qbase)) |
|
3502 self._updatebranchcache(partial, ctxgen) |
|
3503 self._writebranchcache(partial, cl.node(qbase - 1), qbase - 1) |
|
3504 start = qbase |
|
3505 # if start = qbase, the cache is as updated as it should be. |
|
3506 # if start > qbase, the cache includes (part of) the patches. |
|
3507 # we might as well use it, but we won't save it. |
|
3508 |
|
3509 # update the cache up to the tip |
|
3510 ctxgen = (self[r] for r in xrange(start, len(cl))) |
|
3511 self._updatebranchcache(partial, ctxgen) |
|
3512 |
|
3513 return partial |
|
3514 |
3499 |
3515 if repo.local(): |
3500 if repo.local(): |
3516 repo.__class__ = mqrepo |
3501 repo.__class__ = mqrepo |
3517 |
3502 |
3518 repo._phasedefaults.append(mqphasedefaults) |
3503 repo._phasedefaults.append(mqphasedefaults) |