diff --git a/mercurial/hg.py b/mercurial/hg.py --- a/mercurial/hg.py +++ b/mercurial/hg.py @@ -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)