# HG changeset patch # User Dan Villiom Podlaski Christiansen # Date 1285776266 -7200 # Node ID 1041fb1bec8c813b83684aa6dcb5a6f41692b7da # Parent cfc7df19e4dc9b1b3d340052f9fee5a54275a859 tests & help: fix compatibility with Mercurial 1.4 and earlier. The --branch option to clone, pull, etc., was introduced in 1.5, and our handling of it assumes that Mercurial also provides it. As a result, both documentation and the test are changed to reflect this. diff --git a/hgsubversion/help/subversion.rst b/hgsubversion/help/subversion.rst --- a/hgsubversion/help/subversion.rst +++ b/hgsubversion/help/subversion.rst @@ -40,7 +40,7 @@ issue :hg:`clone http://python-nose.goog works with any directory with a Subversion repository, and is know as a single directory clone. Normally, converted changesets will be marked as belonging to the ``default`` branch, but this can be changed by using the ``-b/--branch`` -option. +option introduced in Mercurial 1.5. Pulling new revisions into an already-converted repo is the same as from any other Mercurial source. Within the first example above, the following three diff --git a/tests/test_single_dir_clone.py b/tests/test_single_dir_clone.py --- a/tests/test_single_dir_clone.py +++ b/tests/test_single_dir_clone.py @@ -213,6 +213,7 @@ class TestSingleDir(test_util.TestBase): self.assertTrue('default' in self.svnls('')) self.assertEquals(len(self.repo.branchheads('default')), 1) + @test_util.requiresoption('branch') def test_push_single_dir_renamed_branch(self, stupid=False): # Tests pulling and pushing with a renamed branch # Based on test_push_single_dir @@ -248,6 +249,7 @@ class TestSingleDir(test_util.TestBase): self.assertEquals(set(['flaf']), set(self.repo[i].branch() for i in self.repo)) + @test_util.requiresoption('branch') def test_push_single_dir_renamed_branch_stupid(self): self.test_push_single_dir_renamed_branch(True)