Mercurial > hgsubversion
comparison 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 |
comparison
equal
deleted
inserted
replaced
| 1102:7635d30effa7 | 1103:6e1dbf6cbc92 |
|---|---|
| 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 from hgsubversion import compathacks | |
| 12 | 14 |
| 13 class TestSingleDirPush(test_util.TestBase): | 15 class TestSingleDirPush(test_util.TestBase): |
| 14 stupid_mode_tests = True | 16 stupid_mode_tests = True |
| 15 obsolete_mode_tests = True | 17 obsolete_mode_tests = True |
| 16 | 18 |
| 147 commit_to_branch('foo', parent) | 149 commit_to_branch('foo', parent) |
| 148 hg.update(repo, repo['foo'].node()) | 150 hg.update(repo, repo['foo'].node()) |
| 149 self.pushrevisions() | 151 self.pushrevisions() |
| 150 repo = self.repo # repo is outdated after the rebase happens, refresh | 152 repo = self.repo # repo is outdated after the rebase happens, refresh |
| 151 self.assertTrue('foo' in test_util.svnls(repo_path, '')) | 153 self.assertTrue('foo' in test_util.svnls(repo_path, '')) |
| 152 self.assertEqual(repo.branchtags().keys(), ['default']) | 154 self.assertEqual(compathacks.branchset(repo), set(['default'])) |
| 153 # Have to cross to another branch head, so hg.update doesn't work | 155 # Have to cross to another branch head, so hg.update doesn't work |
| 154 commands.update(ui.ui(), | 156 commands.update(ui.ui(), |
| 155 self.repo, | 157 self.repo, |
| 156 self.repo.branchheads('default')[1], | 158 self.repo.branchheads('default')[1], |
| 157 clean=True) | 159 clean=True) |
