diff hgext/histedit.py @ 24920:b5eb01500696 stable

histedit: fix --edit-plan --edit-plan was completely broken from the command line because it used an old api that was not updated (it would crash with a stack trace). Let's update it and add tests to catch this.
author Durham Goode <durham@fb.com>
date Wed, 22 Apr 2015 15:53:03 -0700
parents 95a67d687903
children a920abf5a592
line wrap: on
line diff
--- a/hgext/histedit.py	Thu Apr 30 22:40:18 2015 +0900
+++ b/hgext/histedit.py	Wed Apr 22 15:53:03 2015 -0700
@@ -747,7 +747,8 @@
     elif goal == 'edit-plan':
         state.read()
         if not rules:
-            comment = editcomment % (state.parentctx, node.short(state.topmost))
+            comment = editcomment % (node.short(state.parentctxnode),
+                                     node.short(state.topmost))
             rules = ruleeditor(repo, ui, state.rules, comment)
         else:
             if rules == '-':