changeset 29476:48188ceb3c43

rebase: move local variable 'extrafn' to the RR class
author Kostia Balytskyi <ikostia@fb.com>
date Fri, 01 Jul 2016 14:09:53 +0200
parents fb7fc877ed17
children becc4c6eca42
files hgext/rebase.py
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/rebase.py	Fri Jul 01 14:09:53 2016 +0200
+++ b/hgext/rebase.py	Fri Jul 01 14:09:53 2016 +0200
@@ -148,6 +148,7 @@
         self.extrafns = [_savegraft]
         if e:
             self.extrafns = [e]
+        self.extrafn = None
 
         self.keepf = opts.get('keep', False)
         self.keepbranchesf = opts.get('keepbranches', False)
@@ -498,7 +499,7 @@
         if rbsrt.activebookmark:
             bookmarks.deactivate(repo)
 
-        extrafn = _makeextrafn(rbsrt.extrafns)
+        rbsrt.extrafn = _makeextrafn(rbsrt.extrafns)
 
         rbsrt.sortedstate = sorted(rbsrt.state)
         total = len(rbsrt.sortedstate)
@@ -542,7 +543,8 @@
                     merging = p2 != nullrev
                     editform = cmdutil.mergeeditform(merging, 'rebase')
                     editor = cmdutil.getcommiteditor(editform=editform, **opts)
-                    newnode = concludenode(repo, rev, p1, p2, extrafn=extrafn,
+                    newnode = concludenode(repo, rev, p1, p2,
+                                           extrafn=rbsrt.extrafn,
                                            editor=editor,
                                            keepbranches=rbsrt.keepbranchesf,
                                            date=rbsrt.date)
@@ -603,7 +605,7 @@
             revtoreuse = rbsrt.sortedstate[-1]
             newnode = concludenode(repo, revtoreuse, p1, rbsrt.external,
                                    commitmsg=commitmsg,
-                                   extrafn=extrafn, editor=editor,
+                                   extrafn=rbsrt.extrafn, editor=editor,
                                    keepbranches=rbsrt.keepbranchesf,
                                    date=rbsrt.date)
             if newnode is None: