mercurial/hg.py
changeset 3448 6ca49c5fe268
parent 3441 ef2e990f9047
child 3679 2956948b81f3
equal deleted inserted replaced
3447:ef1032c223e7 3448:6ca49c5fe268
   174         dest_repo = repository(ui, dest)
   174         dest_repo = repository(ui, dest)
   175 
   175 
   176     else:
   176     else:
   177         revs = None
   177         revs = None
   178         if rev:
   178         if rev:
   179             if not src_repo.local():
   179             if 'lookup' not in src_repo.capabilities:
   180                 raise util.Abort(_("clone by revision not supported yet "
   180                 raise util.Abort(_("src repository does not support revision "
   181                                    "for remote repositories"))
   181                                    "lookup and so doesn't support clone by "
       
   182                                    "revision"))
   182             revs = [src_repo.lookup(r) for r in rev]
   183             revs = [src_repo.lookup(r) for r in rev]
   183 
   184 
   184         if dest_repo.local():
   185         if dest_repo.local():
   185             dest_repo.clone(src_repo, heads=revs, stream=stream)
   186             dest_repo.clone(src_repo, heads=revs, stream=stream)
   186         elif src_repo.local():
   187         elif src_repo.local():