Mercurial > public > mercurial-scm > hg
diff hgext/mq.py @ 18217:46cc3b74e1c5
mq: drop `_cacheabletip` usage
Strip have dedicated work around to solve the same problem, strip is even a
fraction faster without that thanks to simpler update process of the branchcache.
author | Pierre-Yves David <pierre-yves.david@logilab.fr> |
---|---|
date | Fri, 28 Dec 2012 03:42:21 +0100 |
parents | 242d2f4ec01c |
children | de99de39ba28 |
line wrap: on
line diff
--- a/hgext/mq.py Fri Dec 28 02:34:32 2012 +0100 +++ b/hgext/mq.py Fri Dec 28 03:42:21 2012 +0100 @@ -3469,26 +3469,6 @@ return result - def _cacheabletip(self): - q = self.mq - cl = self.changelog - qbase = None - if not q.applied: - if getattr(self, '_committingpatch', False): - # Committing a new patch, must be tip - qbase = len(cl) - 1 - else: - qbasenode = q.applied[0].node - try: - qbase = self.unfiltered().changelog.rev(qbasenode) - except error.LookupError: - self.ui.warn(_('mq status file refers to unknown node %s\n') - % short(qbasenode)) - ret = super(mqrepo, self)._cacheabletip() - if qbase is not None: - ret = min(qbase - 1, ret) - return ret - if repo.local(): repo.__class__ = mqrepo