+ def mergetool(self, files = ()):
+ """Invoke 'git mergetool' on the current IndexAndWorktree to resolve
+ any outstanding conflicts. If 'not files', all the files in an
+ unmerged state will be processed."""
+ self.run(['git', 'mergetool'] + list(files)).returns([0, 1]).run()
+ # check for unmerged entries (prepend 'CONFLICT ' for consistency with
+ # merge())
+ conflicts = ['CONFLICT ' + f for f in self.index.conflicts()]
+ if conflicts:
+ raise MergeConflictException(conflicts)