Mercurial > public > mercurial-scm > hg
comparison mercurial/hg.py @ 17342:471f30d360ea stable
clone: don't fail with --update for non-local clones (issue3578)
This was broken by 5884812686f7 due to lack of test coverage. This
adds a test and fixes the defect.
author | Augie Fackler <raf@durin42.com> |
---|---|
date | Wed, 08 Aug 2012 10:04:02 -0500 |
parents | 6ffb35b2284c |
children | fdd0fc046cf1 4a07d2ff7c66 |
comparison
equal
deleted
inserted
replaced
17340:96189d60d810 | 17342:471f30d360ea |
---|---|
396 | 396 |
397 destrepo.ui.setconfig('paths', 'default', defaulturl) | 397 destrepo.ui.setconfig('paths', 'default', defaulturl) |
398 | 398 |
399 if update: | 399 if update: |
400 if update is not True: | 400 if update is not True: |
401 checkout = srcrepo.lookup(update) | 401 checkout = srcpeer.lookup(update) |
402 for test in (checkout, 'default', 'tip'): | 402 for test in (checkout, 'default', 'tip'): |
403 if test is None: | 403 if test is None: |
404 continue | 404 continue |
405 try: | 405 try: |
406 uprev = destrepo.lookup(test) | 406 uprev = destrepo.lookup(test) |