diff tests/test_single_dir_push.py @ 1103:6e1dbf6cbc92

compathacks: new module to collect hacks to work around hg internals changing This includes branchset(), which provides a portable way to get the set of branches present in a repository.
author Augie Fackler <raf@durin42.com>
date Mon, 03 Feb 2014 01:55:56 -0500
parents cf325cd90b22
children f1dd304be8aa
line wrap: on
line diff
--- a/tests/test_single_dir_push.py
+++ b/tests/test_single_dir_push.py
@@ -10,6 +10,8 @@ from mercurial import hg
 from mercurial import node
 from mercurial import ui
 
+from hgsubversion import compathacks
+
 class TestSingleDirPush(test_util.TestBase):
     stupid_mode_tests = True
     obsolete_mode_tests = True
@@ -149,7 +151,7 @@ class TestSingleDirPush(test_util.TestBa
         self.pushrevisions()
         repo = self.repo # repo is outdated after the rebase happens, refresh
         self.assertTrue('foo' in test_util.svnls(repo_path, ''))
-        self.assertEqual(repo.branchtags().keys(), ['default'])
+        self.assertEqual(compathacks.branchset(repo), set(['default']))
         # Have to cross to another branch head, so hg.update doesn't work
         commands.update(ui.ui(),
                         self.repo,