changeset 16576:eab32ab5cd65

merge with stable
author Matt Mackall <mpm@selenic.com>
date Thu, 03 May 2012 16:12:52 -0500
parents d7c9976b930e (diff) 91323a78aac2 (current diff)
children 43fb170a23bd
files
diffstat 3 files changed, 11 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/rebase.py	Thu May 03 16:06:33 2012 -0500
+++ b/hgext/rebase.py	Thu May 03 16:12:52 2012 -0500
@@ -182,7 +182,7 @@
                 branch = repo[None].branch()
                 dest = repo[branch]
             else:
-                dest = repo[destf]
+                dest = scmutil.revsingle(repo, destf)
 
             if revf:
                 rebaseset = repo.revs('%lr', revf)
@@ -201,7 +201,7 @@
                 root = None
 
             if not rebaseset:
-                repo.ui.debug('base is ancestor of destination')
+                repo.ui.debug('base is ancestor of destination\n')
                 result = None
             elif not keepf and list(repo.revs('first(children(%ld) - %ld)',
                                               rebaseset, rebaseset)):
@@ -618,7 +618,7 @@
     if commonbase == dest:
         samebranch = root.branch() == dest.branch()
         if samebranch and root in dest.children():
-           repo.ui.debug('source is a child of destination')
+           repo.ui.debug('source is a child of destination\n')
            return None
         # rebase on ancestor, force detach
         detach = True
--- a/mercurial/patch.py	Thu May 03 16:06:33 2012 -0500
+++ b/mercurial/patch.py	Thu May 03 16:12:52 2012 -0500
@@ -1040,12 +1040,13 @@
             hunk.append(l)
             return l.rstrip('\r\n')
 
-        line = getline(lr, self.hunk)
-        while line and not line.startswith('literal '):
+        while True:
             line = getline(lr, self.hunk)
-        if not line:
-            raise PatchError(_('could not extract "%s" binary data')
-                             % self._fname)
+            if not line:
+                raise PatchError(_('could not extract "%s" binary data')
+                                 % self._fname)
+            if line.startswith('literal '):
+                break
         size = int(line[8:].rstrip())
         dec = []
         line = getline(lr, self.hunk)
--- a/tests/test-rebase-parameters.t	Thu May 03 16:06:33 2012 -0500
+++ b/tests/test-rebase-parameters.t	Thu May 03 16:12:52 2012 -0500
@@ -158,12 +158,12 @@
   $ cd ..
 
 
-Rebase with dest == `hg branch` => same as no arguments (from 3 onto 8):
+Rebase with dest == branch(.) => same as no arguments (from 3 onto 8):
 
   $ hg clone -q -u 3 a a3
   $ cd a3
 
-  $ hg rebase --dest `hg branch`
+  $ hg rebase --dest 'branch(.)'
   saved backup bundle to $TESTTMP/a3/.hg/strip-backup/*-backup.hg (glob)
 
   $ hg tglog