annotate 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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
149
04800fda7af5 rebase: preserve local branch names.
Augie Fackler <durin42@gmail.com>
parents: 140
diff changeset
1 import os
153
46f6b872c988 tests: Fix some missing suite definitions so that running the full testsuite
Augie Fackler <durin42@gmail.com>
parents: 149
diff changeset
2 import unittest
139
89a737852d33 utility_commands: Add tests for url and info. Fix a bad mock in the process.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
3
264
112d57bb736e rebase: moved to wrappers, now a wrapper around rebase triggered with --svn.
Augie Fackler <durin42@gmail.com>
parents: 257
diff changeset
4 from hgext import rebase
139
89a737852d33 utility_commands: Add tests for url and info. Fix a bad mock in the process.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
5 from mercurial import ui
89a737852d33 utility_commands: Add tests for url and info. Fix a bad mock in the process.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
6 from mercurial import hg
149
04800fda7af5 rebase: preserve local branch names.
Augie Fackler <durin42@gmail.com>
parents: 140
diff changeset
7 from mercurial import revlog
04800fda7af5 rebase: preserve local branch names.
Augie Fackler <durin42@gmail.com>
parents: 140
diff changeset
8 from mercurial import context
157
91541523ea5c utility_commands: Test outgoing and fix it to work again.
Augie Fackler <durin42@gmail.com>
parents: 153
diff changeset
9 from mercurial import node
347
537de0300510 Remove the 'outgoing' wrapper, and use the Mercurial infrastructure instead.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 337
diff changeset
10 from mercurial import commands
139
89a737852d33 utility_commands: Add tests for url and info. Fix a bad mock in the process.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
11
337
46e69be8e2c8 Reorganize to have a more conventional module structure.
Augie Fackler <durin42@gmail.com>
parents: 331
diff changeset
12 from hgsubversion import util
46e69be8e2c8 Reorganize to have a more conventional module structure.
Augie Fackler <durin42@gmail.com>
parents: 331
diff changeset
13 from hgsubversion import utility_commands
139
89a737852d33 utility_commands: Add tests for url and info. Fix a bad mock in the process.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
14 import test_util
337
46e69be8e2c8 Reorganize to have a more conventional module structure.
Augie Fackler <durin42@gmail.com>
parents: 331
diff changeset
15 from hgsubversion import wrappers
139
89a737852d33 utility_commands: Add tests for url and info. Fix a bad mock in the process.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
16
178
33ebdcb75bcd test_utility_commands: fix normalized URL references under Windows
Patrick Mezard <pmezard@gmail.com>
parents: 160
diff changeset
17 expected_info_output = '''URL: %(repourl)s/%(branch)s
33ebdcb75bcd test_utility_commands: fix normalized URL references under Windows
Patrick Mezard <pmezard@gmail.com>
parents: 160
diff changeset
18 Repository Root: %(repourl)s
139
89a737852d33 utility_commands: Add tests for url and info. Fix a bad mock in the process.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
19 Repository UUID: df2126f7-00ab-4d49-b42c-7e981dde0bcf
89a737852d33 utility_commands: Add tests for url and info. Fix a bad mock in the process.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
20 Revision: %(rev)s
89a737852d33 utility_commands: Add tests for url and info. Fix a bad mock in the process.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
21 Node Kind: directory
89a737852d33 utility_commands: Add tests for url and info. Fix a bad mock in the process.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
22 Last Changed Author: durin
89a737852d33 utility_commands: Add tests for url and info. Fix a bad mock in the process.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
23 Last Changed Rev: %(rev)s
89a737852d33 utility_commands: Add tests for url and info. Fix a bad mock in the process.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
24 Last Changed Date: %(date)s
89a737852d33 utility_commands: Add tests for url and info. Fix a bad mock in the process.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
25 '''
89a737852d33 utility_commands: Add tests for url and info. Fix a bad mock in the process.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
26
89a737852d33 utility_commands: Add tests for url and info. Fix a bad mock in the process.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
27 class UtilityTests(test_util.TestBase):
331
75f082b5897e Switch to using url scheme wrappers instead of duplicating each command we wrap.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 264
diff changeset
28 @property
75f082b5897e Switch to using url scheme wrappers instead of duplicating each command we wrap.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 264
diff changeset
29 def repourl(self):
75f082b5897e Switch to using url scheme wrappers instead of duplicating each command we wrap.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 264
diff changeset
30 return util.normalize_url(test_util.fileurl(self.repo_path))
75f082b5897e Switch to using url scheme wrappers instead of duplicating each command we wrap.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 264
diff changeset
31
139
89a737852d33 utility_commands: Add tests for url and info. Fix a bad mock in the process.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
32 def test_info_output(self):
89a737852d33 utility_commands: Add tests for url and info. Fix a bad mock in the process.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
33 self._load_fixture_and_fetch('two_heads.svndump')
89a737852d33 utility_commands: Add tests for url and info. Fix a bad mock in the process.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
34 hg.update(self.repo, 'the_branch')
89a737852d33 utility_commands: Add tests for url and info. Fix a bad mock in the process.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
35 u = ui.ui()
331
75f082b5897e Switch to using url scheme wrappers instead of duplicating each command we wrap.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 264
diff changeset
36 u.pushbuffer()
573
00393e9abff8 svncommands: make repo optional (useful for things like listauthors)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 550
diff changeset
37 utility_commands.info(u, self.repo)
331
75f082b5897e Switch to using url scheme wrappers instead of duplicating each command we wrap.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 264
diff changeset
38 actual = u.popbuffer()
139
89a737852d33 utility_commands: Add tests for url and info. Fix a bad mock in the process.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
39 expected = (expected_info_output %
89a737852d33 utility_commands: Add tests for url and info. Fix a bad mock in the process.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
40 {'date': '2008-10-08 01:39:05 +0000 (Wed, 08 Oct 2008)',
331
75f082b5897e Switch to using url scheme wrappers instead of duplicating each command we wrap.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 264
diff changeset
41 'repourl': self.repourl,
139
89a737852d33 utility_commands: Add tests for url and info. Fix a bad mock in the process.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
42 'branch': 'branches/the_branch',
89a737852d33 utility_commands: Add tests for url and info. Fix a bad mock in the process.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
43 'rev': 5,
89a737852d33 utility_commands: Add tests for url and info. Fix a bad mock in the process.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
44 })
331
75f082b5897e Switch to using url scheme wrappers instead of duplicating each command we wrap.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 264
diff changeset
45 self.assertEqual(actual, expected)
139
89a737852d33 utility_commands: Add tests for url and info. Fix a bad mock in the process.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
46 hg.update(self.repo, 'default')
331
75f082b5897e Switch to using url scheme wrappers instead of duplicating each command we wrap.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 264
diff changeset
47 u.pushbuffer()
573
00393e9abff8 svncommands: make repo optional (useful for things like listauthors)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 550
diff changeset
48 utility_commands.info(u, self.repo)
331
75f082b5897e Switch to using url scheme wrappers instead of duplicating each command we wrap.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 264
diff changeset
49 actual = u.popbuffer()
139
89a737852d33 utility_commands: Add tests for url and info. Fix a bad mock in the process.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
50 expected = (expected_info_output %
89a737852d33 utility_commands: Add tests for url and info. Fix a bad mock in the process.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
51 {'date': '2008-10-08 01:39:29 +0000 (Wed, 08 Oct 2008)',
331
75f082b5897e Switch to using url scheme wrappers instead of duplicating each command we wrap.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 264
diff changeset
52 'repourl': self.repourl,
139
89a737852d33 utility_commands: Add tests for url and info. Fix a bad mock in the process.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
53 'branch': 'trunk',
89a737852d33 utility_commands: Add tests for url and info. Fix a bad mock in the process.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
54 'rev': 6,
89a737852d33 utility_commands: Add tests for url and info. Fix a bad mock in the process.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
55 })
331
75f082b5897e Switch to using url scheme wrappers instead of duplicating each command we wrap.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 264
diff changeset
56 self.assertEqual(actual, expected)
503
00ecb2bc005c Add a -r option to hg svn. Use with hg svn info to change the mercurial rev.
Jason Ostrander <jason@sentilla.com>
parents: 403
diff changeset
57 hg.update(self.repo, 'default')
00ecb2bc005c Add a -r option to hg svn. Use with hg svn info to change the mercurial rev.
Jason Ostrander <jason@sentilla.com>
parents: 403
diff changeset
58 u.pushbuffer()
573
00393e9abff8 svncommands: make repo optional (useful for things like listauthors)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 550
diff changeset
59 utility_commands.info(u, self.repo, rev=3)
503
00ecb2bc005c Add a -r option to hg svn. Use with hg svn info to change the mercurial rev.
Jason Ostrander <jason@sentilla.com>
parents: 403
diff changeset
60 actual = u.popbuffer()
00ecb2bc005c Add a -r option to hg svn. Use with hg svn info to change the mercurial rev.
Jason Ostrander <jason@sentilla.com>
parents: 403
diff changeset
61 expected = (expected_info_output %
00ecb2bc005c Add a -r option to hg svn. Use with hg svn info to change the mercurial rev.
Jason Ostrander <jason@sentilla.com>
parents: 403
diff changeset
62 {'date': '2008-10-08 01:39:05 +0000 (Wed, 08 Oct 2008)',
00ecb2bc005c Add a -r option to hg svn. Use with hg svn info to change the mercurial rev.
Jason Ostrander <jason@sentilla.com>
parents: 403
diff changeset
63 'repourl': self.repourl,
00ecb2bc005c Add a -r option to hg svn. Use with hg svn info to change the mercurial rev.
Jason Ostrander <jason@sentilla.com>
parents: 403
diff changeset
64 'branch': 'branches/the_branch',
00ecb2bc005c Add a -r option to hg svn. Use with hg svn info to change the mercurial rev.
Jason Ostrander <jason@sentilla.com>
parents: 403
diff changeset
65 'rev': 5,
00ecb2bc005c Add a -r option to hg svn. Use with hg svn info to change the mercurial rev.
Jason Ostrander <jason@sentilla.com>
parents: 403
diff changeset
66 })
00ecb2bc005c Add a -r option to hg svn. Use with hg svn info to change the mercurial rev.
Jason Ostrander <jason@sentilla.com>
parents: 403
diff changeset
67 self.assertEqual(actual, expected)
139
89a737852d33 utility_commands: Add tests for url and info. Fix a bad mock in the process.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
68
549
b97f5734e5a8 utility_commands: unbreak hg svn info with single-directory clones
Augie Fackler <durin42@gmail.com>
parents: 503
diff changeset
69 def test_info_single(self):
b97f5734e5a8 utility_commands: unbreak hg svn info with single-directory clones
Augie Fackler <durin42@gmail.com>
parents: 503
diff changeset
70 self._load_fixture_and_fetch('two_heads.svndump', subdir='trunk')
b97f5734e5a8 utility_commands: unbreak hg svn info with single-directory clones
Augie Fackler <durin42@gmail.com>
parents: 503
diff changeset
71 hg.update(self.repo, 'tip')
b97f5734e5a8 utility_commands: unbreak hg svn info with single-directory clones
Augie Fackler <durin42@gmail.com>
parents: 503
diff changeset
72 u = ui.ui()
b97f5734e5a8 utility_commands: unbreak hg svn info with single-directory clones
Augie Fackler <durin42@gmail.com>
parents: 503
diff changeset
73 u.pushbuffer()
573
00393e9abff8 svncommands: make repo optional (useful for things like listauthors)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 550
diff changeset
74 utility_commands.info(u, self.repo)
549
b97f5734e5a8 utility_commands: unbreak hg svn info with single-directory clones
Augie Fackler <durin42@gmail.com>
parents: 503
diff changeset
75 actual = u.popbuffer()
b97f5734e5a8 utility_commands: unbreak hg svn info with single-directory clones
Augie Fackler <durin42@gmail.com>
parents: 503
diff changeset
76 expected = (expected_info_output %
b97f5734e5a8 utility_commands: unbreak hg svn info with single-directory clones
Augie Fackler <durin42@gmail.com>
parents: 503
diff changeset
77 {'date': '2008-10-08 01:39:29 +0000 (Wed, 08 Oct 2008)',
b97f5734e5a8 utility_commands: unbreak hg svn info with single-directory clones
Augie Fackler <durin42@gmail.com>
parents: 503
diff changeset
78 'repourl': self.repourl,
b97f5734e5a8 utility_commands: unbreak hg svn info with single-directory clones
Augie Fackler <durin42@gmail.com>
parents: 503
diff changeset
79 'branch': 'trunk',
b97f5734e5a8 utility_commands: unbreak hg svn info with single-directory clones
Augie Fackler <durin42@gmail.com>
parents: 503
diff changeset
80 'rev': 6,
b97f5734e5a8 utility_commands: unbreak hg svn info with single-directory clones
Augie Fackler <durin42@gmail.com>
parents: 503
diff changeset
81 })
b97f5734e5a8 utility_commands: unbreak hg svn info with single-directory clones
Augie Fackler <durin42@gmail.com>
parents: 503
diff changeset
82 self.assertStringEqual(expected, actual)
b97f5734e5a8 utility_commands: unbreak hg svn info with single-directory clones
Augie Fackler <durin42@gmail.com>
parents: 503
diff changeset
83
157
91541523ea5c utility_commands: Test outgoing and fix it to work again.
Augie Fackler <durin42@gmail.com>
parents: 153
diff changeset
84 def test_parent_output(self):
91541523ea5c utility_commands: Test outgoing and fix it to work again.
Augie Fackler <durin42@gmail.com>
parents: 153
diff changeset
85 self._load_fixture_and_fetch('two_heads.svndump')
91541523ea5c utility_commands: Test outgoing and fix it to work again.
Augie Fackler <durin42@gmail.com>
parents: 153
diff changeset
86 u = ui.ui()
331
75f082b5897e Switch to using url scheme wrappers instead of duplicating each command we wrap.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 264
diff changeset
87 u.pushbuffer()
157
91541523ea5c utility_commands: Test outgoing and fix it to work again.
Augie Fackler <durin42@gmail.com>
parents: 153
diff changeset
88 parents = (self.repo['the_branch'].node(), revlog.nullid, )
91541523ea5c utility_commands: Test outgoing and fix it to work again.
Augie Fackler <durin42@gmail.com>
parents: 153
diff changeset
89 def filectxfn(repo, memctx, path):
91541523ea5c utility_commands: Test outgoing and fix it to work again.
Augie Fackler <durin42@gmail.com>
parents: 153
diff changeset
90 return context.memfilectx(path=path,
91541523ea5c utility_commands: Test outgoing and fix it to work again.
Augie Fackler <durin42@gmail.com>
parents: 153
diff changeset
91 data='added',
91541523ea5c utility_commands: Test outgoing and fix it to work again.
Augie Fackler <durin42@gmail.com>
parents: 153
diff changeset
92 islink=False,
91541523ea5c utility_commands: Test outgoing and fix it to work again.
Augie Fackler <durin42@gmail.com>
parents: 153
diff changeset
93 isexec=False,
91541523ea5c utility_commands: Test outgoing and fix it to work again.
Augie Fackler <durin42@gmail.com>
parents: 153
diff changeset
94 copied=False)
91541523ea5c utility_commands: Test outgoing and fix it to work again.
Augie Fackler <durin42@gmail.com>
parents: 153
diff changeset
95 ctx = context.memctx(self.repo,
91541523ea5c utility_commands: Test outgoing and fix it to work again.
Augie Fackler <durin42@gmail.com>
parents: 153
diff changeset
96 parents,
91541523ea5c utility_commands: Test outgoing and fix it to work again.
Augie Fackler <durin42@gmail.com>
parents: 153
diff changeset
97 'automated test',
91541523ea5c utility_commands: Test outgoing and fix it to work again.
Augie Fackler <durin42@gmail.com>
parents: 153
diff changeset
98 ['added_bogus_file', 'other_added_file', ],
91541523ea5c utility_commands: Test outgoing and fix it to work again.
Augie Fackler <durin42@gmail.com>
parents: 153
diff changeset
99 filectxfn,
91541523ea5c utility_commands: Test outgoing and fix it to work again.
Augie Fackler <durin42@gmail.com>
parents: 153
diff changeset
100 'testy',
91541523ea5c utility_commands: Test outgoing and fix it to work again.
Augie Fackler <durin42@gmail.com>
parents: 153
diff changeset
101 '2008-12-21 16:32:00 -0500',
91541523ea5c utility_commands: Test outgoing and fix it to work again.
Augie Fackler <durin42@gmail.com>
parents: 153
diff changeset
102 {'branch': 'localbranch', })
91541523ea5c utility_commands: Test outgoing and fix it to work again.
Augie Fackler <durin42@gmail.com>
parents: 153
diff changeset
103 new = self.repo.commitctx(ctx)
91541523ea5c utility_commands: Test outgoing and fix it to work again.
Augie Fackler <durin42@gmail.com>
parents: 153
diff changeset
104 hg.update(self.repo, new)
403
37c96b78b8c0 uisetup: use a single loop/abstraction for wrapping all the commands
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 347
diff changeset
105 wrappers.parents(lambda x, y: None, u, self.repo, svn=True)
331
75f082b5897e Switch to using url scheme wrappers instead of duplicating each command we wrap.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 264
diff changeset
106 actual = u.popbuffer()
75f082b5897e Switch to using url scheme wrappers instead of duplicating each command we wrap.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 264
diff changeset
107 self.assertEqual(actual,
256
7932d098cb5f Refactor commands to wrap their hg equivalent adding a --svn flag where sane.
Augie Fackler <durin42@gmail.com>
parents: 253
diff changeset
108 'changeset: 3:4e256962fc5d\n'
7932d098cb5f Refactor commands to wrap their hg equivalent adding a --svn flag where sane.
Augie Fackler <durin42@gmail.com>
parents: 253
diff changeset
109 'branch: the_branch\n'
7932d098cb5f Refactor commands to wrap their hg equivalent adding a --svn flag where sane.
Augie Fackler <durin42@gmail.com>
parents: 253
diff changeset
110 'user: durin@df2126f7-00ab-4d49-b42c-7e981dde0bcf\n'
7932d098cb5f Refactor commands to wrap their hg equivalent adding a --svn flag where sane.
Augie Fackler <durin42@gmail.com>
parents: 253
diff changeset
111 'date: Wed Oct 08 01:39:05 2008 +0000\n'
7932d098cb5f Refactor commands to wrap their hg equivalent adding a --svn flag where sane.
Augie Fackler <durin42@gmail.com>
parents: 253
diff changeset
112 'summary: add delta on the branch\n\n')
7932d098cb5f Refactor commands to wrap their hg equivalent adding a --svn flag where sane.
Augie Fackler <durin42@gmail.com>
parents: 253
diff changeset
113
157
91541523ea5c utility_commands: Test outgoing and fix it to work again.
Augie Fackler <durin42@gmail.com>
parents: 153
diff changeset
114 hg.update(self.repo, 'default')
256
7932d098cb5f Refactor commands to wrap their hg equivalent adding a --svn flag where sane.
Augie Fackler <durin42@gmail.com>
parents: 253
diff changeset
115 # Make sure styles work
331
75f082b5897e Switch to using url scheme wrappers instead of duplicating each command we wrap.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 264
diff changeset
116 u.pushbuffer()
403
37c96b78b8c0 uisetup: use a single loop/abstraction for wrapping all the commands
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 347
diff changeset
117 wrappers.parents(lambda x, y: None, u, self.repo, svn=True, style='compact')
331
75f082b5897e Switch to using url scheme wrappers instead of duplicating each command we wrap.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 264
diff changeset
118 actual = u.popbuffer()
75f082b5897e Switch to using url scheme wrappers instead of duplicating each command we wrap.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 264
diff changeset
119 self.assertEqual(actual,
256
7932d098cb5f Refactor commands to wrap their hg equivalent adding a --svn flag where sane.
Augie Fackler <durin42@gmail.com>
parents: 253
diff changeset
120 '4:1 1083037b18d8 2008-10-08 01:39 +0000 durin\n'
7932d098cb5f Refactor commands to wrap their hg equivalent adding a --svn flag where sane.
Augie Fackler <durin42@gmail.com>
parents: 253
diff changeset
121 ' Add gamma on trunk.\n\n')
7932d098cb5f Refactor commands to wrap their hg equivalent adding a --svn flag where sane.
Augie Fackler <durin42@gmail.com>
parents: 253
diff changeset
122 # custom templates too
331
75f082b5897e Switch to using url scheme wrappers instead of duplicating each command we wrap.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 264
diff changeset
123 u.pushbuffer()
403
37c96b78b8c0 uisetup: use a single loop/abstraction for wrapping all the commands
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 347
diff changeset
124 wrappers.parents(lambda x, y: None, u, self.repo, svn=True, template='{node}\n')
331
75f082b5897e Switch to using url scheme wrappers instead of duplicating each command we wrap.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 264
diff changeset
125 actual = u.popbuffer()
75f082b5897e Switch to using url scheme wrappers instead of duplicating each command we wrap.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 264
diff changeset
126 self.assertEqual(actual, '1083037b18d85cd84fa211c5adbaeff0fea2cd9f\n')
256
7932d098cb5f Refactor commands to wrap their hg equivalent adding a --svn flag where sane.
Augie Fackler <durin42@gmail.com>
parents: 253
diff changeset
127
331
75f082b5897e Switch to using url scheme wrappers instead of duplicating each command we wrap.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 264
diff changeset
128 u.pushbuffer()
403
37c96b78b8c0 uisetup: use a single loop/abstraction for wrapping all the commands
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 347
diff changeset
129 wrappers.parents(lambda x, y: None, u, self.repo, svn=True)
331
75f082b5897e Switch to using url scheme wrappers instead of duplicating each command we wrap.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 264
diff changeset
130 actual = u.popbuffer()
75f082b5897e Switch to using url scheme wrappers instead of duplicating each command we wrap.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 264
diff changeset
131 self.assertEqual(actual,
256
7932d098cb5f Refactor commands to wrap their hg equivalent adding a --svn flag where sane.
Augie Fackler <durin42@gmail.com>
parents: 253
diff changeset
132 'changeset: 4:1083037b18d8\n'
7932d098cb5f Refactor commands to wrap their hg equivalent adding a --svn flag where sane.
Augie Fackler <durin42@gmail.com>
parents: 253
diff changeset
133 'parent: 1:c95251e0dd04\n'
7932d098cb5f Refactor commands to wrap their hg equivalent adding a --svn flag where sane.
Augie Fackler <durin42@gmail.com>
parents: 253
diff changeset
134 'user: durin@df2126f7-00ab-4d49-b42c-7e981dde0bcf\n'
7932d098cb5f Refactor commands to wrap their hg equivalent adding a --svn flag where sane.
Augie Fackler <durin42@gmail.com>
parents: 253
diff changeset
135 'date: Wed Oct 08 01:39:29 2008 +0000\n'
7932d098cb5f Refactor commands to wrap their hg equivalent adding a --svn flag where sane.
Augie Fackler <durin42@gmail.com>
parents: 253
diff changeset
136 'summary: Add gamma on trunk.\n\n')
157
91541523ea5c utility_commands: Test outgoing and fix it to work again.
Augie Fackler <durin42@gmail.com>
parents: 153
diff changeset
137
91541523ea5c utility_commands: Test outgoing and fix it to work again.
Augie Fackler <durin42@gmail.com>
parents: 153
diff changeset
138 def test_outgoing_output(self):
91541523ea5c utility_commands: Test outgoing and fix it to work again.
Augie Fackler <durin42@gmail.com>
parents: 153
diff changeset
139 self._load_fixture_and_fetch('two_heads.svndump')
91541523ea5c utility_commands: Test outgoing and fix it to work again.
Augie Fackler <durin42@gmail.com>
parents: 153
diff changeset
140 u = ui.ui()
91541523ea5c utility_commands: Test outgoing and fix it to work again.
Augie Fackler <durin42@gmail.com>
parents: 153
diff changeset
141 parents = (self.repo['the_branch'].node(), revlog.nullid, )
91541523ea5c utility_commands: Test outgoing and fix it to work again.
Augie Fackler <durin42@gmail.com>
parents: 153
diff changeset
142 def filectxfn(repo, memctx, path):
91541523ea5c utility_commands: Test outgoing and fix it to work again.
Augie Fackler <durin42@gmail.com>
parents: 153
diff changeset
143 return context.memfilectx(path=path,
91541523ea5c utility_commands: Test outgoing and fix it to work again.
Augie Fackler <durin42@gmail.com>
parents: 153
diff changeset
144 data='added',
91541523ea5c utility_commands: Test outgoing and fix it to work again.
Augie Fackler <durin42@gmail.com>
parents: 153
diff changeset
145 islink=False,
91541523ea5c utility_commands: Test outgoing and fix it to work again.
Augie Fackler <durin42@gmail.com>
parents: 153
diff changeset
146 isexec=False,
91541523ea5c utility_commands: Test outgoing and fix it to work again.
Augie Fackler <durin42@gmail.com>
parents: 153
diff changeset
147 copied=False)
91541523ea5c utility_commands: Test outgoing and fix it to work again.
Augie Fackler <durin42@gmail.com>
parents: 153
diff changeset
148 ctx = context.memctx(self.repo,
91541523ea5c utility_commands: Test outgoing and fix it to work again.
Augie Fackler <durin42@gmail.com>
parents: 153
diff changeset
149 parents,
91541523ea5c utility_commands: Test outgoing and fix it to work again.
Augie Fackler <durin42@gmail.com>
parents: 153
diff changeset
150 'automated test',
91541523ea5c utility_commands: Test outgoing and fix it to work again.
Augie Fackler <durin42@gmail.com>
parents: 153
diff changeset
151 ['added_bogus_file', 'other_added_file', ],
91541523ea5c utility_commands: Test outgoing and fix it to work again.
Augie Fackler <durin42@gmail.com>
parents: 153
diff changeset
152 filectxfn,
91541523ea5c utility_commands: Test outgoing and fix it to work again.
Augie Fackler <durin42@gmail.com>
parents: 153
diff changeset
153 'testy',
91541523ea5c utility_commands: Test outgoing and fix it to work again.
Augie Fackler <durin42@gmail.com>
parents: 153
diff changeset
154 '2008-12-21 16:32:00 -0500',
91541523ea5c utility_commands: Test outgoing and fix it to work again.
Augie Fackler <durin42@gmail.com>
parents: 153
diff changeset
155 {'branch': 'localbranch', })
91541523ea5c utility_commands: Test outgoing and fix it to work again.
Augie Fackler <durin42@gmail.com>
parents: 153
diff changeset
156 new = self.repo.commitctx(ctx)
91541523ea5c utility_commands: Test outgoing and fix it to work again.
Augie Fackler <durin42@gmail.com>
parents: 153
diff changeset
157 hg.update(self.repo, new)
347
537de0300510 Remove the 'outgoing' wrapper, and use the Mercurial infrastructure instead.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 337
diff changeset
158 u.pushbuffer()
537de0300510 Remove the 'outgoing' wrapper, and use the Mercurial infrastructure instead.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 337
diff changeset
159 commands.outgoing(u, self.repo, self.repourl)
331
75f082b5897e Switch to using url scheme wrappers instead of duplicating each command we wrap.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 264
diff changeset
160 actual = u.popbuffer()
347
537de0300510 Remove the 'outgoing' wrapper, and use the Mercurial infrastructure instead.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 337
diff changeset
161 u.write(actual)
537de0300510 Remove the 'outgoing' wrapper, and use the Mercurial infrastructure instead.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 337
diff changeset
162 self.assertTrue(node.hex(self.repo['localbranch'].node())[:8] in actual)
537de0300510 Remove the 'outgoing' wrapper, and use the Mercurial infrastructure instead.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 337
diff changeset
163 actual = actual.splitlines()
537de0300510 Remove the 'outgoing' wrapper, and use the Mercurial infrastructure instead.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 337
diff changeset
164 self.assertEqual(actual[0], 'comparing with ' + self.repourl)
537de0300510 Remove the 'outgoing' wrapper, and use the Mercurial infrastructure instead.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 337
diff changeset
165 self.assertEqual(actual[1], 'changeset: 5:6de15430fa20')
537de0300510 Remove the 'outgoing' wrapper, and use the Mercurial infrastructure instead.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 337
diff changeset
166 self.assertEqual(actual[2], 'branch: localbranch')
537de0300510 Remove the 'outgoing' wrapper, and use the Mercurial infrastructure instead.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 337
diff changeset
167 self.assertEqual(actual[3], 'tag: tip')
537de0300510 Remove the 'outgoing' wrapper, and use the Mercurial infrastructure instead.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 337
diff changeset
168 self.assertEqual(actual[4], 'parent: 3:4e256962fc5d')
537de0300510 Remove the 'outgoing' wrapper, and use the Mercurial infrastructure instead.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 337
diff changeset
169 self.assertEqual(actual[5], 'user: testy')
537de0300510 Remove the 'outgoing' wrapper, and use the Mercurial infrastructure instead.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 337
diff changeset
170 self.assertEqual(actual[6], 'date: Sun Dec 21 16:32:00 2008 -0500')
537de0300510 Remove the 'outgoing' wrapper, and use the Mercurial infrastructure instead.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 337
diff changeset
171 self.assertEqual(actual[7], 'summary: automated test')
157
91541523ea5c utility_commands: Test outgoing and fix it to work again.
Augie Fackler <durin42@gmail.com>
parents: 153
diff changeset
172 hg.update(self.repo, 'default')
331
75f082b5897e Switch to using url scheme wrappers instead of duplicating each command we wrap.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 264
diff changeset
173 u.pushbuffer()
347
537de0300510 Remove the 'outgoing' wrapper, and use the Mercurial infrastructure instead.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 337
diff changeset
174 commands.outgoing(u, self.repo, self.repourl)
331
75f082b5897e Switch to using url scheme wrappers instead of duplicating each command we wrap.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 264
diff changeset
175 actual = u.popbuffer()
347
537de0300510 Remove the 'outgoing' wrapper, and use the Mercurial infrastructure instead.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 337
diff changeset
176 u.write(actual)
537de0300510 Remove the 'outgoing' wrapper, and use the Mercurial infrastructure instead.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 337
diff changeset
177 self.assertEqual(actual.splitlines()[1], 'no changes found')
140
9ffde8662967 util: Add a command to normalize svn urls and use it in a couple of places. Test that it works and prevents failed assertions.
Augie Fackler <durin42@gmail.com>
parents: 139
diff changeset
178
149
04800fda7af5 rebase: preserve local branch names.
Augie Fackler <durin42@gmail.com>
parents: 140
diff changeset
179 def test_rebase(self):
04800fda7af5 rebase: preserve local branch names.
Augie Fackler <durin42@gmail.com>
parents: 140
diff changeset
180 self._load_fixture_and_fetch('two_revs.svndump')
04800fda7af5 rebase: preserve local branch names.
Augie Fackler <durin42@gmail.com>
parents: 140
diff changeset
181 parents = (self.repo[0].node(), revlog.nullid, )
04800fda7af5 rebase: preserve local branch names.
Augie Fackler <durin42@gmail.com>
parents: 140
diff changeset
182 def filectxfn(repo, memctx, path):
04800fda7af5 rebase: preserve local branch names.
Augie Fackler <durin42@gmail.com>
parents: 140
diff changeset
183 return context.memfilectx(path=path,
04800fda7af5 rebase: preserve local branch names.
Augie Fackler <durin42@gmail.com>
parents: 140
diff changeset
184 data='added',
04800fda7af5 rebase: preserve local branch names.
Augie Fackler <durin42@gmail.com>
parents: 140
diff changeset
185 islink=False,
04800fda7af5 rebase: preserve local branch names.
Augie Fackler <durin42@gmail.com>
parents: 140
diff changeset
186 isexec=False,
04800fda7af5 rebase: preserve local branch names.
Augie Fackler <durin42@gmail.com>
parents: 140
diff changeset
187 copied=False)
04800fda7af5 rebase: preserve local branch names.
Augie Fackler <durin42@gmail.com>
parents: 140
diff changeset
188 ctx = context.memctx(self.repo,
04800fda7af5 rebase: preserve local branch names.
Augie Fackler <durin42@gmail.com>
parents: 140
diff changeset
189 parents,
04800fda7af5 rebase: preserve local branch names.
Augie Fackler <durin42@gmail.com>
parents: 140
diff changeset
190 'automated test',
04800fda7af5 rebase: preserve local branch names.
Augie Fackler <durin42@gmail.com>
parents: 140
diff changeset
191 ['added_bogus_file', 'other_added_file', ],
04800fda7af5 rebase: preserve local branch names.
Augie Fackler <durin42@gmail.com>
parents: 140
diff changeset
192 filectxfn,
04800fda7af5 rebase: preserve local branch names.
Augie Fackler <durin42@gmail.com>
parents: 140
diff changeset
193 'testy',
04800fda7af5 rebase: preserve local branch names.
Augie Fackler <durin42@gmail.com>
parents: 140
diff changeset
194 '2008-12-21 16:32:00 -0500',
04800fda7af5 rebase: preserve local branch names.
Augie Fackler <durin42@gmail.com>
parents: 140
diff changeset
195 {'branch': 'localbranch', })
04800fda7af5 rebase: preserve local branch names.
Augie Fackler <durin42@gmail.com>
parents: 140
diff changeset
196 self.repo.commitctx(ctx)
04800fda7af5 rebase: preserve local branch names.
Augie Fackler <durin42@gmail.com>
parents: 140
diff changeset
197 self.assertEqual(self.repo['tip'].branch(), 'localbranch')
04800fda7af5 rebase: preserve local branch names.
Augie Fackler <durin42@gmail.com>
parents: 140
diff changeset
198 beforerebasehash = self.repo['tip'].node()
04800fda7af5 rebase: preserve local branch names.
Augie Fackler <durin42@gmail.com>
parents: 140
diff changeset
199 hg.update(self.repo, 'tip')
264
112d57bb736e rebase: moved to wrappers, now a wrapper around rebase triggered with --svn.
Augie Fackler <durin42@gmail.com>
parents: 257
diff changeset
200 wrappers.rebase(rebase.rebase, ui.ui(), self.repo, svn=True)
149
04800fda7af5 rebase: preserve local branch names.
Augie Fackler <durin42@gmail.com>
parents: 140
diff changeset
201 self.assertEqual(self.repo['tip'].branch(), 'localbranch')
04800fda7af5 rebase: preserve local branch names.
Augie Fackler <durin42@gmail.com>
parents: 140
diff changeset
202 self.assertEqual(self.repo['tip'].parents()[0].parents()[0], self.repo[0])
04800fda7af5 rebase: preserve local branch names.
Augie Fackler <durin42@gmail.com>
parents: 140
diff changeset
203 self.assertNotEqual(beforerebasehash, self.repo['tip'].node())
04800fda7af5 rebase: preserve local branch names.
Augie Fackler <durin42@gmail.com>
parents: 140
diff changeset
204
199
91db8fc049b0 Add a genignore utility command that generates an hgignore file by scraping svn:ignore properties.
Augie Fackler <durin42@gmail.com>
parents: 195
diff changeset
205 def test_genignore(self):
331
75f082b5897e Switch to using url scheme wrappers instead of duplicating each command we wrap.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 264
diff changeset
206 """ Test generation of .hgignore file. """
337
46e69be8e2c8 Reorganize to have a more conventional module structure.
Augie Fackler <durin42@gmail.com>
parents: 331
diff changeset
207 test_util.load_fixture_and_fetch('ignores.svndump', self.repo_path,
331
75f082b5897e Switch to using url scheme wrappers instead of duplicating each command we wrap.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 264
diff changeset
208 self.wc_path, noupdate=False)
199
91db8fc049b0 Add a genignore utility command that generates an hgignore file by scraping svn:ignore properties.
Augie Fackler <durin42@gmail.com>
parents: 195
diff changeset
209 u = ui.ui()
331
75f082b5897e Switch to using url scheme wrappers instead of duplicating each command we wrap.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 264
diff changeset
210 u.pushbuffer()
253
c3d5c4ae9c7c Work with simple command table instead of decorators.
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 241
diff changeset
211 utility_commands.genignore(u, self.repo, self.wc_path)
199
91db8fc049b0 Add a genignore utility command that generates an hgignore file by scraping svn:ignore properties.
Augie Fackler <durin42@gmail.com>
parents: 195
diff changeset
212 self.assertEqual(open(os.path.join(self.wc_path, '.hgignore')).read(),
91db8fc049b0 Add a genignore utility command that generates an hgignore file by scraping svn:ignore properties.
Augie Fackler <durin42@gmail.com>
parents: 195
diff changeset
213 '.hgignore\nsyntax:glob\nblah\notherblah\nbaz/magic\n')
91db8fc049b0 Add a genignore utility command that generates an hgignore file by scraping svn:ignore properties.
Augie Fackler <durin42@gmail.com>
parents: 195
diff changeset
214
550
f0159775e0f1 utility_commands: fix hg svn genignore for single-directory mode
Augie Fackler <durin42@gmail.com>
parents: 549
diff changeset
215 def test_genignore_single(self):
f0159775e0f1 utility_commands: fix hg svn genignore for single-directory mode
Augie Fackler <durin42@gmail.com>
parents: 549
diff changeset
216 self._load_fixture_and_fetch('ignores.svndump', subdir='trunk')
f0159775e0f1 utility_commands: fix hg svn genignore for single-directory mode
Augie Fackler <durin42@gmail.com>
parents: 549
diff changeset
217 hg.update(self.repo, 'tip')
f0159775e0f1 utility_commands: fix hg svn genignore for single-directory mode
Augie Fackler <durin42@gmail.com>
parents: 549
diff changeset
218 u = ui.ui()
f0159775e0f1 utility_commands: fix hg svn genignore for single-directory mode
Augie Fackler <durin42@gmail.com>
parents: 549
diff changeset
219 u.pushbuffer()
f0159775e0f1 utility_commands: fix hg svn genignore for single-directory mode
Augie Fackler <durin42@gmail.com>
parents: 549
diff changeset
220 utility_commands.genignore(u, self.repo, self.wc_path)
f0159775e0f1 utility_commands: fix hg svn genignore for single-directory mode
Augie Fackler <durin42@gmail.com>
parents: 549
diff changeset
221 self.assertStringEqual(open(os.path.join(self.wc_path, '.hgignore')).read(),
f0159775e0f1 utility_commands: fix hg svn genignore for single-directory mode
Augie Fackler <durin42@gmail.com>
parents: 549
diff changeset
222 '.hgignore\nsyntax:glob\nblah\notherblah\nbaz/magic\n')
f0159775e0f1 utility_commands: fix hg svn genignore for single-directory mode
Augie Fackler <durin42@gmail.com>
parents: 549
diff changeset
223
236
c34abd2448b7 Issue #60: Add a svn sub-command to list all authors in a Subversion repository
Daniel Tang <dytang@cs.purdue.edu>
parents: 230
diff changeset
224 def test_list_authors(self):
c34abd2448b7 Issue #60: Add a svn sub-command to list all authors in a Subversion repository
Daniel Tang <dytang@cs.purdue.edu>
parents: 230
diff changeset
225 test_util.load_svndump_fixture(self.repo_path,
c34abd2448b7 Issue #60: Add a svn sub-command to list all authors in a Subversion repository
Daniel Tang <dytang@cs.purdue.edu>
parents: 230
diff changeset
226 'replace_trunk_with_branch.svndump')
c34abd2448b7 Issue #60: Add a svn sub-command to list all authors in a Subversion repository
Daniel Tang <dytang@cs.purdue.edu>
parents: 230
diff changeset
227 u = ui.ui()
331
75f082b5897e Switch to using url scheme wrappers instead of duplicating each command we wrap.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 264
diff changeset
228 u.pushbuffer()
253
c3d5c4ae9c7c Work with simple command table instead of decorators.
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 241
diff changeset
229 utility_commands.listauthors(u,
c3d5c4ae9c7c Work with simple command table instead of decorators.
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 241
diff changeset
230 args=[test_util.fileurl(self.repo_path)],
c3d5c4ae9c7c Work with simple command table instead of decorators.
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 241
diff changeset
231 authors=None)
331
75f082b5897e Switch to using url scheme wrappers instead of duplicating each command we wrap.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 264
diff changeset
232 actual = u.popbuffer()
75f082b5897e Switch to using url scheme wrappers instead of duplicating each command we wrap.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 264
diff changeset
233 self.assertEqual(actual, 'Augie\nevil\n')
236
c34abd2448b7 Issue #60: Add a svn sub-command to list all authors in a Subversion repository
Daniel Tang <dytang@cs.purdue.edu>
parents: 230
diff changeset
234
c34abd2448b7 Issue #60: Add a svn sub-command to list all authors in a Subversion repository
Daniel Tang <dytang@cs.purdue.edu>
parents: 230
diff changeset
235
c34abd2448b7 Issue #60: Add a svn sub-command to list all authors in a Subversion repository
Daniel Tang <dytang@cs.purdue.edu>
parents: 230
diff changeset
236 def test_list_authors_map(self):
c34abd2448b7 Issue #60: Add a svn sub-command to list all authors in a Subversion repository
Daniel Tang <dytang@cs.purdue.edu>
parents: 230
diff changeset
237 test_util.load_svndump_fixture(self.repo_path,
c34abd2448b7 Issue #60: Add a svn sub-command to list all authors in a Subversion repository
Daniel Tang <dytang@cs.purdue.edu>
parents: 230
diff changeset
238 'replace_trunk_with_branch.svndump')
c34abd2448b7 Issue #60: Add a svn sub-command to list all authors in a Subversion repository
Daniel Tang <dytang@cs.purdue.edu>
parents: 230
diff changeset
239 author_path = os.path.join(self.repo_path, 'authors')
253
c3d5c4ae9c7c Work with simple command table instead of decorators.
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 241
diff changeset
240 utility_commands.listauthors(ui.ui(),
c3d5c4ae9c7c Work with simple command table instead of decorators.
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 241
diff changeset
241 args=[test_util.fileurl(self.repo_path)],
c3d5c4ae9c7c Work with simple command table instead of decorators.
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 241
diff changeset
242 authors=author_path)
236
c34abd2448b7 Issue #60: Add a svn sub-command to list all authors in a Subversion repository
Daniel Tang <dytang@cs.purdue.edu>
parents: 230
diff changeset
243 self.assertEqual(open(author_path).read(), 'Augie=\nevil=\n')
256
7932d098cb5f Refactor commands to wrap their hg equivalent adding a --svn flag where sane.
Augie Fackler <durin42@gmail.com>
parents: 253
diff changeset
244
153
46f6b872c988 tests: Fix some missing suite definitions so that running the full testsuite
Augie Fackler <durin42@gmail.com>
parents: 149
diff changeset
245
46f6b872c988 tests: Fix some missing suite definitions so that running the full testsuite
Augie Fackler <durin42@gmail.com>
parents: 149
diff changeset
246 def suite():
46f6b872c988 tests: Fix some missing suite definitions so that running the full testsuite
Augie Fackler <durin42@gmail.com>
parents: 149
diff changeset
247 all = [unittest.TestLoader().loadTestsFromTestCase(UtilityTests),
46f6b872c988 tests: Fix some missing suite definitions so that running the full testsuite
Augie Fackler <durin42@gmail.com>
parents: 149
diff changeset
248 ]
46f6b872c988 tests: Fix some missing suite definitions so that running the full testsuite
Augie Fackler <durin42@gmail.com>
parents: 149
diff changeset
249 return unittest.TestSuite(all)