Mercurial > hgsubversion
comparison tests/test_utility_commands.py @ 241:4950b18cf949
Move fetch_command.fetch_revisions() to svncommands.pull().
author | Dirkjan Ochtman <dirkjan@ochtman.nl> |
---|---|
date | Wed, 08 Apr 2009 17:49:30 +0200 |
parents | c34abd2448b7 |
children | c3d5c4ae9c7c |
comparison
equal
deleted
inserted
replaced
240:1aa1d2d406d9 | 241:4950b18cf949 |
---|---|
6 from mercurial import revlog | 6 from mercurial import revlog |
7 from mercurial import context | 7 from mercurial import context |
8 from mercurial import node | 8 from mercurial import node |
9 | 9 |
10 import utility_commands | 10 import utility_commands |
11 import fetch_command | 11 import svncommands |
12 import test_util | 12 import test_util |
13 | 13 |
14 expected_info_output = '''URL: %(repourl)s/%(branch)s | 14 expected_info_output = '''URL: %(repourl)s/%(branch)s |
15 Repository Root: %(repourl)s | 15 Repository Root: %(repourl)s |
16 Repository UUID: df2126f7-00ab-4d49-b42c-7e981dde0bcf | 16 Repository UUID: df2126f7-00ab-4d49-b42c-7e981dde0bcf |
143 | 143 |
144 def test_url_is_normalized(self): | 144 def test_url_is_normalized(self): |
145 """Verify url gets normalized on initial clone. | 145 """Verify url gets normalized on initial clone. |
146 """ | 146 """ |
147 test_util.load_svndump_fixture(self.repo_path, 'two_revs.svndump') | 147 test_util.load_svndump_fixture(self.repo_path, 'two_revs.svndump') |
148 fetch_command.fetch_revisions(ui.ui(), | 148 svncommands.pull(ui.ui(), |
149 svn_url=test_util.fileurl(self.repo_path)+'/', | 149 svn_url=test_util.fileurl(self.repo_path) + '/', |
150 hg_repo_path=self.wc_path, | 150 hg_repo_path=self.wc_path, stupid=False) |
151 stupid=False) | |
152 hg.update(self.repo, 'tip') | 151 hg.update(self.repo, 'tip') |
153 u = ui.ui() | 152 u = ui.ui() |
154 utility_commands.print_wc_url(u, self.repo, self.wc_path) | 153 utility_commands.print_wc_url(u, self.repo, self.wc_path) |
155 expected = test_util.fileurl(self.repo_path) + '\n' | 154 expected = test_util.fileurl(self.repo_path) + '\n' |
156 self.assertEqual(u.stream.getvalue(), expected) | 155 self.assertEqual(u.stream.getvalue(), expected) |
157 | 156 |
158 def test_genignore(self): | 157 def test_genignore(self): |
159 """Verify url gets normalized on initial clone. | 158 """Verify url gets normalized on initial clone. |
160 """ | 159 """ |
161 test_util.load_svndump_fixture(self.repo_path, 'ignores.svndump') | 160 test_util.load_svndump_fixture(self.repo_path, 'ignores.svndump') |
162 fetch_command.fetch_revisions(ui.ui(), | 161 svncommands.pull(ui.ui(), |
163 svn_url=test_util.fileurl(self.repo_path)+'/', | 162 svn_url=test_util.fileurl(self.repo_path) + '/', |
164 hg_repo_path=self.wc_path, | 163 hg_repo_path=self.wc_path, stupid=False) |
165 stupid=False) | |
166 hg.update(self.repo, 'tip') | 164 hg.update(self.repo, 'tip') |
167 u = ui.ui() | 165 u = ui.ui() |
168 utility_commands.generate_ignore(u, self.repo, self.wc_path) | 166 utility_commands.generate_ignore(u, self.repo, self.wc_path) |
169 self.assertEqual(open(os.path.join(self.wc_path, '.hgignore')).read(), | 167 self.assertEqual(open(os.path.join(self.wc_path, '.hgignore')).read(), |
170 '.hgignore\nsyntax:glob\nblah\notherblah\nbaz/magic\n') | 168 '.hgignore\nsyntax:glob\nblah\notherblah\nbaz/magic\n') |