changeset 2268:6c9305fbebaf

fix coding style of backout editor change.
author Vadim Gelfer <vadim.gelfer@gmail.com>
date Thu, 11 May 2006 14:41:52 -0700
parents d812d91c5a84
children 8cb77698f5fd
files mercurial/commands.py tests/test-backout.out
diffstat 2 files changed, 6 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py	Thu May 11 14:32:09 2006 -0700
+++ b/mercurial/commands.py	Thu May 11 14:41:52 2006 -0700
@@ -789,7 +789,7 @@
     commit_opts['addremove'] = False
     if not commit_opts['message'] and not commit_opts['logfile']:
         commit_opts['message'] = _("Backed out changeset %s") % (hex(node))
-        commit_opts['force_editor'] = True;
+        commit_opts['force_editor'] = True
     commit(ui, repo, **commit_opts)
     def nice(node):
         return '%d:%s' % (repo.changelog.rev(node), short(node))
@@ -988,12 +988,8 @@
     else:
         files = []
     try:
-        try:
-            force_editor = opts['force_editor']
-        except KeyError:
-            force_editor = False
         repo.commit(files, message, opts['user'], opts['date'], match,
-            force_editor=force_editor)
+                    force_editor=opts.get('force_editor'))
     except ValueError, inst:
         raise util.Abort(str(inst))
 
--- a/tests/test-backout.out	Thu May 11 14:32:09 2006 -0700
+++ b/tests/test-backout.out	Thu May 11 14:41:52 2006 -0700
@@ -1,19 +1,19 @@
 # basic operation
 adding a
-changeset 2:b38a34ddfd9f backs out changeset 1:a820f4f40a57
+changeset 2:c86754337410 backs out changeset 1:a820f4f40a57
 a
 # file that was removed is recreated
 adding a
 adding a
-changeset 2:44cd84c7349a backs out changeset 1:76862dcce372
+changeset 2:d2d961bd79f2 backs out changeset 1:76862dcce372
 content
 # backout of backout is as if nothing happened
 removing a
-changeset 3:0dd8a0ed5e99 backs out changeset 2:44cd84c7349a
+changeset 3:8a7eeb5ab5ce backs out changeset 2:d2d961bd79f2
 cat: a: No such file or directory
 # backout with merge
 adding a
-changeset 3:6c77ecc28460 backs out changeset 1:314f55b1bf23
+changeset 3:3c9e845b409c backs out changeset 1:314f55b1bf23
 merging with changeset 2:b66ea5b77abb
 merging a
 0 files updated, 1 files merged, 0 files removed, 0 files unresolved