from stgit.argparse import opt
from stgit.commands.common import *
from stgit.utils import *
-from stgit import stack, git, basedir
+from stgit import argparse, stack, git, basedir
from stgit.config import config, file_extensions
-from stgit.gitmergeonefile import interactive_merge
help = 'Mark a file conflict as solved'
+kind = 'wc'
usage = ['[options] [<files...>]']
description = """
Mark a merge conflict as resolved. The conflicts can be seen with the
'status' command, the corresponding files being prefixed with a
'C'."""
+args = [argparse.conflicting_files]
options = [
opt('-a', '--all', action = 'store_true',
short = 'Mark all conflicts as solved'),
opt('-r', '--reset', metavar = '(ancestor|current|patched)',
+ args = [argparse.strings('ancestor', 'current', 'patched')],
short = 'Reset the file(s) to the given state'),
opt('-i', '--interactive', action = 'store_true',
short = 'Run the interactive merging tool')]
-directory = DirectoryHasRepository(needs_current_series = False)
+directory = DirectoryHasRepository(needs_current_series = False, log = False)
def func(parser, options, args):
"""Mark the conflict as resolved
# resolved
if options.interactive:
- for filename in files:
- interactive_merge(filename)
- git.resolved([filename])
+ git.mergetool(files)
else:
git.resolved(files, options.reset)