[Updated] D8591: mergestate: move staticmethod _filectxorabsent to module level
durin42 (Augie Fackler)
phabricator at mercurial-scm.org
Fri May 29 17:06:46 UTC 2020
Closed by commit rHG17d928f8abaf: mergestate: move staticmethod _filectxorabsent to module level (authored by durin42).
This revision was automatically updated to reflect the committed changes.
This revision was not accepted when it landed; it landed in state "Needs Review".
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D8591?vs=21516&id=21529
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D8591/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D8591
AFFECTED FILES
mercurial/mergestate.py
CHANGE DETAILS
diff --git a/mercurial/mergestate.py b/mercurial/mergestate.py
--- a/mercurial/mergestate.py
+++ b/mercurial/mergestate.py
@@ -31,6 +31,13 @@
return b'\0'.join(bits)
+def _filectxorabsent(hexnode, ctx, f):
+ if hexnode == nullhex:
+ return filemerge.absentfilectx(ctx, f)
+ else:
+ return ctx[f]
+
+
# Merge state record types. See ``mergestate`` docs for more.
RECORD_LOCAL = b'L'
RECORD_OTHER = b'O'
@@ -600,8 +607,8 @@
actx = self._repo[anccommitnode]
else:
actx = None
- fcd = self._filectxorabsent(localkey, wctx, dfile)
- fco = self._filectxorabsent(onode, octx, ofile)
+ fcd = _filectxorabsent(localkey, wctx, dfile)
+ fco = _filectxorabsent(onode, octx, ofile)
# TODO: move this to filectxorabsent
fca = self._repo.filectx(afile, fileid=anode, changectx=actx)
# "premerge" x flags
@@ -679,12 +686,6 @@
return complete, r
- def _filectxorabsent(self, hexnode, ctx, f):
- if hexnode == nullhex:
- return filemerge.absentfilectx(ctx, f)
- else:
- return ctx[f]
-
def preresolve(self, dfile, wctx):
"""run premerge process for dfile
To: durin42, #hg-reviewers
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20200529/5aacc296/attachment-0002.html>
More information about the Mercurial-patches
mailing list