diff tests/test_single_dir_push.py @ 1570:d55c9d0ba350

tests: use scmutils.revsymbol instead of repo.__getitem__ for non-integers
author Paul Morelle <paul.morelle@octobus.net>
date Fri, 25 May 2018 11:52:03 +0200
parents 8410a978c650
children 7bb6562feb85
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
 
+revsymbol = test_util.revsymbol
+
 from hgsubversion import compathacks
 
 class TestSingleDirPush(test_util.TestBase):
@@ -157,7 +159,7 @@ class TestSingleDirPush(test_util.TestBa
         parent = repo['tip'].node()
         commit_to_branch('default', parent)
         commit_to_branch('foo', parent)
-        hg.update(repo, repo['foo'].node())
+        hg.update(repo, revsymbol(repo, 'foo').node())
         self.pushrevisions()
         repo = self.repo # repo is outdated after the rebase happens, refresh
         self.assertTrue('foo' in test_util.svnls(repo_path, ''))
@@ -165,7 +167,7 @@ class TestSingleDirPush(test_util.TestBa
         # Have to cross to another branch head, so hg.update doesn't work
         commands.update(self.ui(),
                         self.repo,
-                        self.repo.branchheads('default')[1],
+                        node.hex(self.repo.branchheads('default')[1]),
                         clean=True)
         self.pushrevisions()
         self.assertTrue('default' in test_util.svnls(repo_path, ''))