Mercurial > public > mercurial-scm > hg
comparison mercurial/cmdutil.py @ 5222:cbe6e263357b
parseurl: also return the revision after the "#"; add a test
author | Alexis S. L. Carvalho <alexis@cecm.usp.br> |
---|---|
date | Mon, 27 Aug 2007 01:44:35 -0300 |
parents | 3d35c8cb5eb4 |
children | 5517aa5aafb0 |
comparison
equal
deleted
inserted
replaced
5221:8ede77c2d008 | 5222:cbe6e263357b |
---|---|
460 | 460 |
461 def parseurl(url, revs): | 461 def parseurl(url, revs): |
462 '''parse url#branch, returning url, branch + revs''' | 462 '''parse url#branch, returning url, branch + revs''' |
463 | 463 |
464 if '#' not in url: | 464 if '#' not in url: |
465 return url, (revs or None) | 465 return url, (revs or None), None |
466 | 466 |
467 url, rev = url.split('#', 1) | 467 url, rev = url.split('#', 1) |
468 return url, revs + [rev] | 468 return url, revs + [rev], rev |
469 | 469 |
470 def revpair(repo, revs): | 470 def revpair(repo, revs): |
471 '''return pair of nodes, given list of revisions. second item can | 471 '''return pair of nodes, given list of revisions. second item can |
472 be None, meaning use working dir.''' | 472 be None, meaning use working dir.''' |
473 | 473 |