# HG changeset patch # User Martin Geisler # Date 2010-08-12 16:30:24 # Node ID f1c2de22b8a88baf36c69b852f8a3b35ca6b6c91 # Parent 0cae834cdc8001b43010dab6e74eb54a8aa8d865 # Parent b1ae33b813cb5c0f7a7b95de112b21182f972a4d Merge with stable diff --git a/mercurial/hg.py b/mercurial/hg.py --- a/mercurial/hg.py +++ b/mercurial/hg.py @@ -221,7 +221,7 @@ def clone(ui, source, dest=None, pull=Fa 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) diff --git a/tests/test-clone.t b/tests/test-clone.t --- a/tests/test-clone.t +++ b/tests/test-clone.t @@ -431,3 +431,13 @@ Testing issue2267: $ rm -r ua +cat < 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 +