# HG changeset patch # User Sean Farley # Date 1443135131 25200 # Node ID c1fb2cab626066fc365203b21d7e0cf9ff1724d1 # Parent 7c20d501709b7a23c1334bf1fd2905fd42f559d0 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). diff -r 7c20d501709b -r c1fb2cab6260 mercurial/hg.py --- a/mercurial/hg.py Thu Sep 24 15:47:23 2015 -0700 +++ b/mercurial/hg.py Thu Sep 24 15:52:11 2015 -0700 @@ -582,10 +582,11 @@ try: uprev = destrepo.lookup(checkout) except error.RepoLookupError: - try: - uprev = destrepo.lookup(update) - except error.RepoLookupError: - pass + if update is not True: + try: + uprev = destrepo.lookup(update) + except error.RepoLookupError: + pass if uprev is None: try: uprev = destrepo._bookmarks['@']