comparison mercurial/merge.py @ 21266:19d6fec60b81

resolve: print message when no unresolved files remain (issue4214) When using resolve, users often have to consult with the output of |hg resolve -l| to see if any unresolved files remain. This step is tedious and adds overhead to resolving. This patch will notify a user if there are no unresolved files remaining after executing |hg resolve|:: no unresolved files; you may continue your unfinished operation The patch stops short of telling the user exactly what command should be executed to continue the unfinished operation. That is because this information is not currently captured anywhere. This would make a compelling follow-up feature.
author Gregory Szorc <gregory.szorc@gmail.com>
date Fri, 18 Apr 2014 22:19:25 -0700
parents 4e932dc5c113
children a0b8a912ec81
comparison
equal deleted inserted replaced
21265:232de244ab6f 21266:19d6fec60b81
257 return self._state.keys() 257 return self._state.keys()
258 258
259 def mark(self, dfile, state): 259 def mark(self, dfile, state):
260 self._state[dfile][0] = state 260 self._state[dfile][0] = state
261 self._dirty = True 261 self._dirty = True
262
263 def unresolved(self):
264 """Obtain the paths of unresolved files."""
265
266 for f, entry in self._state.items():
267 if entry[0] == 'u':
268 yield f
262 269
263 def resolve(self, dfile, wctx): 270 def resolve(self, dfile, wctx):
264 """rerun merge process for file path `dfile`""" 271 """rerun merge process for file path `dfile`"""
265 if self[dfile] == 'r': 272 if self[dfile] == 'r':
266 return 0 273 return 0