Mercurial > hgsubversion
comparison tests/test_utility_commands.py @ 573:00393e9abff8
svncommands: make repo optional (useful for things like listauthors)
| author | Dirkjan Ochtman <dirkjan@ochtman.nl> |
|---|---|
| date | Tue, 23 Feb 2010 17:16:51 +0100 |
| parents | f0159775e0f1 |
| children | d96aa92d9ad9 |
comparison
equal
deleted
inserted
replaced
| 572:7f0e8fd6ee22 | 573:00393e9abff8 |
|---|---|
| 32 def test_info_output(self): | 32 def test_info_output(self): |
| 33 self._load_fixture_and_fetch('two_heads.svndump') | 33 self._load_fixture_and_fetch('two_heads.svndump') |
| 34 hg.update(self.repo, 'the_branch') | 34 hg.update(self.repo, 'the_branch') |
| 35 u = ui.ui() | 35 u = ui.ui() |
| 36 u.pushbuffer() | 36 u.pushbuffer() |
| 37 utility_commands.info(u, self.repo, self.wc_path) | 37 utility_commands.info(u, self.repo) |
| 38 actual = u.popbuffer() | 38 actual = u.popbuffer() |
| 39 expected = (expected_info_output % | 39 expected = (expected_info_output % |
| 40 {'date': '2008-10-08 01:39:05 +0000 (Wed, 08 Oct 2008)', | 40 {'date': '2008-10-08 01:39:05 +0000 (Wed, 08 Oct 2008)', |
| 41 'repourl': self.repourl, | 41 'repourl': self.repourl, |
| 42 'branch': 'branches/the_branch', | 42 'branch': 'branches/the_branch', |
| 43 'rev': 5, | 43 'rev': 5, |
| 44 }) | 44 }) |
| 45 self.assertEqual(actual, expected) | 45 self.assertEqual(actual, expected) |
| 46 hg.update(self.repo, 'default') | 46 hg.update(self.repo, 'default') |
| 47 u.pushbuffer() | 47 u.pushbuffer() |
| 48 utility_commands.info(u, self.repo, self.wc_path) | 48 utility_commands.info(u, self.repo) |
| 49 actual = u.popbuffer() | 49 actual = u.popbuffer() |
| 50 expected = (expected_info_output % | 50 expected = (expected_info_output % |
| 51 {'date': '2008-10-08 01:39:29 +0000 (Wed, 08 Oct 2008)', | 51 {'date': '2008-10-08 01:39:29 +0000 (Wed, 08 Oct 2008)', |
| 52 'repourl': self.repourl, | 52 'repourl': self.repourl, |
| 53 'branch': 'trunk', | 53 'branch': 'trunk', |
| 54 'rev': 6, | 54 'rev': 6, |
| 55 }) | 55 }) |
| 56 self.assertEqual(actual, expected) | 56 self.assertEqual(actual, expected) |
| 57 hg.update(self.repo, 'default') | 57 hg.update(self.repo, 'default') |
| 58 u.pushbuffer() | 58 u.pushbuffer() |
| 59 utility_commands.info(u, self.repo, self.wc_path, rev=3) | 59 utility_commands.info(u, self.repo, rev=3) |
| 60 actual = u.popbuffer() | 60 actual = u.popbuffer() |
| 61 expected = (expected_info_output % | 61 expected = (expected_info_output % |
| 62 {'date': '2008-10-08 01:39:05 +0000 (Wed, 08 Oct 2008)', | 62 {'date': '2008-10-08 01:39:05 +0000 (Wed, 08 Oct 2008)', |
| 63 'repourl': self.repourl, | 63 'repourl': self.repourl, |
| 64 'branch': 'branches/the_branch', | 64 'branch': 'branches/the_branch', |
| 69 def test_info_single(self): | 69 def test_info_single(self): |
| 70 self._load_fixture_and_fetch('two_heads.svndump', subdir='trunk') | 70 self._load_fixture_and_fetch('two_heads.svndump', subdir='trunk') |
| 71 hg.update(self.repo, 'tip') | 71 hg.update(self.repo, 'tip') |
| 72 u = ui.ui() | 72 u = ui.ui() |
| 73 u.pushbuffer() | 73 u.pushbuffer() |
| 74 utility_commands.info(u, self.repo, self.wc_path) | 74 utility_commands.info(u, self.repo) |
| 75 actual = u.popbuffer() | 75 actual = u.popbuffer() |
| 76 expected = (expected_info_output % | 76 expected = (expected_info_output % |
| 77 {'date': '2008-10-08 01:39:29 +0000 (Wed, 08 Oct 2008)', | 77 {'date': '2008-10-08 01:39:29 +0000 (Wed, 08 Oct 2008)', |
| 78 'repourl': self.repourl, | 78 'repourl': self.repourl, |
| 79 'branch': 'trunk', | 79 'branch': 'trunk', |
