hgext/rebase.py
changeset 28117 41a0fb2b4bbc
parent 28015 a036e1ae1fbe
child 28118 0e3835c7e1cf
--- a/hgext/rebase.py	Mon Feb 08 14:17:11 2016 -0800
+++ b/hgext/rebase.py	Sat Feb 13 16:59:32 2016 +0000
@@ -1165,15 +1165,16 @@
                 # --source.
                 if 'source' in opts:
                     del opts['source']
-                rebase(ui, repo, **opts)
-                branch = repo[None].branch()
-                dest = repo[branch].rev()
-                if dest != repo['.'].rev():
-                    # there was nothing to rebase we force an update
-                    hg.update(repo, dest)
-                    if bookmarks.update(repo, [movemarkfrom], repo['.'].node()):
-                        ui.status(_("updating bookmark %s\n")
-                                  % repo._activebookmark)
+                if rebase(ui, repo, **opts) == _nothingtorebase():
+                    branch = repo[None].branch()
+                    dest = repo[branch].rev()
+                    if dest != repo['.'].rev():
+                        # there was nothing to rebase we force an update
+                        hg.update(repo, dest)
+                        if bookmarks.update(repo, [movemarkfrom],
+                                            repo['.'].node()):
+                            ui.status(_("updating bookmark %s\n")
+                                      % repo._activebookmark)
         finally:
             release(lock, wlock)
     else: