363
class cmd_merge(BzrToolsCommand):
364
__doc__ = bzrlib.builtins.cmd_merge.__doc__
366
_original_command = None
367
encoding_type = bzrlib.builtins.cmd_merge.encoding_type
368
_see_also = bzrlib.builtins.cmd_merge._see_also
369
takes_args = bzrlib.builtins.cmd_merge.takes_args
370
takes_options = bzrlib.builtins.cmd_merge.takes_options
371
takes_options.append(Option('interactive', short_name='i',
372
help='Prompt for hunks to merge.'))
374
def run(self, location=None, revision=None, force=False,
375
merge_type=None, show_base=False, reprocess=False, remember=False,
376
uncommitted=False, pull=False,
383
source = BzrPatchSource(None, None)
384
s = shelf.Shelf(source.base)
385
s.shelve(source, False, None, False, merge_mode=True)
388
def run_argv_aliases(self, argv, alias_argv=None):
389
"""Decorate bzr's cmd_merge to run a shelve with merge_hunk_selector."""
390
orig_argv = list(argv)
393
if '--interactive' in argv:
394
argv.remove('--interactive')
395
self._original_command().run_argv_aliases(argv, alias_argv)
396
super(cmd_merge, self).run_argv_aliases(orig_argv, alias_argv)
399
cmd_merge._original_command = bzrlib.commands.register_command(
363
403
class cmd_shell(BzrToolsCommand):
364
404
"""Begin an interactive shell tailored for bzr.
365
405
Bzr commands can be used without typing bzr first, and will be run natively