##// END OF EJS Templates
context: implement mergestate() method...
Augie Fackler -
r45384:e607099d default
parent child Browse files
Show More
@@ -34,6 +34,7 b' from . import ('
34 error,
34 error,
35 fileset,
35 fileset,
36 match as matchmod,
36 match as matchmod,
37 mergestate as mergestatemod,
37 obsolete as obsmod,
38 obsolete as obsmod,
38 patch,
39 patch,
39 pathutil,
40 pathutil,
@@ -474,6 +475,12 b' class basectx(object):'
474
475
475 return r
476 return r
476
477
478 def mergestate(self, clean=False):
479 """Get a mergestate object for this context."""
480 raise NotImplementedError(
481 '%s does not implement mergestate()' % self.__class__
482 )
483
477
484
478 class changectx(basectx):
485 class changectx(basectx):
479 """A changecontext object makes access to data related to a particular
486 """A changecontext object makes access to data related to a particular
@@ -2003,6 +2010,11 b' class workingctx(committablectx):'
2003
2010
2004 sparse.aftercommit(self._repo, node)
2011 sparse.aftercommit(self._repo, node)
2005
2012
2013 def mergestate(self, clean=False):
2014 if clean:
2015 return mergestatemod.mergestate.clean(self._repo)
2016 return mergestatemod.mergestate.read(self._repo)
2017
2006
2018
2007 class committablefilectx(basefilectx):
2019 class committablefilectx(basefilectx):
2008 """A committablefilectx provides common functionality for a file context
2020 """A committablefilectx provides common functionality for a file context
General Comments 0
You need to be logged in to leave comments. Login now