[PATCH STABLE] backout: make --noninteractive be noninteractive

Jason Harris jason.f.harris at gmail.com
Sun Nov 21 12:18:27 CST 2010


# HG changeset patch
# User jfh <jason at jasonfharris.com>
# Date 1290340736 -3600
# Node ID a9dac2fb64b7ad324669f37798b3abfa3ef53086
# Parent  42ac864ed3946df2a3b7b87dcbc05cd4d35a62c3
backout: make --noninteractive be noninteractive

The --noninteractive option was not being respected within the backout command.
It's important to have this working so GUI clients can control when dialog's
and editor are opened during the backout process.

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -289,7 +289,7 @@
     if not commit_opts['message'] and not commit_opts['logfile']:
         # we don't translate commit messages
         commit_opts['message'] = "Backed out changeset %s" % short(node)
-        commit_opts['force_editor'] = True
+        commit_opts['force_editor'] = (ui.config('ui', 'interactive') != 'off')
     commit(ui, repo, **commit_opts)
     def nice(node):
         return '%d:%s' % (repo.changelog.rev(node), short(node))


More information about the Mercurial-devel mailing list