##// END OF EJS Templates
pull: with -u and -r, update to the first revision given...
Sune Foldager -
r10358:d42821cd default
parent child Browse files
Show More
@@ -22,10 +22,10 b' def parseurl(url, revs=[]):'
22 22 '''parse url#branch, returning url, branch + revs'''
23 23
24 24 if '#' not in url:
25 return url, (revs or None), revs and revs[-1] or None
25 return url, (revs or None), revs and revs[0] or None
26 26
27 27 url, branch = url.split('#', 1)
28 checkout = revs and revs[-1] or branch
28 checkout = revs and revs[0] or branch
29 29 return url, (revs or []) + [branch], checkout
30 30
31 31 schemes = {
@@ -188,7 +188,7 b' def clone(ui, source, dest=None, pull=Fa'
188 188 else:
189 189 src_repo = source
190 190 origsource = source = src_repo.url()
191 checkout = rev and rev[-1] or None
191 checkout = rev and rev[0] or None
192 192
193 193 if dest is None:
194 194 dest = defaultdest(source)
@@ -17,6 +17,11 b' cd copy'
17 17 echo '% pull a missing revision'
18 18 hg pull -qr missing ../repo
19 19
20 echo '% pull multiple revisions with update'
21 hg pull -qu -r 0 -r 1 ../repo
22 hg -q parents
23 hg rollback
24
20 25 echo '% pull -r 0'
21 26 hg pull -qr 0 ../repo
22 27 hg log
@@ -17,6 +17,9 b' summary: add foo'
17 17
18 18 % pull a missing revision
19 19 abort: unknown revision 'missing'!
20 % pull multiple revisions with update
21 0:bbd179dfa0a7
22 rolling back last transaction
20 23 % pull -r 0
21 24 changeset: 0:bbd179dfa0a7
22 25 tag: tip
General Comments 0
You need to be logged in to leave comments. Login now