diff mercurial/hg.py @ 17342:471f30d360ea stable

clone: don't fail with --update for non-local clones (issue3578) This was broken by 5884812686f7 due to lack of test coverage. This adds a test and fixes the defect.
author Augie Fackler <raf@durin42.com>
date Wed, 08 Aug 2012 10:04:02 -0500
parents 6ffb35b2284c
children fdd0fc046cf1 4a07d2ff7c66
line wrap: on
line diff
--- a/mercurial/hg.py	Mon Aug 06 12:03:07 2012 -0500
+++ b/mercurial/hg.py	Wed Aug 08 10:04:02 2012 -0500
@@ -398,7 +398,7 @@
 
             if update:
                 if update is not True:
-                    checkout = srcrepo.lookup(update)
+                    checkout = srcpeer.lookup(update)
                 for test in (checkout, 'default', 'tip'):
                     if test is None:
                         continue