[Updated] D8551: context: implement mergestate() method
durin42 (Augie Fackler)
phabricator at mercurial-scm.org
Thu May 21 00:19:44 UTC 2020
Closed by commit rHGf3b69aecfdc3: context: implement mergestate() method (authored by durin42).
This revision was automatically updated to reflect the committed changes.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D8551?vs=21428&id=21460
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D8551/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D8551
AFFECTED FILES
mercurial/context.py
CHANGE DETAILS
diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -34,6 +34,7 @@
error,
fileset,
match as matchmod,
+ mergestate as mergestatemod,
obsolete as obsmod,
patch,
pathutil,
@@ -474,6 +475,12 @@
return r
+ def mergestate(self, clean=False):
+ """Get a mergestate object for this context."""
+ raise NotImplementedError(
+ '%s does not implement mergestate()' % self.__class__
+ )
+
class changectx(basectx):
"""A changecontext object makes access to data related to a particular
@@ -2003,6 +2010,11 @@
sparse.aftercommit(self._repo, node)
+ def mergestate(self, clean=False):
+ if clean:
+ return mergestatemod.mergestate.clean(self._repo)
+ return mergestatemod.mergestate.read(self._repo)
+
class committablefilectx(basefilectx):
"""A committablefilectx provides common functionality for a file context
To: durin42, #hg-reviewers, indygreg
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20200521/06cacbd8/attachment-0002.html>
More information about the Mercurial-patches
mailing list