Mercurial > hgsubversion
comparison 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 |
comparison
equal
deleted
inserted
replaced
| 1569:4afe8d7e4602 | 1570:d55c9d0ba350 |
|---|---|
| 7 from mercurial import commands | 7 from mercurial import commands |
| 8 from mercurial import context | 8 from mercurial import context |
| 9 from mercurial import hg | 9 from mercurial import hg |
| 10 from mercurial import node | 10 from mercurial import node |
| 11 from mercurial import ui | 11 from mercurial import ui |
| 12 | |
| 13 revsymbol = test_util.revsymbol | |
| 12 | 14 |
| 13 from hgsubversion import compathacks | 15 from hgsubversion import compathacks |
| 14 | 16 |
| 15 class TestSingleDirPush(test_util.TestBase): | 17 class TestSingleDirPush(test_util.TestBase): |
| 16 stupid_mode_tests = True | 18 stupid_mode_tests = True |
| 155 {'branch': name, })) | 157 {'branch': name, })) |
| 156 | 158 |
| 157 parent = repo['tip'].node() | 159 parent = repo['tip'].node() |
| 158 commit_to_branch('default', parent) | 160 commit_to_branch('default', parent) |
| 159 commit_to_branch('foo', parent) | 161 commit_to_branch('foo', parent) |
| 160 hg.update(repo, repo['foo'].node()) | 162 hg.update(repo, revsymbol(repo, 'foo').node()) |
| 161 self.pushrevisions() | 163 self.pushrevisions() |
| 162 repo = self.repo # repo is outdated after the rebase happens, refresh | 164 repo = self.repo # repo is outdated after the rebase happens, refresh |
| 163 self.assertTrue('foo' in test_util.svnls(repo_path, '')) | 165 self.assertTrue('foo' in test_util.svnls(repo_path, '')) |
| 164 self.assertEqual(compathacks.branchset(repo), set(['default'])) | 166 self.assertEqual(compathacks.branchset(repo), set(['default'])) |
| 165 # Have to cross to another branch head, so hg.update doesn't work | 167 # Have to cross to another branch head, so hg.update doesn't work |
| 166 commands.update(self.ui(), | 168 commands.update(self.ui(), |
| 167 self.repo, | 169 self.repo, |
| 168 self.repo.branchheads('default')[1], | 170 node.hex(self.repo.branchheads('default')[1]), |
| 169 clean=True) | 171 clean=True) |
| 170 self.pushrevisions() | 172 self.pushrevisions() |
| 171 self.assertTrue('default' in test_util.svnls(repo_path, '')) | 173 self.assertTrue('default' in test_util.svnls(repo_path, '')) |
| 172 self.assertEquals(len(self.repo.branchheads('default')), 1) | 174 self.assertEquals(len(self.repo.branchheads('default')), 1) |
| 173 | 175 |
