Mercurial > hgsubversion
comparison tests/test_fetch_mappings.py @ 867:50c13e01c7e3
test_util: add a load_and_fetch() returning the repo_path
author | Patrick Mezard <patrick@mezard.eu> |
---|---|
date | Thu, 19 Apr 2012 18:29:28 +0200 |
parents | 20e73b5ab6f7 |
children | 6bc8046e3d0a |
comparison
equal
deleted
inserted
replaced
866:20e73b5ab6f7 | 867:50c13e01c7e3 |
---|---|
65 | 65 |
66 def test_author_map_closing_author_stupid(self): | 66 def test_author_map_closing_author_stupid(self): |
67 self.test_author_map_closing_author(True) | 67 self.test_author_map_closing_author(True) |
68 | 68 |
69 def test_author_map_no_author(self, stupid=False): | 69 def test_author_map_no_author(self, stupid=False): |
70 self._load_fixture_and_fetch('no-author.svndump', stupid=stupid) | 70 repo, repo_path = self.load_and_fetch('no-author.svndump', |
71 stupid=stupid) | |
71 users = set(self.repo[r].user() for r in self.repo) | 72 users = set(self.repo[r].user() for r in self.repo) |
72 expected_users = ['(no author)@%s' % self.repo.svnmeta().uuid] | 73 expected_users = ['(no author)@%s' % self.repo.svnmeta().uuid] |
73 self.assertEqual(sorted(users), expected_users) | 74 self.assertEqual(sorted(users), expected_users) |
74 test_util.rmtree(self.wc_path) | 75 test_util.rmtree(self.wc_path) |
75 | 76 |
76 authormap = open(self.authors, 'w') | 77 authormap = open(self.authors, 'w') |
77 authormap.write("(no author)=Testy <test@example.com>") | 78 authormap.write("(no author)=Testy <test@example.com>") |
78 authormap.close() | 79 authormap.close() |
79 ui = self.ui(stupid) | 80 ui = self.ui(stupid) |
80 ui.setconfig('hgsubversion', 'authormap', self.authors) | 81 ui.setconfig('hgsubversion', 'authormap', self.authors) |
81 commands.clone(ui, test_util.fileurl(self.repo_path), | 82 commands.clone(ui, test_util.fileurl(repo_path), |
82 self.wc_path, authors=self.authors) | 83 self.wc_path, authors=self.authors) |
83 users = set(self.repo[r].user() for r in self.repo) | 84 users = set(self.repo[r].user() for r in self.repo) |
84 expected_users = ['Testy <test@example.com>'] | 85 expected_users = ['Testy <test@example.com>'] |
85 self.assertEqual(sorted(users), expected_users) | 86 self.assertEqual(sorted(users), expected_users) |
86 | 87 |
325 | 326 |
326 def test_tagren_changed_stupid(self): | 327 def test_tagren_changed_stupid(self): |
327 self.test_tagren_changed(True) | 328 self.test_tagren_changed(True) |
328 | 329 |
329 def test_empty_log_message(self, stupid=False): | 330 def test_empty_log_message(self, stupid=False): |
330 repo = self._load_fixture_and_fetch('empty-log-message.svndump', | 331 repo, repo_path = self.load_and_fetch('empty-log-message.svndump', |
331 stupid=stupid) | 332 stupid=stupid) |
332 | 333 |
333 self.assertEqual(repo['tip'].description(), '') | 334 self.assertEqual(repo['tip'].description(), '') |
334 | 335 |
335 test_util.rmtree(self.wc_path) | 336 test_util.rmtree(self.wc_path) |
336 | 337 |
337 ui = self.ui(stupid) | 338 ui = self.ui(stupid) |
338 ui.setconfig('hgsubversion', 'defaultmessage', 'blyf') | 339 ui.setconfig('hgsubversion', 'defaultmessage', 'blyf') |
339 commands.clone(ui, test_util.fileurl(self.repo_path), self.wc_path) | 340 commands.clone(ui, test_util.fileurl(repo_path), self.wc_path) |
340 | 341 |
341 self.assertEqual(self.repo['tip'].description(), 'blyf') | 342 self.assertEqual(self.repo['tip'].description(), 'blyf') |
342 | 343 |
343 | 344 |
344 def test_empty_log_message_stupid(self): | 345 def test_empty_log_message_stupid(self): |