##// END OF EJS Templates
repo: don't look up context for tip node if it's not needed...
Martin von Zweigbergk -
r39931:1a184b72 default
parent child Browse files
Show More
@@ -19,7 +19,7 b' def diffstat(ui, repo, **kwargs):'
19 node = kwargs['node']
19 node = kwargs['node']
20 first = repo[node].p1().node()
20 first = repo[node].p1().node()
21 if 'url' in kwargs:
21 if 'url' in kwargs:
22 last = repo['tip'].node()
22 last = repo.changelog.tip()
23 else:
23 else:
24 last = node
24 last = node
25 diff = patch.diff(repo, first, last)
25 diff = patch.diff(repo, first, last)
@@ -980,10 +980,10 b' class queue(object):'
980 files += mergedsubstate.keys()
980 files += mergedsubstate.keys()
981
981
982 match = scmutil.matchfiles(repo, files or [])
982 match = scmutil.matchfiles(repo, files or [])
983 oldtip = repo['tip']
983 oldtip = repo.changelog.tip()
984 n = newcommit(repo, None, message, ph.user, ph.date, match=match,
984 n = newcommit(repo, None, message, ph.user, ph.date, match=match,
985 force=True)
985 force=True)
986 if repo['tip'] == oldtip:
986 if repo.changelog.tip() == oldtip:
987 raise error.Abort(_("qpush exactly duplicates child changeset"))
987 raise error.Abort(_("qpush exactly duplicates child changeset"))
988 if n is None:
988 if n is None:
989 raise error.Abort(_("repository commit failed"))
989 raise error.Abort(_("repository commit failed"))
@@ -650,7 +650,7 b' verify pathauditor blocks evil filepaths'
650 > def filectxfn(repo, memctx, path):
650 > def filectxfn(repo, memctx, path):
651 > return context.memfilectx(repo, memctx, path,
651 > return context.memfilectx(repo, memctx, path,
652 > b'[hooks]\nupdate = echo owned')
652 > b'[hooks]\nupdate = echo owned')
653 > c = context.memctx(r, [r[b'tip'].node(), node.nullid],
653 > c = context.memctx(r, [r.changelog.tip(), node.nullid],
654 > b'evil', [notrc], filectxfn, 0)
654 > b'evil', [notrc], filectxfn, 0)
655 > r.commitctx(c)
655 > r.commitctx(c)
656 > EOF
656 > EOF
General Comments 0
You need to be logged in to leave comments. Login now