Patchwork D6019: mq: slightly modernize by using context object

login
register
mail settings
Submitter phabricator
Date Feb. 24, 2019, 8:25 a.m.
Message ID <d6d3e6e862aa3cdb767d9c90187c0a19@localhost.localdomain>
Download mbox | patch
Permalink /patch/38905/
State Not Applicable
Headers show

Comments

phabricator - Feb. 24, 2019, 8:25 a.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG6ed520c3e932: mq: slightly modernize by using context object (authored by martinvonz, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6019?vs=14207&id=14222

REVISION DETAIL
  https://phab.mercurial-scm.org/D6019

AFFECTED FILES
  hgext/mq.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/hgext/mq.py b/hgext/mq.py
--- a/hgext/mq.py
+++ b/hgext/mq.py
@@ -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()