Merge with stable
authorMartin Geisler <mg@aragost.com>
Thu, 12 Aug 2010 18:30:24 +0200
changeset 11823 f1c2de22b8a8
parent 11822 0cae834cdc80 (current diff)
parent 11818 b1ae33b813cb (diff)
child 11831 00fee6394daf
Merge with stable
tests/test-clone.t
--- a/mercurial/hg.py	Thu Aug 12 18:30:06 2010 +0200
+++ b/mercurial/hg.py	Thu Aug 12 18:30:24 2010 +0200
@@ -221,7 +221,7 @@
         src_repo = repository(ui, source)
     else:
         src_repo = source
-        branch = (None, [])
+        branch = (None, branch or [])
         origsource = source = src_repo.url()
     rev, checkout = addbranchrevs(src_repo, src_repo, branch, rev)
 
--- a/tests/test-clone.t	Thu Aug 12 18:30:06 2010 +0200
+++ b/tests/test-clone.t	Thu Aug 12 18:30:24 2010 +0200
@@ -431,3 +431,13 @@
 
   $ rm -r ua
 
+cat <<EOF > branchclone.py
+from mercurial import ui, hg
+myui = ui.ui()
+repo = hg.repository(myui, 'a')
+hg.clone(myui, repo, dest="ua", branch=["stable",])
+EOF
+
+python branchclone.py
+rm -r ua
+