Mercurial > public > mercurial-scm > hg-stable
diff contrib/python-hook-examples.py @ 39900: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 | 2b585677220e |
children | 2372284d9457 |
line wrap: on
line diff
--- a/contrib/python-hook-examples.py Wed Sep 26 22:17:34 2018 -0700 +++ b/contrib/python-hook-examples.py Wed Sep 26 10:38:37 2018 -0700 @@ -19,7 +19,7 @@ node = kwargs['node'] first = repo[node].p1().node() if 'url' in kwargs: - last = repo['tip'].node() + last = repo.changelog.tip() else: last = node diff = patch.diff(repo, first, last)