Patchwork D8715: mergestate: rename addpath() -> addpathonflict() to prevent confusion

login
register
mail settings
Submitter phabricator
Date July 9, 2020, 12:37 p.m.
Message ID <differential-rev-PHID-DREV-kbcgzh6enng5pjv2py3w-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/46673/
State Superseded
Headers show

Comments

phabricator - July 9, 2020, 12:37 p.m.
pulkit created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  addpath() seems to imply that we are adding a new path/entry to the mergestate.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  mercurial/merge.py
  mercurial/mergestate.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/mergestate.py b/mercurial/mergestate.py
--- a/mercurial/mergestate.py
+++ b/mercurial/mergestate.py
@@ -540,7 +540,7 @@ 
         self._stateextras[fd] = {b'ancestorlinknode': hex(fca.node())}
         self._dirty = True
 
-    def addpath(self, path, frename, forigin):
+    def addpathconflict(self, path, frename, forigin):
         """add a new conflicting path to the merge state
         path:    the path that conflicts
         frename: the filename the conflicting file was renamed to
diff --git a/mercurial/merge.py b/mercurial/merge.py
--- a/mercurial/merge.py
+++ b/mercurial/merge.py
@@ -1259,7 +1259,7 @@ 
         else:
             s(_(b"the remote file has been renamed to %s\n") % f1)
         s(_(b"resolve manually then use 'hg resolve --mark %s'\n") % f)
-        ms.addpath(f, f1, fo)
+        ms.addpathconflict(f, f1, fo)
         progress.increment(item=f)
 
     # When merging in-memory, we can't support worker processes, so set the