changeset 712:1041fb1bec8c

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.
author Dan Villiom Podlaski Christiansen <danchr@gmail.com>
date Wed, 29 Sep 2010 18:04:26 +0200
parents cfc7df19e4dc
children 69c0e7c4faf9
files hgsubversion/help/subversion.rst tests/test_single_dir_clone.py
diffstat 2 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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
--- 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)