Patchwork D6020: mq: get copy source from context object instead of from filelog

login
register
mail settings
Submitter phabricator
Date Feb. 24, 2019, 8:25 a.m.
Message ID <fcd9d60a5589ee46a336fa19c2c6c1ff@localhost.localdomain>
Download mbox | patch
Permalink /patch/38906/
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 rHG18f619d3b1bb: mq: get copy source from context object instead of from filelog (authored by martinvonz, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6020?vs=14208&id=14223

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

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
@@ -1701,7 +1701,6 @@ 
             # caching against the next repo.status call
             mm, aa, dd = repo.status(patchparent, top)[:3]
             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
@@ -1778,13 +1777,12 @@ 
                         repo.dirstate.add(dst)
                     # remember the copies between patchparent and qtip
                     for dst in aaa:
-                        f = repo.file(dst)
-                        src = f.renamed(man[dst])
+                        src = ctx[dst].copysource()
                         if src:
-                            copies.setdefault(src[0], []).extend(
+                            copies.setdefault(src, []).extend(
                                 copies.get(dst, []))
                             if dst in a:
-                                copies[src[0]].append(dst)
+                                copies[src].append(dst)
                         # we can't copy a file created by the patch itself
                         if dst in copies:
                             del copies[dst]