Marcus Lindblom Sonestedt committed e649f97

rebaseif: Use same merge behaviour for rebase and merge (fixes #12)

Comments (0)

Files changed (1)

         hgext.rebase.rebase(ui, repo)
         ui.status(_('rebaseif: successful rebase\n'))
         return 0
-    except:
+    except Exception, e:
+        import traceback
+        traceback.print_exc(e)
         hgext.rebase.rebase(ui, repo, abort=True)
-    finally:
-        ui.setconfig('ui', 'merge', origmerge)
     ui.status(_('rebaseif: failed to rebase, attempting merge\n'))
     import mercurial.commands
     mercurial.commands.merge(ui, repo)
+    ui.setconfig('ui', 'merge', origmerge)
     return 0