Mercurial > public > mercurial-scm > hg-stable
diff mercurial/hg.py @ 5248:5517aa5aafb0
Merge with crew-stable
author | Alexis S. L. Carvalho <alexis@cecm.usp.br> |
---|---|
date | Mon, 27 Aug 2007 02:21:58 -0300 |
parents | 60acf1432ee0 76c4cadb49fc |
children | a32a8e50d233 |
line wrap: on
line diff
--- a/mercurial/hg.py Sun Aug 26 19:13:24 2007 +0200 +++ b/mercurial/hg.py Mon Aug 27 02:21:58 2007 -0300 @@ -22,10 +22,10 @@ '''parse url#branch, returning url, branch + revs''' if '#' not in url: - return url, (revs or None) + return url, (revs or None), None url, rev = url.split('#', 1) - return url, revs + [rev] + return url, revs + [rev], rev schemes = { 'bundle': bundlerepo, @@ -106,7 +106,7 @@ """ origsource = source - source, rev = parseurl(ui.expandpath(source), rev) + source, rev, checkout = parseurl(ui.expandpath(source), rev) if isinstance(source, str): src_repo = repository(ui, source) @@ -149,7 +149,7 @@ abspath = origsource copy = False if src_repo.local() and islocal(dest): - abspath = os.path.abspath(origsource) + abspath = os.path.abspath(util.drop_scheme('file', origsource)) copy = not pull and not rev if copy: @@ -226,10 +226,11 @@ fp.close() if update: - try: - checkout = dest_repo.lookup("default") - except: - checkout = dest_repo.changelog.tip() + if not checkout: + try: + checkout = dest_repo.lookup("default") + except: + checkout = dest_repo.changelog.tip() _update(dest_repo, checkout) return src_repo, dest_repo