Mercurial > hgsubversion
comparison tests/test_push_command.py @ 242:06130689a2c8
Move push into svncommands.
author | Dirkjan Ochtman <dirkjan@ochtman.nl> |
---|---|
date | Wed, 08 Apr 2009 17:53:48 +0200 |
parents | 4950b18cf949 |
children | ffccf0080e54 |
comparison
equal
deleted
inserted
replaced
241:4950b18cf949 | 242:06130689a2c8 |
---|---|
8 from mercurial import node | 8 from mercurial import node |
9 from mercurial import ui | 9 from mercurial import ui |
10 from mercurial import revlog | 10 from mercurial import revlog |
11 | 11 |
12 import svncommands | 12 import svncommands |
13 import push_cmd | |
14 import test_util | 13 import test_util |
15 import time | 14 import time |
16 | 15 |
17 | 16 |
18 class PushOverSvnserveTests(test_util.TestBase): | 17 class PushOverSvnserveTests(test_util.TestBase): |
67 {'branch': 'default',}) | 66 {'branch': 'default',}) |
68 new_hash = repo.commitctx(ctx) | 67 new_hash = repo.commitctx(ctx) |
69 if not commit: | 68 if not commit: |
70 return # some tests use this test as an extended setup. | 69 return # some tests use this test as an extended setup. |
71 hg.update(repo, repo['tip'].node()) | 70 hg.update(repo, repo['tip'].node()) |
72 push_cmd.push_revisions_to_subversion(ui.ui(), repo=self.repo, | 71 svncommands.push(ui.ui(), repo=self.repo, hg_repo_path=self.wc_path, |
73 hg_repo_path=self.wc_path, | 72 svn_url='svn://localhost/') |
74 svn_url='svn://localhost/') | |
75 tip = self.repo['tip'] | 73 tip = self.repo['tip'] |
76 self.assertNotEqual(tip.node(), old_tip) | 74 self.assertNotEqual(tip.node(), old_tip) |
77 self.assertEqual(tip.parents()[0].node(), expected_parent) | 75 self.assertEqual(tip.parents()[0].node(), expected_parent) |
78 self.assertEqual(tip['adding_file'].data(), 'foo') | 76 self.assertEqual(tip['adding_file'].data(), 'foo') |
79 self.assertEqual(tip.branch(), 'default') | 77 self.assertEqual(tip.branch(), 'default') |
170 '2008-12-21 16:32:00 -0500', | 168 '2008-12-21 16:32:00 -0500', |
171 {'branch': 'localbranch', }) | 169 {'branch': 'localbranch', }) |
172 newhash = self.repo.commitctx(ctx) | 170 newhash = self.repo.commitctx(ctx) |
173 repo = self.repo | 171 repo = self.repo |
174 hg.update(repo, newhash) | 172 hg.update(repo, newhash) |
175 push_cmd.push_revisions_to_subversion(ui.ui(), | 173 svncommands.push(ui.ui(), repo=repo, |
176 repo=repo, | 174 svn_url=test_util.fileurl(self.repo_path), |
177 svn_url=test_util.fileurl(self.repo_path), | 175 hg_repo_path=self.wc_path) |
178 hg_repo_path=self.wc_path) | |
179 self.assertEqual(self.repo['tip'].parents()[0].parents()[0].node(), oldtiphash) | 176 self.assertEqual(self.repo['tip'].parents()[0].parents()[0].node(), oldtiphash) |
180 self.assertEqual(self.repo['tip'].files(), ['delta', ]) | 177 self.assertEqual(self.repo['tip'].files(), ['delta', ]) |
181 self.assertEqual(self.repo['tip'].manifest().keys(), | 178 self.assertEqual(self.repo['tip'].manifest().keys(), |
182 ['alpha', 'beta', 'gamma', 'delta']) | 179 ['alpha', 'beta', 'gamma', 'delta']) |
183 | 180 |