merge.mergestate: set merge driver state to 's' if there's none present
This allows mergestate.mdstate() to return 's' if there's nothing to be done on
the merge driver end.
--- a/mercurial/merge.py Thu Oct 15 01:04:46 2015 -0700
+++ b/mercurial/merge.py Thu Oct 15 01:06:29 2015 -0700
@@ -89,8 +89,11 @@
if node:
self._local = node
self._other = other
- self._mdstate = 'u'
self._readmergedriver = None
+ if self.mergedriver:
+ self._mdstate = 's'
+ else:
+ self._mdstate = 'u'
shutil.rmtree(self._repo.join('merge'), True)
self._dirty = False
@@ -103,10 +106,10 @@
self._state = {}
self._local = None
self._other = None
- self._mdstate = 'u'
if 'otherctx' in vars(self):
del self.otherctx
self._readmergedriver = None
+ self._mdstate = 's'
records = self._readrecords()
for rtype, record in records:
if rtype == 'L':