Mercurial > hg
changeset 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 | f51713b8c6fa |
files | mercurial/hg.py |
diffstat | 1 files changed, 5 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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['@']