# HG changeset patch # User Martin von Zweigbergk # Date 2019-02-23 17:30:49 # Node ID 6ed520c3e9321744270d16daa0ec99c8a0d5bffa # Parent 8843bc1fc14d89884b16495d546f18e0b91f0fa0 mq: slightly modernize by using context object Context objects have existed since mid-2006. Differential Revision: https://phab.mercurial-scm.org/D6019 diff --git a/hgext/mq.py b/hgext/mq.py --- a/hgext/mq.py +++ b/hgext/mq.py @@ -1700,8 +1700,8 @@ class queue(object): # but we do it backwards to take advantage of manifest/changelog # caching against the next repo.status call mm, aa, dd = repo.status(patchparent, top)[:3] - changes = repo.changelog.read(top) - man = repo.manifestlog[changes[0]].read() + ctx = repo[top] + man = ctx.manifest() aaa = aa[:] match1 = scmutil.match(repo[None], pats, opts) # in short mode, we only diff the files included in the @@ -1813,7 +1813,7 @@ class queue(object): for f in forget: repo.dirstate.drop(f) - user = ph.user or changes[1] + user = ph.user or ctx.user() oldphase = repo[top].phase()