hgext/rebase.py
changeset 7786 92455c1d6f83
parent 7636 e3f8c6d6b72e
child 7875 553aa0cbeab6
child 8242 aee8455ee8ec
--- a/hgext/rebase.py	Tue Feb 10 22:47:38 2009 +0100
+++ b/hgext/rebase.py	Sun Jan 18 19:59:51 2009 +0100
@@ -400,7 +400,9 @@
     'Call rebase after pull if the latter has been invoked with --rebase'
     if opts.get('rebase'):
         if opts.get('update'):
-            raise util.Abort(_('--update and --rebase are not compatible'))
+            del opts.get['update']
+            ui.debug(_('--update and --rebase are not compatible, ignoring '
+                                        'the update flag\n'))
 
         cmdutil.bail_if_changed(repo)
         revsprepull = len(repo)
@@ -408,6 +410,11 @@
         revspostpull = len(repo)
         if revspostpull > revsprepull:
             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
+                merge.update(repo, dest, False, False, False)
     else:
         orig(ui, repo, *args, **opts)