diff mercurial/hg.py @ 10358:d42821cd5c96

pull: with -u and -r, update to the first revision given This makes pull consistent with clone. The actual change is in mercurial.hg.parseurl, changing its checkout result, which is only used for pull.
author Sune Foldager <cryo@cyanite.org>
date Sat, 06 Feb 2010 20:24:51 +0100
parents 08a0f04b56bd
children d757bc0c7865
line wrap: on
line diff
--- a/mercurial/hg.py	Sun Feb 07 10:01:55 2010 +0100
+++ b/mercurial/hg.py	Sat Feb 06 20:24:51 2010 +0100
@@ -22,10 +22,10 @@
     '''parse url#branch, returning url, branch + revs'''
 
     if '#' not in url:
-        return url, (revs or None), revs and revs[-1] or None
+        return url, (revs or None), revs and revs[0] or None
 
     url, branch = url.split('#', 1)
-    checkout = revs and revs[-1] or branch
+    checkout = revs and revs[0] or branch
     return url, (revs or []) + [branch], checkout
 
 schemes = {
@@ -188,7 +188,7 @@
     else:
         src_repo = source
         origsource = source = src_repo.url()
-        checkout = rev and rev[-1] or None
+        checkout = rev and rev[0] or None
 
     if dest is None:
         dest = defaultdest(source)