Patchwork D7857: graft: extract repo[None] to a variable

login
register
mail settings
Submitter phabricator
Date Jan. 16, 2020, 4:30 p.m.
Message ID <e963c5ef5f00ec2b93eb01cab75b41f5@localhost.localdomain>
Download mbox | patch
Permalink /patch/44440/
State Not Applicable
Headers show

Comments

phabricator - Jan. 16, 2020, 4:30 p.m.
Closed by commit rHGbd22e90c54b3: graft: extract repo[None] to a variable (authored by martinvonz).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7857?vs=19248&id=19368

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7857/new/

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

AFFECTED FILES
  mercurial/merge.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/merge.py b/mercurial/merge.py
--- a/mercurial/merge.py
+++ b/mercurial/merge.py
@@ -2605,7 +2605,8 @@ 
     # to copy commits), and 2) informs update that the incoming changes are
     # newer than the destination so it doesn't prompt about "remote changed foo
     # which local deleted".
-    pctx = repo[b'.']
+    wctx = repo[None]
+    pctx = wctx.p1()
     mergeancestor = repo.changelog.isancestor(pctx.node(), ctx.node())
 
     stats = update(
@@ -2634,7 +2635,7 @@ 
         repo.setparents(pctx.node(), pother)
         repo.dirstate.write(repo.currenttransaction())
         # fix up dirstate for copies and renames
-        copies.duplicatecopies(repo, repo[None], ctx.rev(), base.rev())
+        copies.duplicatecopies(repo, wctx, ctx.rev(), base.rev())
     return stats