Mercurial > hg-stable
changeset 41788:6ed520c3e932
mq: slightly modernize by using context object
Context objects have existed since mid-2006.
Differential Revision: https://phab.mercurial-scm.org/D6019
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Sat, 23 Feb 2019 09:30:49 -0800 |
parents | 8843bc1fc14d |
children | 18f619d3b1bb |
files | hgext/mq.py |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/mq.py Sat Feb 23 09:15:36 2019 -0800 +++ b/hgext/mq.py Sat Feb 23 09:30:49 2019 -0800 @@ -1700,8 +1700,8 @@ # 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 @@ for f in forget: repo.dirstate.drop(f) - user = ph.user or changes[1] + user = ph.user or ctx.user() oldphase = repo[top].phase()