1. André Felipe Dias
  2. thg_pt-BR

Commits

Yuya Nishihara  committed 1256050

sync: reassign finishfunc before retrying push --new-branch

Since fe5f1b6b9c15, finishfunc is unset automatically, so it fails to
clear outgoing preview after push --new-branch of 2nd try.

  • Participants
  • Parent commits c073c98
  • Branches stable

Comments (0)

Files changed (1)

File tortoisehg/hgqt/sync.py

View file
             b.setEnabled(True)
         self.stopAction.setEnabled(False)
         if self.finishfunc:
+            # allow GC to clean temp finishfunc. here we need to nullify it
+            # before calling, because it may be reassigned in finishfunc().
+            f = self.finishfunc
+            self.finishfunc = None
             output = self.cmd.core.rawoutput()
-            self.finishfunc(ret, output)
-            self.finishfunc = None # allow GC to clean temp functions
+            f(ret, output)
 
     def run(self, cmdline, details):
         if self.cmd.core.running():
                     if r:
                         cmdline = self.lastcmdline
                         cmdline.extend(['--new-branch'])
+                        self.finishfunc = finished  # should be called again
                         self.run(cmdline, validopts)
                         return
             self.pushCompleted.emit()