comparison mercurial/hg.py @ 26354:c1fb2cab6260

clone: check update rev for being True In 30be3aeb5344, there was an attempt to fallback to looking up the update revision assuming it was always a rev but the documentation states: True means update to default rev, anything else is treated as a revision Therefore, we should only fallback to looking up the update rev if it is not True. This bug was found in hg-git and I couldn't think of a test that does this in pure Mercurial since the source repository is checked for the revision as well (and therefore gracefully falls back).
author Sean Farley <sean@farley.io>
date Thu, 24 Sep 2015 15:52:11 -0700
parents 7c20d501709b
children 56b2bcea2529
comparison
equal deleted inserted replaced
26353:7c20d501709b 26354:c1fb2cab6260
580 status = None 580 status = None
581 if checkout is not None: 581 if checkout is not None:
582 try: 582 try:
583 uprev = destrepo.lookup(checkout) 583 uprev = destrepo.lookup(checkout)
584 except error.RepoLookupError: 584 except error.RepoLookupError:
585 try: 585 if update is not True:
586 uprev = destrepo.lookup(update) 586 try:
587 except error.RepoLookupError: 587 uprev = destrepo.lookup(update)
588 pass 588 except error.RepoLookupError:
589 pass
589 if uprev is None: 590 if uprev is None:
590 try: 591 try:
591 uprev = destrepo._bookmarks['@'] 592 uprev = destrepo._bookmarks['@']
592 update = '@' 593 update = '@'
593 bn = destrepo[uprev].branch() 594 bn = destrepo[uprev].branch()