# HG changeset patch # User Martin von Zweigbergk # Date 1523202823 25200 # Node ID c569e51ee4499f0a6045cb925ca504a99f405e5e # Parent d665b4ea7d4c053fa07117ff3eb6789914620a85 clone: avoid using repo.lookup() with binary nodeid The code in hg.clone() is a bit of a mess, but it seems like the "checkout" variable is always a binary nodeid (tests pass when run with "assert len(checkout) == 20" before the repo.lookup()). repo.lookup() will soon work only with string inputs, so we need remove this use. Differential Revision: https://phab.mercurial-scm.org/D3191 diff -r d665b4ea7d4c -r c569e51ee449 mercurial/hg.py --- a/mercurial/hg.py Sun Apr 08 08:41:58 2018 -0700 +++ b/mercurial/hg.py Sun Apr 08 08:53:43 2018 -0700 @@ -711,9 +711,9 @@ uprev = None status = None if checkout is not None: - try: - uprev = destrepo.lookup(checkout) - except error.RepoLookupError: + if checkout in destrepo: + uprev = checkout + else: if update is not True: try: uprev = destrepo.lookup(update)