Mercurial > public > mercurial-scm > hg
diff hgext/mq.py @ 39895:1a184b727aff
repo: don't look up context for tip node if it's not needed
We were doing repo['tip'].node() or similar in a few places where
repo.changelog.tip() would be enough.
Differential Revision: https://phab.mercurial-scm.org/D4781
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Wed, 26 Sep 2018 10:38:37 -0700 |
parents | 24e493ec2229 |
children | c303d65d2e34 |
line wrap: on
line diff
--- a/hgext/mq.py Wed Sep 26 22:17:34 2018 -0700 +++ b/hgext/mq.py Wed Sep 26 10:38:37 2018 -0700 @@ -980,10 +980,10 @@ files += mergedsubstate.keys() match = scmutil.matchfiles(repo, files or []) - oldtip = repo['tip'] + oldtip = repo.changelog.tip() n = newcommit(repo, None, message, ph.user, ph.date, match=match, force=True) - if repo['tip'] == oldtip: + if repo.changelog.tip() == oldtip: raise error.Abort(_("qpush exactly duplicates child changeset")) if n is None: raise error.Abort(_("repository commit failed"))