changeset 17989:e8c9b13c7799

Merge with stable.
author Augie Fackler <raf@durin42.com>
date Thu, 29 Nov 2012 11:44:22 -0600
parents 1683bca31752 (current diff) 848345a8d6ad (diff)
children 8216eb592dcd
files hgext/rebase.py
diffstat 2 files changed, 56 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/rebase.py	Thu Nov 29 08:44:54 2012 -0500
+++ b/hgext/rebase.py	Thu Nov 29 11:44:22 2012 -0600
@@ -710,6 +710,10 @@
             commands.postincoming = origpostincoming
         revspostpull = len(repo)
         if revspostpull > revsprepull:
+            # --rev option from pull conflict with rebase own --rev
+            # dropping it
+            if 'rev' in opts:
+                del opts['rev']
             rebase(ui, repo, **opts)
             branch = repo[None].branch()
             dest = repo[branch].rev()
--- a/tests/test-rebase-pull.t	Thu Nov 29 08:44:54 2012 -0500
+++ b/tests/test-rebase-pull.t	Thu Nov 29 11:44:22 2012 -0600
@@ -114,3 +114,55 @@
   |
 
   $ cd ..
+
+pull --rebase works when a specific revision is pulled (issue3619)
+
+  $ cd a
+  $ hg tglog
+  @  2: 'R1'
+  |
+  o  1: 'C2'
+  |
+  o  0: 'C1'
+  
+  $ echo R2 > R2
+  $ hg ci -Am R2
+  adding R2
+  $ echo R3 > R3
+  $ hg ci -Am R3
+  adding R3
+  $ cd ../c
+  $ hg tglog
+  o  2: 'R1'
+  |
+  @  1: 'C2'
+  |
+  o  0: 'C1'
+  
+  $ echo L1 > L1
+  $ hg ci -Am L1
+  adding L1
+  created new head
+  $ hg pull --rev tip --rebase
+  pulling from $TESTTMP/a
+  searching for changes
+  adding changesets
+  adding manifests
+  adding file changes
+  added 2 changesets with 2 changes to 2 files
+  saved backup bundle to $TESTTMP/c/.hg/strip-backup/ff8d69a621f9-backup.hg (glob)
+  $ hg tglog
+  @  5: 'L1'
+  |
+  o  4: 'R3'
+  |
+  o  3: 'R2'
+  |
+  o  2: 'R1'
+  |
+  o  1: 'C2'
+  |
+  o  0: 'C1'
+  
+
+