Mercurial > hgsubversion
comparison tests/test_unaffected_core.py @ 1343:e597714cb420 stable
tests: pass --quiet anyplace we call dispatch to run a command
Without this the now-in-core progress code will fire when we run
dispatch since that picks up a clean ui.ui() instance that we can't
set .quiet on easily.
author | Augie Fackler <raf@durin42.com> |
---|---|
date | Tue, 11 Aug 2015 16:56:37 -0400 |
parents | 903c9c9dfe6a |
children | 38be7a6b6def |
comparison
equal
deleted
inserted
replaced
1342:c6b01fd34694 | 1343:e597714cb420 |
---|---|
24 | 24 |
25 @test_util.requiresoption('updaterev') | 25 @test_util.requiresoption('updaterev') |
26 def test_update(self): | 26 def test_update(self): |
27 ''' Test 'clone --updaterev' ''' | 27 ''' Test 'clone --updaterev' ''' |
28 ui = self.ui() | 28 ui = self.ui() |
29 _dispatch(ui, ['init', self.wc_path]) | 29 _dispatch(ui, ['init', '--quiet', self.wc_path]) |
30 repo = self.repo | 30 repo = self.repo |
31 repo.ui.setconfig('ui', 'username', 'anonymous') | 31 repo.ui.setconfig('ui', 'username', 'anonymous') |
32 | 32 |
33 fpath = os.path.join(self.wc_path, 'it') | 33 fpath = os.path.join(self.wc_path, 'it') |
34 f = file(fpath, 'w') | 34 f = file(fpath, 'w') |
44 commands.commit(ui, repo, message="C3") | 44 commands.commit(ui, repo, message="C3") |
45 | 45 |
46 self.assertEqual(test_util.repolen(repo), 3) | 46 self.assertEqual(test_util.repolen(repo), 3) |
47 | 47 |
48 updaterev = 1 | 48 updaterev = 1 |
49 _dispatch(ui, ['clone', self.wc_path, self.wc_path + '2', | 49 _dispatch(ui, ['clone', '--quiet', |
50 '--updaterev=%s' % updaterev]) | 50 self.wc_path, self.wc_path + '2', |
51 '--updaterev=%s' % updaterev]) | |
51 | 52 |
52 repo2 = hg.repository(ui, self.wc_path + '2') | 53 repo2 = hg.repository(ui, self.wc_path + '2') |
53 | 54 |
54 self.assertEqual(str(repo[updaterev]), str(repo2['.'])) | 55 self.assertEqual(str(repo[updaterev]), str(repo2['.'])) |
55 | 56 |
56 @test_util.requiresoption('branch') | 57 @test_util.requiresoption('branch') |
57 def test_branch(self): | 58 def test_branch(self): |
58 ''' Test 'clone --branch' ''' | 59 ''' Test 'clone --branch' ''' |
59 ui = self.ui() | 60 ui = self.ui() |
60 _dispatch(ui, ['init', self.wc_path]) | 61 _dispatch(ui, ['init', '--quiet', self.wc_path]) |
61 repo = self.repo | 62 repo = self.repo |
62 repo.ui.setconfig('ui', 'username', 'anonymous') | 63 repo.ui.setconfig('ui', 'username', 'anonymous') |
63 | 64 |
64 fpath = os.path.join(self.wc_path, 'it') | 65 fpath = os.path.join(self.wc_path, 'it') |
65 f = file(fpath, 'w') | 66 f = file(fpath, 'w') |
78 commands.commit(ui, repo, message="C3") | 79 commands.commit(ui, repo, message="C3") |
79 | 80 |
80 self.assertEqual(test_util.repolen(repo), 3) | 81 self.assertEqual(test_util.repolen(repo), 3) |
81 | 82 |
82 branch = 'B1' | 83 branch = 'B1' |
83 _dispatch(ui, ['clone', self.wc_path, self.wc_path + '2', | 84 _dispatch(ui, [ |
84 '--branch', branch]) | 85 'clone', '--quiet', |
86 self.wc_path, self.wc_path + '2', | |
87 '--branch', branch]) | |
85 | 88 |
86 repo2 = hg.repository(ui, self.wc_path + '2') | 89 repo2 = hg.repository(ui, self.wc_path + '2') |
87 | 90 |
88 self.assertEqual(repo[branch].hex(), repo2['.'].hex()) | 91 self.assertEqual(repo[branch].hex(), repo2['.'].hex()) |