comparison mercurial/hg.py @ 8417:39cf453da958

clone: try updating to the actual changeset specified in options When cloning with the -r option or # url format from a tag the destination repo most likely won't have the tag. We can save the lookup result to get to the correct parent anyway. Similar to issue1306, but for tags.
author Brett Carter <brett@rdnzl.net>
date Thu, 14 May 2009 22:00:56 +0200
parents b87a50b7125c
children 2c097e22492c
comparison
equal deleted inserted replaced
8416:9dfee83c93c8 8417:39cf453da958
217 if 'lookup' not in src_repo.capabilities: 217 if 'lookup' not in src_repo.capabilities:
218 raise util.Abort(_("src repository does not support revision " 218 raise util.Abort(_("src repository does not support revision "
219 "lookup and so doesn't support clone by " 219 "lookup and so doesn't support clone by "
220 "revision")) 220 "revision"))
221 revs = [src_repo.lookup(r) for r in rev] 221 revs = [src_repo.lookup(r) for r in rev]
222 222 checkout = revs[0]
223 if dest_repo.local(): 223 if dest_repo.local():
224 dest_repo.clone(src_repo, heads=revs, stream=stream) 224 dest_repo.clone(src_repo, heads=revs, stream=stream)
225 elif src_repo.local(): 225 elif src_repo.local():
226 src_repo.push(dest_repo, revs=revs) 226 src_repo.push(dest_repo, revs=revs)
227 else: 227 else: