mercurial/hg.py
changeset 6526 cfeeac24fc1e
parent 6525 a020247d75e5
child 6903 0642d9d7ec80
--- a/mercurial/hg.py	Fri Apr 11 22:19:51 2008 -0700
+++ b/mercurial/hg.py	Fri Apr 11 22:19:52 2008 -0700
@@ -109,7 +109,8 @@
     rev: revision to clone up to (implies pull=True)
 
     update: update working directory after clone completes, if
-    destination is local repository
+    destination is local repository (True means update to default rev,
+    anything else is treated as a revision)
     """
 
     if isinstance(source, str):
@@ -244,7 +245,9 @@
 
             if update:
                 dest_repo.ui.status(_("updating working directory\n"))
-                if not checkout:
+                if update is not True:
+                    checkout = update
+                elif not checkout:
                     try:
                         checkout = dest_repo.lookup("default")
                     except: