histedit: miscellaneous style cleanups
authorAugie Fackler <raf@durin42.com>
Thu, 16 Oct 2014 14:55:45 -0400
changeset 22987 e6d890e1ed4f
parent 22986 7b93b49286d0
child 22988 32b77aba2772
histedit: miscellaneous style cleanups Fix some mis-wrapped lines, re-wrap some lines to be more compact, remove superfluous parens.
hgext/histedit.py
--- a/hgext/histedit.py	Thu Oct 16 14:51:15 2014 -0400
+++ b/hgext/histedit.py	Thu Oct 16 14:55:45 2014 -0400
@@ -212,7 +212,7 @@
                 raise
             raise util.Abort(_('no histedit in progress'))
 
-        (parentctxnode, rules, keep, topmost, replacements) = pickle.load(fp)
+        parentctxnode, rules, keep, topmost, replacements = pickle.load(fp)
 
         self.parentctx = self.repo[parentctxnode]
         self.rules = rules
@@ -223,7 +223,7 @@
     def write(self):
         fp = self.repo.vfs('histedit-state', 'w')
         pickle.dump((self.parentctx.node(), self.rules, self.keep,
-            self.topmost, self.replacements), fp)
+                     self.topmost, self.replacements), fp)
         fp.close()
 
     def clear(self):
@@ -361,8 +361,7 @@
     n = commit(text=oldctx.description(), user=oldctx.user(),
                date=oldctx.date(), extra=oldctx.extra())
     if n is None:
-        ui.warn(_('%s: empty changeset\n')
-                     % node.hex(ha))
+        ui.warn(_('%s: empty changeset\n') % node.hex(ha))
         return ctx, []
     new = repo[n]
     return new, [(oldctx.node(), (n,))]
@@ -393,8 +392,7 @@
     n = repo.commit(text='fold-temp-revision %s' % ha, user=oldctx.user(),
                     date=oldctx.date(), extra=oldctx.extra())
     if n is None:
-        ui.warn(_('%s: empty changeset')
-                     % node.hex(ha))
+        ui.warn(_('%s: empty changeset') % node.hex(ha))
         return ctx, []
     return finishfold(ui, repo, ctx, oldctx, n, opts, [])
 
@@ -432,9 +430,9 @@
         return ctx, []
     hg.update(repo, n)
     replacements = [(oldctx.node(), (newnode,)),
-                     (ctx.node(), (n,)),
-                     (newnode, (n,)),
-                    ]
+                    (ctx.node(), (n,)),
+                    (newnode, (n,)),
+                   ]
     for ich in internalchanges:
         replacements.append((ich, (n,)))
     return repo[n], replacements
@@ -456,8 +454,7 @@
     commit = commitfuncfor(repo, oldctx)
     editor = cmdutil.getcommiteditor(edit=True, editform='histedit.mess')
     new = commit(text=message, user=oldctx.user(), date=oldctx.date(),
-                 extra=oldctx.extra(),
-                 editor=editor)
+                 extra=oldctx.extra(), editor=editor)
     newctx = repo[new]
     if oldctx.node() != newctx.node():
         return newctx, [(oldctx.node(), (new,))]
@@ -747,9 +744,8 @@
         editform = 'histedit.%s' % canonaction.get(action, action)
         editor = cmdutil.getcommiteditor(edit=editopt, editform=editform)
         commit = commitfuncfor(repo, ctx)
-        new = commit(text=message, user=ctx.user(),
-                     date=ctx.date(), extra=ctx.extra(),
-                     editor=editor)
+        new = commit(text=message, user=ctx.user(), date=ctx.date(),
+                     extra=ctx.extra(), editor=editor)
         if new is not None:
             newchildren.append(new)