bzr branch
http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar
|
4988.10.5
by John Arbash Meinel
Merge bzr.dev 5021 to resolve NEWS |
1 |
# Copyright (C) 2006-2010 Canonical Ltd
|
|
1887.1.1
by Adeodato Simó
Do not separate paragraphs in the copyright statement with blank lines, |
2 |
#
|
|
1534.5.1
by Robert Collins
Give info some reasonable output and tests. |
3 |
# This program is free software; you can redistribute it and/or modify
|
4 |
# it under the terms of the GNU General Public License as published by
|
|
5 |
# the Free Software Foundation; either version 2 of the License, or
|
|
6 |
# (at your option) any later version.
|
|
|
1887.1.1
by Adeodato Simó
Do not separate paragraphs in the copyright statement with blank lines, |
7 |
#
|
|
1534.5.1
by Robert Collins
Give info some reasonable output and tests. |
8 |
# This program is distributed in the hope that it will be useful,
|
9 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
10 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
11 |
# GNU General Public License for more details.
|
|
|
1887.1.1
by Adeodato Simó
Do not separate paragraphs in the copyright statement with blank lines, |
12 |
#
|
|
1534.5.1
by Robert Collins
Give info some reasonable output and tests. |
13 |
# You should have received a copy of the GNU General Public License
|
14 |
# along with this program; if not, write to the Free Software
|
|
|
4183.7.1
by Sabin Iacob
update FSF mailing address |
15 |
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
1534.5.1
by Robert Collins
Give info some reasonable output and tests. |
16 |
|
17 |
||
18 |
"""Tests for the info command of bzr."""
|
|
19 |
||
|
6241.4.3
by Jelmer Vernooij
Add test for dangling tree references. |
20 |
import shutil |
|
1769.2.1
by Alexander Belchenko
win32 fix for blackbox.test_info.TestInfo.test_info_non_existing |
21 |
import sys |
|
1534.5.1
by Robert Collins
Give info some reasonable output and tests. |
22 |
|
|
2204.4.13
by Aaron Bentley
Update all test cases to avoid set_default_format |
23 |
from bzrlib import ( |
|
3575.1.1
by Andrew Bennetts
Tidy imports in blackbox.test_info, fixing trivial test failure caused by a missing import. |
24 |
branch, |
|
2204.4.13
by Aaron Bentley
Update all test cases to avoid set_default_format |
25 |
bzrdir, |
|
6207.3.3
by jelmer at samba
Fix tests and the like. |
26 |
controldir, |
|
2804.4.1
by Alexander Belchenko
some win32-specific fixes for selftest |
27 |
errors, |
|
3010.1.13
by Robert Collins
Use the info code functions to determine format strings in the blackbox tests, and handle repositories that do not lock like packs. |
28 |
info, |
|
1551.15.41
by Aaron Bentley
Make info provide more related brances, and format all branches nicely |
29 |
osutils, |
|
5010.2.2
by Vincent Ladeuil
Fix blackbox/test_infp.py imports. |
30 |
tests, |
|
3575.1.1
by Andrew Bennetts
Tidy imports in blackbox.test_info, fixing trivial test failure caused by a missing import. |
31 |
upgrade, |
|
1551.15.41
by Aaron Bentley
Make info provide more related brances, and format all branches nicely |
32 |
urlutils, |
|
2204.4.13
by Aaron Bentley
Update all test cases to avoid set_default_format |
33 |
)
|
|
5017.3.45
by Vincent Ladeuil
Move MemoryServer back into bzrlib.transport.memory as it's needed as soon as a MemoryTransport is used. Add a NEWS entry. |
34 |
from bzrlib.transport import memory |
|
5017.3.38
by Vincent Ladeuil
-s bb.test_info passing |
35 |
|
|
5010.2.2
by Vincent Ladeuil
Fix blackbox/test_infp.py imports. |
36 |
|
37 |
class TestInfo(tests.TestCaseWithTransport): |
|
|
1534.5.1
by Robert Collins
Give info some reasonable output and tests. |
38 |
|
|
4599.3.1
by Robert Collins
Factor out some string duplication from blackbox.test_info to make changing the default format easier. |
39 |
def setUp(self): |
|
5010.2.2
by Vincent Ladeuil
Fix blackbox/test_infp.py imports. |
40 |
super(TestInfo, self).setUp() |
|
4976.2.1
by Ian Clatworthy
Hide most storage formats |
41 |
self._repo_strings = "2a" |
|
4599.3.1
by Robert Collins
Factor out some string duplication from blackbox.test_info to make changing the default format easier. |
42 |
|
|
1694.2.6
by Martin Pool
[merge] bzr.dev |
43 |
def test_info_non_existing(self): |
|
5017.3.45
by Vincent Ladeuil
Move MemoryServer back into bzrlib.transport.memory as it's needed as soon as a MemoryTransport is used. Add a NEWS entry. |
44 |
self.vfs_transport_factory = memory.MemoryServer |
|
4691.2.1
by Robert Collins
Add stronger test isolation by interception BzrDir.open and checking the thing being opened is known to the test suite. |
45 |
location = self.get_url() |
|
2530.3.1
by Martin Pool
Cleanup old variations on run_bzr in the test suite |
46 |
out, err = self.run_bzr('info '+location, retcode=3) |
|
1694.2.6
by Martin Pool
[merge] bzr.dev |
47 |
self.assertEqual(out, '') |
|
2745.3.2
by Daniel Watkins
Updated tests to reflect new error text. |
48 |
self.assertEqual(err, 'bzr: ERROR: Not a branch: "%s".\n' % location) |
|
1694.2.6
by Martin Pool
[merge] bzr.dev |
49 |
|
|
6241.4.2
by Jelmer Vernooij
No longer show empty output when only control directory is present. |
50 |
def test_info_empty_controldir(self): |
51 |
self.make_bzrdir('ctrl') |
|
52 |
out, err = self.run_bzr('info ctrl') |
|
53 |
self.assertEquals(out, |
|
|
6294.1.4
by Jelmer Vernooij
Fix tests. |
54 |
'Empty control directory (format: 2a or pack-0.92)\n' |
|
6241.4.2
by Jelmer Vernooij
No longer show empty output when only control directory is present. |
55 |
'Location:\n' |
56 |
' control directory: ctrl\n') |
|
57 |
self.assertEquals(err, '') |
|
58 |
||
|
6241.4.3
by Jelmer Vernooij
Add test for dangling tree references. |
59 |
def test_info_dangling_branch_reference(self): |
60 |
br = self.make_branch('target') |
|
61 |
br.create_checkout('from', lightweight=True) |
|
62 |
shutil.rmtree('target') |
|
63 |
out, err = self.run_bzr('info from') |
|
64 |
self.assertEquals(out, |
|
|
6294.1.4
by Jelmer Vernooij
Fix tests. |
65 |
'Dangling branch reference (format: 2a or pack-0.92)\n' |
|
6241.4.3
by Jelmer Vernooij
Add test for dangling tree references. |
66 |
'Location:\n' |
67 |
' control directory: from\n' |
|
68 |
' checkout of branch: target\n') |
|
69 |
self.assertEquals(err, '') |
|
70 |
||
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
71 |
def test_info_standalone(self): |
|
1624.3.18
by Olaf Conradi
Move to using bzrlib API for blackbox test cases. |
72 |
transport = self.get_transport() |
73 |
||
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
74 |
# Create initial standalone branch
|
|
5582.10.91
by Jelmer Vernooij
Fix some tests. |
75 |
tree1 = self.make_branch_and_tree('standalone', 'knit') |
|
1624.3.18
by Olaf Conradi
Move to using bzrlib API for blackbox test cases. |
76 |
self.build_tree(['standalone/a']) |
77 |
tree1.add('a') |
|
78 |
branch1 = tree1.branch |
|
|
2584.2.1
by Adeodato Simó
Make `bzr info` show related branches in non-verbose mode. |
79 |
|
80 |
out, err = self.run_bzr('info standalone') |
|
81 |
self.assertEqualDiff( |
|
|
5582.10.91
by Jelmer Vernooij
Fix some tests. |
82 |
"""Standalone tree (format: knit)
|
|
2584.2.1
by Adeodato Simó
Make `bzr info` show related branches in non-verbose mode. |
83 |
Location:
|
|
1551.15.41
by Aaron Bentley
Make info provide more related brances, and format all branches nicely |
84 |
branch root: standalone
|
85 |
""", out) |
|
|
2584.2.1
by Adeodato Simó
Make `bzr info` show related branches in non-verbose mode. |
86 |
self.assertEqual('', err) |
87 |
||
|
4032.2.1
by Ian Clatworthy
omit branch committers from info -v (now requires -vv) |
88 |
# Standalone branch - verbose mode
|
|
2530.3.1
by Martin Pool
Cleanup old variations on run_bzr in the test suite |
89 |
out, err = self.run_bzr('info standalone -v') |
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
90 |
self.assertEqualDiff( |
|
5582.10.91
by Jelmer Vernooij
Fix some tests. |
91 |
"""Standalone tree (format: knit)
|
|
2363.5.3
by Aaron Bentley
Add layout description to info output |
92 |
Location:
|
|
1551.15.41
by Aaron Bentley
Make info provide more related brances, and format all branches nicely |
93 |
branch root: standalone
|
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
94 |
|
95 |
Format:
|
|
|
5582.10.91
by Jelmer Vernooij
Fix some tests. |
96 |
control: Meta directory format 1
|
97 |
working tree: Working tree format 3
|
|
98 |
branch: Branch format 5
|
|
99 |
repository: Knit repository format 1
|
|
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
100 |
|
101 |
In the working tree:
|
|
102 |
0 unchanged
|
|
103 |
0 modified
|
|
104 |
1 added
|
|
105 |
0 removed
|
|
106 |
0 renamed
|
|
107 |
0 unknown
|
|
108 |
0 ignored
|
|
109 |
0 versioned subdirectories
|
|
110 |
||
111 |
Branch history:
|
|
112 |
0 revisions
|
|
|
4032.2.1
by Ian Clatworthy
omit branch committers from info -v (now requires -vv) |
113 |
|
114 |
Repository:
|
|
115 |
0 revisions
|
|
116 |
""", out) |
|
117 |
self.assertEqual('', err) |
|
118 |
||
119 |
# Standalone branch - really verbose mode
|
|
120 |
out, err = self.run_bzr('info standalone -vv') |
|
121 |
self.assertEqualDiff( |
|
|
5582.10.91
by Jelmer Vernooij
Fix some tests. |
122 |
"""Standalone tree (format: knit)
|
|
4032.2.1
by Ian Clatworthy
omit branch committers from info -v (now requires -vv) |
123 |
Location:
|
124 |
branch root: standalone
|
|
125 |
||
126 |
Format:
|
|
|
5582.10.91
by Jelmer Vernooij
Fix some tests. |
127 |
control: Meta directory format 1
|
128 |
working tree: Working tree format 3
|
|
129 |
branch: Branch format 5
|
|
130 |
repository: Knit repository format 1
|
|
|
4032.2.1
by Ian Clatworthy
omit branch committers from info -v (now requires -vv) |
131 |
|
132 |
In the working tree:
|
|
133 |
0 unchanged
|
|
134 |
0 modified
|
|
135 |
1 added
|
|
136 |
0 removed
|
|
137 |
0 renamed
|
|
138 |
0 unknown
|
|
139 |
0 ignored
|
|
140 |
0 versioned subdirectories
|
|
141 |
||
142 |
Branch history:
|
|
143 |
0 revisions
|
|
|
2363.5.11
by Aaron Bentley
All info tests pass |
144 |
0 committers
|
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
145 |
|
|
2395.1.1
by Martin Pool
rename 'revision store' to 'repository' in bzr info |
146 |
Repository:
|
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
147 |
0 revisions
|
|
1551.15.41
by Aaron Bentley
Make info provide more related brances, and format all branches nicely |
148 |
""", out) |
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
149 |
self.assertEqual('', err) |
|
1624.3.18
by Olaf Conradi
Move to using bzrlib API for blackbox test cases. |
150 |
tree1.commit('commit one') |
|
6165.4.1
by Jelmer Vernooij
Avoid using revision_history. |
151 |
rev = branch1.repository.get_revision(branch1.last_revision()) |
|
5010.2.2
by Vincent Ladeuil
Fix blackbox/test_infp.py imports. |
152 |
datestring_first = osutils.format_date(rev.timestamp, rev.timezone) |
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
153 |
|
|
1624.3.18
by Olaf Conradi
Move to using bzrlib API for blackbox test cases. |
154 |
# Branch standalone with push location
|
155 |
branch2 = branch1.bzrdir.sprout('branch').open_branch() |
|
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
156 |
branch2.set_push_location(branch1.bzrdir.root_transport.base) |
|
2584.2.1
by Adeodato Simó
Make `bzr info` show related branches in non-verbose mode. |
157 |
|
158 |
out, err = self.run_bzr('info branch') |
|
159 |
self.assertEqualDiff( |
|
|
5582.10.91
by Jelmer Vernooij
Fix some tests. |
160 |
"""Standalone tree (format: knit)
|
|
2584.2.1
by Adeodato Simó
Make `bzr info` show related branches in non-verbose mode. |
161 |
Location:
|
|
1551.15.41
by Aaron Bentley
Make info provide more related brances, and format all branches nicely |
162 |
branch root: branch
|
|
2584.2.1
by Adeodato Simó
Make `bzr info` show related branches in non-verbose mode. |
163 |
|
164 |
Related branches:
|
|
|
1551.15.41
by Aaron Bentley
Make info provide more related brances, and format all branches nicely |
165 |
push branch: standalone
|
166 |
parent branch: standalone
|
|
167 |
""", out) |
|
|
2584.2.1
by Adeodato Simó
Make `bzr info` show related branches in non-verbose mode. |
168 |
self.assertEqual('', err) |
169 |
||
|
2530.3.1
by Martin Pool
Cleanup old variations on run_bzr in the test suite |
170 |
out, err = self.run_bzr('info branch --verbose') |
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
171 |
self.assertEqualDiff( |
|
5582.10.91
by Jelmer Vernooij
Fix some tests. |
172 |
"""Standalone tree (format: knit)
|
|
2363.5.3
by Aaron Bentley
Add layout description to info output |
173 |
Location:
|
|
1551.15.41
by Aaron Bentley
Make info provide more related brances, and format all branches nicely |
174 |
branch root: branch
|
|
1694.2.6
by Martin Pool
[merge] bzr.dev |
175 |
|
176 |
Related branches:
|
|
|
1551.15.41
by Aaron Bentley
Make info provide more related brances, and format all branches nicely |
177 |
push branch: standalone
|
178 |
parent branch: standalone
|
|
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
179 |
|
180 |
Format:
|
|
|
5582.10.91
by Jelmer Vernooij
Fix some tests. |
181 |
control: Meta directory format 1
|
182 |
working tree: Working tree format 3
|
|
183 |
branch: Branch format 5
|
|
184 |
repository: Knit repository format 1
|
|
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
185 |
|
186 |
In the working tree:
|
|
187 |
1 unchanged
|
|
188 |
0 modified
|
|
189 |
0 added
|
|
190 |
0 removed
|
|
191 |
0 renamed
|
|
192 |
0 unknown
|
|
193 |
0 ignored
|
|
194 |
0 versioned subdirectories
|
|
195 |
||
196 |
Branch history:
|
|
197 |
1 revision
|
|
198 |
0 days old
|
|
199 |
first revision: %s
|
|
200 |
latest revision: %s
|
|
201 |
||
|
2395.1.1
by Martin Pool
rename 'revision store' to 'repository' in bzr info |
202 |
Repository:
|
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
203 |
1 revision
|
|
1551.15.41
by Aaron Bentley
Make info provide more related brances, and format all branches nicely |
204 |
""" % (datestring_first, datestring_first, |
|
1694.2.6
by Martin Pool
[merge] bzr.dev |
205 |
), out) |
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
206 |
self.assertEqual('', err) |
207 |
||
|
1624.3.18
by Olaf Conradi
Move to using bzrlib API for blackbox test cases. |
208 |
# Branch and bind to standalone, needs upgrade to metadir
|
209 |
# (creates backup as unknown)
|
|
|
1624.3.47
by Olaf Conradi
Fix test case for bzr info in upgrading a standalone branch to metadir, |
210 |
branch1.bzrdir.sprout('bound') |
|
2204.4.13
by Aaron Bentley
Update all test cases to avoid set_default_format |
211 |
knit1_format = bzrdir.format_registry.make_bzrdir('knit') |
|
3575.1.1
by Andrew Bennetts
Tidy imports in blackbox.test_info, fixing trivial test failure caused by a missing import. |
212 |
upgrade.upgrade('bound', knit1_format) |
|
6207.3.3
by jelmer at samba
Fix tests and the like. |
213 |
branch3 = controldir.ControlDir.open('bound').open_branch() |
|
1624.3.18
by Olaf Conradi
Move to using bzrlib API for blackbox test cases. |
214 |
branch3.bind(branch1) |
|
1780.1.2
by Robert Collins
(robertc)Partial refactoring of info tests to be more robust to format changes. |
215 |
bound_tree = branch3.bzrdir.open_workingtree() |
|
2530.3.1
by Martin Pool
Cleanup old variations on run_bzr in the test suite |
216 |
out, err = self.run_bzr('info -v bound') |
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
217 |
self.assertEqualDiff( |
|
2363.5.6
by Aaron Bentley
Add short format description |
218 |
"""Checkout (format: knit)
|
|
2363.5.3
by Aaron Bentley
Add layout description to info output |
219 |
Location:
|
|
1551.15.41
by Aaron Bentley
Make info provide more related brances, and format all branches nicely |
220 |
checkout root: bound
|
221 |
checkout of branch: standalone
|
|
|
1694.2.6
by Martin Pool
[merge] bzr.dev |
222 |
|
223 |
Related branches:
|
|
|
1551.15.41
by Aaron Bentley
Make info provide more related brances, and format all branches nicely |
224 |
parent branch: standalone
|
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
225 |
|
226 |
Format:
|
|
|
1624.3.19
by Olaf Conradi
New call get_format_description to give a user-friendly description of a |
227 |
control: Meta directory format 1
|
|
1780.1.2
by Robert Collins
(robertc)Partial refactoring of info tests to be more robust to format changes. |
228 |
working tree: %s
|
|
2230.3.13
by Aaron Bentley
Fix most info tests (but some depend on odd cloning behavior) |
229 |
branch: %s
|
|
1666.1.6
by Robert Collins
Make knit the default format. |
230 |
repository: %s
|
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
231 |
|
232 |
In the working tree:
|
|
233 |
1 unchanged
|
|
234 |
0 modified
|
|
235 |
0 added
|
|
236 |
0 removed
|
|
237 |
0 renamed
|
|
|
5035.4.8
by Martin Pool
Update info tests to cope with backup.bzr being ignored |
238 |
0 unknown
|
|
5582.10.91
by Jelmer Vernooij
Fix some tests. |
239 |
0 ignored
|
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
240 |
0 versioned subdirectories
|
241 |
||
242 |
Branch history:
|
|
243 |
1 revision
|
|
244 |
0 days old
|
|
245 |
first revision: %s
|
|
246 |
latest revision: %s
|
|
247 |
||
|
2395.1.1
by Martin Pool
rename 'revision store' to 'repository' in bzr info |
248 |
Repository:
|
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
249 |
1 revision
|
|
1551.15.41
by Aaron Bentley
Make info provide more related brances, and format all branches nicely |
250 |
""" % (bound_tree._format.get_format_description(), |
|
2230.3.13
by Aaron Bentley
Fix most info tests (but some depend on odd cloning behavior) |
251 |
branch3._format.get_format_description(), |
|
1666.1.6
by Robert Collins
Make knit the default format. |
252 |
branch3.repository._format.get_format_description(), |
253 |
datestring_first, datestring_first, |
|
254 |
), out) |
|
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
255 |
self.assertEqual('', err) |
256 |
||
|
1624.3.18
by Olaf Conradi
Move to using bzrlib API for blackbox test cases. |
257 |
# Checkout standalone (same as above, but does not have parent set)
|
|
6207.3.3
by jelmer at samba
Fix tests and the like. |
258 |
branch4 = controldir.ControlDir.create_branch_convenience('checkout', |
|
2204.4.13
by Aaron Bentley
Update all test cases to avoid set_default_format |
259 |
format=knit1_format) |
|
1624.3.18
by Olaf Conradi
Move to using bzrlib API for blackbox test cases. |
260 |
branch4.bind(branch1) |
261 |
branch4.bzrdir.open_workingtree().update() |
|
|
2530.3.1
by Martin Pool
Cleanup old variations on run_bzr in the test suite |
262 |
out, err = self.run_bzr('info checkout --verbose') |
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
263 |
self.assertEqualDiff( |
|
2363.5.6
by Aaron Bentley
Add short format description |
264 |
"""Checkout (format: knit)
|
|
2363.5.3
by Aaron Bentley
Add layout description to info output |
265 |
Location:
|
|
1551.15.41
by Aaron Bentley
Make info provide more related brances, and format all branches nicely |
266 |
checkout root: checkout
|
267 |
checkout of branch: standalone
|
|
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
268 |
|
269 |
Format:
|
|
|
1624.3.19
by Olaf Conradi
New call get_format_description to give a user-friendly description of a |
270 |
control: Meta directory format 1
|
|
2255.2.201
by Robert Collins
Test_info needed updating after freezing the meaning of 'knit' format dirs. |
271 |
working tree: Working tree format 3
|
|
1624.3.19
by Olaf Conradi
New call get_format_description to give a user-friendly description of a |
272 |
branch: Branch format 5
|
|
1666.1.6
by Robert Collins
Make knit the default format. |
273 |
repository: %s
|
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
274 |
|
275 |
In the working tree:
|
|
276 |
1 unchanged
|
|
277 |
0 modified
|
|
278 |
0 added
|
|
279 |
0 removed
|
|
280 |
0 renamed
|
|
281 |
0 unknown
|
|
282 |
0 ignored
|
|
283 |
0 versioned subdirectories
|
|
284 |
||
285 |
Branch history:
|
|
286 |
1 revision
|
|
287 |
0 days old
|
|
288 |
first revision: %s
|
|
289 |
latest revision: %s
|
|
290 |
||
|
2395.1.1
by Martin Pool
rename 'revision store' to 'repository' in bzr info |
291 |
Repository:
|
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
292 |
1 revision
|
|
1551.15.41
by Aaron Bentley
Make info provide more related brances, and format all branches nicely |
293 |
""" % (branch4.repository._format.get_format_description(), |
|
1666.1.6
by Robert Collins
Make knit the default format. |
294 |
datestring_first, datestring_first, |
295 |
), out) |
|
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
296 |
self.assertEqual('', err) |
297 |
||
298 |
# Lightweight checkout (same as above, different branch and repository)
|
|
|
2204.4.13
by Aaron Bentley
Update all test cases to avoid set_default_format |
299 |
tree5 = branch1.create_checkout('lightcheckout', lightweight=True) |
|
1624.3.18
by Olaf Conradi
Move to using bzrlib API for blackbox test cases. |
300 |
branch5 = tree5.branch |
|
2530.3.1
by Martin Pool
Cleanup old variations on run_bzr in the test suite |
301 |
out, err = self.run_bzr('info -v lightcheckout') |
|
5728.2.1
by Jelmer Vernooij
Fix bb.test_info with both --no-plugins and without --no-plugins. |
302 |
if "metaweave" in bzrdir.format_registry: |
303 |
format_description = "knit or metaweave" |
|
304 |
else: |
|
305 |
format_description = "knit" |
|
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
306 |
self.assertEqualDiff( |
|
5728.2.1
by Jelmer Vernooij
Fix bb.test_info with both --no-plugins and without --no-plugins. |
307 |
"""Lightweight checkout (format: %s)
|
|
2363.5.3
by Aaron Bentley
Add layout description to info output |
308 |
Location:
|
|
1551.15.41
by Aaron Bentley
Make info provide more related brances, and format all branches nicely |
309 |
light checkout root: lightcheckout
|
310 |
checkout of branch: standalone
|
|
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
311 |
|
312 |
Format:
|
|
|
1624.3.19
by Olaf Conradi
New call get_format_description to give a user-friendly description of a |
313 |
control: Meta directory format 1
|
|
5582.10.91
by Jelmer Vernooij
Fix some tests. |
314 |
working tree: Working tree format 3
|
315 |
branch: Branch format 5
|
|
316 |
repository: Knit repository format 1
|
|
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
317 |
|
318 |
In the working tree:
|
|
319 |
1 unchanged
|
|
320 |
0 modified
|
|
321 |
0 added
|
|
322 |
0 removed
|
|
323 |
0 renamed
|
|
324 |
0 unknown
|
|
325 |
0 ignored
|
|
326 |
0 versioned subdirectories
|
|
327 |
||
328 |
Branch history:
|
|
329 |
1 revision
|
|
330 |
0 days old
|
|
331 |
first revision: %s
|
|
332 |
latest revision: %s
|
|
333 |
||
|
2395.1.1
by Martin Pool
rename 'revision store' to 'repository' in bzr info |
334 |
Repository:
|
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
335 |
1 revision
|
|
5728.2.1
by Jelmer Vernooij
Fix bb.test_info with both --no-plugins and without --no-plugins. |
336 |
""" % (format_description, datestring_first, datestring_first,), out) |
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
337 |
self.assertEqual('', err) |
338 |
||
339 |
# Update initial standalone branch
|
|
|
1624.3.18
by Olaf Conradi
Move to using bzrlib API for blackbox test cases. |
340 |
self.build_tree(['standalone/b']) |
341 |
tree1.add('b') |
|
342 |
tree1.commit('commit two') |
|
|
6165.4.1
by Jelmer Vernooij
Avoid using revision_history. |
343 |
rev = branch1.repository.get_revision(branch1.last_revision()) |
|
5010.2.2
by Vincent Ladeuil
Fix blackbox/test_infp.py imports. |
344 |
datestring_last = osutils.format_date(rev.timestamp, rev.timezone) |
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
345 |
|
346 |
# Out of date branched standalone branch will not be detected
|
|
|
2530.3.1
by Martin Pool
Cleanup old variations on run_bzr in the test suite |
347 |
out, err = self.run_bzr('info -v branch') |
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
348 |
self.assertEqualDiff( |
|
5582.10.91
by Jelmer Vernooij
Fix some tests. |
349 |
"""Standalone tree (format: knit)
|
|
2363.5.3
by Aaron Bentley
Add layout description to info output |
350 |
Location:
|
|
1551.15.41
by Aaron Bentley
Make info provide more related brances, and format all branches nicely |
351 |
branch root: branch
|
|
1694.2.6
by Martin Pool
[merge] bzr.dev |
352 |
|
353 |
Related branches:
|
|
|
1551.15.41
by Aaron Bentley
Make info provide more related brances, and format all branches nicely |
354 |
push branch: standalone
|
355 |
parent branch: standalone
|
|
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
356 |
|
357 |
Format:
|
|
|
5582.10.91
by Jelmer Vernooij
Fix some tests. |
358 |
control: Meta directory format 1
|
359 |
working tree: Working tree format 3
|
|
360 |
branch: Branch format 5
|
|
361 |
repository: Knit repository format 1
|
|
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
362 |
|
363 |
In the working tree:
|
|
364 |
1 unchanged
|
|
365 |
0 modified
|
|
366 |
0 added
|
|
367 |
0 removed
|
|
368 |
0 renamed
|
|
369 |
0 unknown
|
|
370 |
0 ignored
|
|
371 |
0 versioned subdirectories
|
|
372 |
||
373 |
Branch history:
|
|
374 |
1 revision
|
|
375 |
0 days old
|
|
376 |
first revision: %s
|
|
377 |
latest revision: %s
|
|
378 |
||
|
2395.1.1
by Martin Pool
rename 'revision store' to 'repository' in bzr info |
379 |
Repository:
|
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
380 |
1 revision
|
|
1551.15.41
by Aaron Bentley
Make info provide more related brances, and format all branches nicely |
381 |
""" % (datestring_first, datestring_first, |
|
1694.2.6
by Martin Pool
[merge] bzr.dev |
382 |
), out) |
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
383 |
self.assertEqual('', err) |
384 |
||
385 |
# Out of date bound branch
|
|
|
2530.3.1
by Martin Pool
Cleanup old variations on run_bzr in the test suite |
386 |
out, err = self.run_bzr('info -v bound') |
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
387 |
self.assertEqualDiff( |
|
2363.5.6
by Aaron Bentley
Add short format description |
388 |
"""Checkout (format: knit)
|
|
2363.5.3
by Aaron Bentley
Add layout description to info output |
389 |
Location:
|
|
1551.15.41
by Aaron Bentley
Make info provide more related brances, and format all branches nicely |
390 |
checkout root: bound
|
391 |
checkout of branch: standalone
|
|
|
1694.2.6
by Martin Pool
[merge] bzr.dev |
392 |
|
393 |
Related branches:
|
|
|
1551.15.41
by Aaron Bentley
Make info provide more related brances, and format all branches nicely |
394 |
parent branch: standalone
|
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
395 |
|
396 |
Format:
|
|
|
1624.3.19
by Olaf Conradi
New call get_format_description to give a user-friendly description of a |
397 |
control: Meta directory format 1
|
398 |
working tree: Working tree format 3
|
|
399 |
branch: Branch format 5
|
|
|
1666.1.6
by Robert Collins
Make knit the default format. |
400 |
repository: %s
|
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
401 |
|
402 |
Branch is out of date: missing 1 revision.
|
|
403 |
||
404 |
In the working tree:
|
|
405 |
1 unchanged
|
|
406 |
0 modified
|
|
407 |
0 added
|
|
408 |
0 removed
|
|
409 |
0 renamed
|
|
|
5035.4.8
by Martin Pool
Update info tests to cope with backup.bzr being ignored |
410 |
0 unknown
|
|
5582.10.91
by Jelmer Vernooij
Fix some tests. |
411 |
0 ignored
|
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
412 |
0 versioned subdirectories
|
413 |
||
414 |
Branch history:
|
|
415 |
1 revision
|
|
416 |
0 days old
|
|
417 |
first revision: %s
|
|
418 |
latest revision: %s
|
|
419 |
||
|
2395.1.1
by Martin Pool
rename 'revision store' to 'repository' in bzr info |
420 |
Repository:
|
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
421 |
1 revision
|
|
1551.15.41
by Aaron Bentley
Make info provide more related brances, and format all branches nicely |
422 |
""" % (branch3.repository._format.get_format_description(), |
|
1666.1.6
by Robert Collins
Make knit the default format. |
423 |
datestring_first, datestring_first, |
424 |
), out) |
|
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
425 |
self.assertEqual('', err) |
426 |
||
427 |
# Out of date checkout
|
|
|
2530.3.1
by Martin Pool
Cleanup old variations on run_bzr in the test suite |
428 |
out, err = self.run_bzr('info -v checkout') |
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
429 |
self.assertEqualDiff( |
|
2363.5.6
by Aaron Bentley
Add short format description |
430 |
"""Checkout (format: knit)
|
|
2363.5.3
by Aaron Bentley
Add layout description to info output |
431 |
Location:
|
|
1551.15.41
by Aaron Bentley
Make info provide more related brances, and format all branches nicely |
432 |
checkout root: checkout
|
433 |
checkout of branch: standalone
|
|
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
434 |
|
435 |
Format:
|
|
|
1624.3.19
by Olaf Conradi
New call get_format_description to give a user-friendly description of a |
436 |
control: Meta directory format 1
|
|
2255.2.201
by Robert Collins
Test_info needed updating after freezing the meaning of 'knit' format dirs. |
437 |
working tree: Working tree format 3
|
|
1624.3.19
by Olaf Conradi
New call get_format_description to give a user-friendly description of a |
438 |
branch: Branch format 5
|
|
1666.1.6
by Robert Collins
Make knit the default format. |
439 |
repository: %s
|
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
440 |
|
441 |
Branch is out of date: missing 1 revision.
|
|
442 |
||
443 |
In the working tree:
|
|
444 |
1 unchanged
|
|
445 |
0 modified
|
|
446 |
0 added
|
|
447 |
0 removed
|
|
448 |
0 renamed
|
|
449 |
0 unknown
|
|
450 |
0 ignored
|
|
451 |
0 versioned subdirectories
|
|
452 |
||
453 |
Branch history:
|
|
454 |
1 revision
|
|
455 |
0 days old
|
|
456 |
first revision: %s
|
|
457 |
latest revision: %s
|
|
458 |
||
|
2395.1.1
by Martin Pool
rename 'revision store' to 'repository' in bzr info |
459 |
Repository:
|
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
460 |
1 revision
|
|
1551.15.41
by Aaron Bentley
Make info provide more related brances, and format all branches nicely |
461 |
""" % (branch4.repository._format.get_format_description(), |
|
1666.1.6
by Robert Collins
Make knit the default format. |
462 |
datestring_first, datestring_first, |
463 |
), out) |
|
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
464 |
self.assertEqual('', err) |
465 |
||
466 |
# Out of date lightweight checkout
|
|
|
2530.3.1
by Martin Pool
Cleanup old variations on run_bzr in the test suite |
467 |
out, err = self.run_bzr('info lightcheckout --verbose') |
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
468 |
self.assertEqualDiff( |
|
5728.2.1
by Jelmer Vernooij
Fix bb.test_info with both --no-plugins and without --no-plugins. |
469 |
"""Lightweight checkout (format: %s)
|
|
2363.5.3
by Aaron Bentley
Add layout description to info output |
470 |
Location:
|
|
1551.15.41
by Aaron Bentley
Make info provide more related brances, and format all branches nicely |
471 |
light checkout root: lightcheckout
|
472 |
checkout of branch: standalone
|
|
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
473 |
|
474 |
Format:
|
|
|
1624.3.19
by Olaf Conradi
New call get_format_description to give a user-friendly description of a |
475 |
control: Meta directory format 1
|
|
5582.10.91
by Jelmer Vernooij
Fix some tests. |
476 |
working tree: Working tree format 3
|
477 |
branch: Branch format 5
|
|
478 |
repository: Knit repository format 1
|
|
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
479 |
|
480 |
Working tree is out of date: missing 1 revision.
|
|
481 |
||
482 |
In the working tree:
|
|
483 |
1 unchanged
|
|
484 |
0 modified
|
|
485 |
0 added
|
|
486 |
0 removed
|
|
487 |
0 renamed
|
|
488 |
0 unknown
|
|
489 |
0 ignored
|
|
490 |
0 versioned subdirectories
|
|
491 |
||
492 |
Branch history:
|
|
493 |
2 revisions
|
|
494 |
0 days old
|
|
495 |
first revision: %s
|
|
496 |
latest revision: %s
|
|
497 |
||
|
2395.1.1
by Martin Pool
rename 'revision store' to 'repository' in bzr info |
498 |
Repository:
|
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
499 |
2 revisions
|
|
5728.2.1
by Jelmer Vernooij
Fix bb.test_info with both --no-plugins and without --no-plugins. |
500 |
""" % (format_description, datestring_first, datestring_last,), out) |
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
501 |
self.assertEqual('', err) |
502 |
||
|
1624.3.48
by Olaf Conradi
Add info on standalone branches without a working tree. |
503 |
def test_info_standalone_no_tree(self): |
504 |
# create standalone branch without a working tree
|
|
|
2204.4.13
by Aaron Bentley
Update all test cases to avoid set_default_format |
505 |
format = bzrdir.format_registry.make_bzrdir('default') |
|
1624.3.48
by Olaf Conradi
Add info on standalone branches without a working tree. |
506 |
branch = self.make_branch('branch') |
507 |
repo = branch.repository |
|
|
2530.3.1
by Martin Pool
Cleanup old variations on run_bzr in the test suite |
508 |
out, err = self.run_bzr('info branch -v') |
|
1624.3.48
by Olaf Conradi
Add info on standalone branches without a working tree. |
509 |
self.assertEqualDiff( |
|
3010.1.13
by Robert Collins
Use the info code functions to determine format strings in the blackbox tests, and handle repositories that do not lock like packs. |
510 |
"""Standalone branch (format: %s)
|
|
2363.5.3
by Aaron Bentley
Add layout description to info output |
511 |
Location:
|
|
1551.15.41
by Aaron Bentley
Make info provide more related brances, and format all branches nicely |
512 |
branch root: branch
|
|
1624.3.48
by Olaf Conradi
Add info on standalone branches without a working tree. |
513 |
|
514 |
Format:
|
|
515 |
control: Meta directory format 1
|
|
|
2230.3.13
by Aaron Bentley
Fix most info tests (but some depend on odd cloning behavior) |
516 |
branch: %s
|
|
1624.3.48
by Olaf Conradi
Add info on standalone branches without a working tree. |
517 |
repository: %s
|
518 |
||
519 |
Branch history:
|
|
520 |
0 revisions
|
|
521 |
||
|
2395.1.1
by Martin Pool
rename 'revision store' to 'repository' in bzr info |
522 |
Repository:
|
|
1624.3.48
by Olaf Conradi
Add info on standalone branches without a working tree. |
523 |
0 revisions
|
|
3010.1.13
by Robert Collins
Use the info code functions to determine format strings in the blackbox tests, and handle repositories that do not lock like packs. |
524 |
""" % (info.describe_format(repo.bzrdir, repo, branch, None), |
525 |
format.get_branch_format().get_format_description(), |
|
|
2204.4.13
by Aaron Bentley
Update all test cases to avoid set_default_format |
526 |
format.repository_format.get_format_description(), |
|
1624.3.48
by Olaf Conradi
Add info on standalone branches without a working tree. |
527 |
), out) |
528 |
self.assertEqual('', err) |
|
529 |
||
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
530 |
def test_info_shared_repository(self): |
|
2241.1.4
by Martin Pool
Moved old weave-based repository formats into bzrlib.repofmt.weaverepo. |
531 |
format = bzrdir.format_registry.make_bzrdir('knit') |
|
1624.3.18
by Olaf Conradi
Move to using bzrlib API for blackbox test cases. |
532 |
transport = self.get_transport() |
|
1624.3.21
by Olaf Conradi
Make bzr info command work on both local and remote locations. Support |
533 |
|
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
534 |
# Create shared repository
|
|
2204.4.13
by Aaron Bentley
Update all test cases to avoid set_default_format |
535 |
repo = self.make_repository('repo', shared=True, format=format) |
|
1624.3.18
by Olaf Conradi
Move to using bzrlib API for blackbox test cases. |
536 |
repo.set_make_working_trees(False) |
|
2530.3.1
by Martin Pool
Cleanup old variations on run_bzr in the test suite |
537 |
out, err = self.run_bzr('info -v repo') |
|
1624.3.21
by Olaf Conradi
Make bzr info command work on both local and remote locations. Support |
538 |
self.assertEqualDiff( |
|
2363.5.17
by Aaron Bentley
Change separator from '/' to 'or' |
539 |
"""Shared repository (format: dirstate or dirstate-tags or knit)
|
|
2363.5.3
by Aaron Bentley
Add layout description to info output |
540 |
Location:
|
|
1694.2.6
by Martin Pool
[merge] bzr.dev |
541 |
shared repository: %s
|
|
1624.3.21
by Olaf Conradi
Make bzr info command work on both local and remote locations. Support |
542 |
|
543 |
Format:
|
|
544 |
control: Meta directory format 1
|
|
|
1666.1.6
by Robert Collins
Make knit the default format. |
545 |
repository: %s
|
|
1624.3.21
by Olaf Conradi
Make bzr info command work on both local and remote locations. Support |
546 |
|
|
2395.1.1
by Martin Pool
rename 'revision store' to 'repository' in bzr info |
547 |
Repository:
|
|
1624.3.21
by Olaf Conradi
Make bzr info command work on both local and remote locations. Support |
548 |
0 revisions
|
|
1551.15.41
by Aaron Bentley
Make info provide more related brances, and format all branches nicely |
549 |
""" % ('repo', format.repository_format.get_format_description(), |
|
1694.2.6
by Martin Pool
[merge] bzr.dev |
550 |
), out) |
|
1624.3.21
by Olaf Conradi
Make bzr info command work on both local and remote locations. Support |
551 |
self.assertEqual('', err) |
552 |
||
553 |
# Create branch inside shared repository
|
|
|
1624.3.18
by Olaf Conradi
Move to using bzrlib API for blackbox test cases. |
554 |
repo.bzrdir.root_transport.mkdir('branch') |
|
6207.3.8
by Jelmer Vernooij
Fix a bunch of tests. |
555 |
branch1 = controldir.ControlDir.create_branch_convenience( |
556 |
'repo/branch', format=format) |
|
|
2530.3.1
by Martin Pool
Cleanup old variations on run_bzr in the test suite |
557 |
out, err = self.run_bzr('info -v repo/branch') |
|
1624.3.21
by Olaf Conradi
Make bzr info command work on both local and remote locations. Support |
558 |
self.assertEqualDiff( |
|
2363.5.17
by Aaron Bentley
Change separator from '/' to 'or' |
559 |
"""Repository branch (format: dirstate or knit)
|
|
2363.5.3
by Aaron Bentley
Add layout description to info output |
560 |
Location:
|
|
1551.15.41
by Aaron Bentley
Make info provide more related brances, and format all branches nicely |
561 |
shared repository: repo
|
562 |
repository branch: repo/branch
|
|
|
1624.3.21
by Olaf Conradi
Make bzr info command work on both local and remote locations. Support |
563 |
|
564 |
Format:
|
|
565 |
control: Meta directory format 1
|
|
|
2230.3.13
by Aaron Bentley
Fix most info tests (but some depend on odd cloning behavior) |
566 |
branch: %s
|
|
1666.1.6
by Robert Collins
Make knit the default format. |
567 |
repository: %s
|
|
1624.3.21
by Olaf Conradi
Make bzr info command work on both local and remote locations. Support |
568 |
|
569 |
Branch history:
|
|
570 |
0 revisions
|
|
571 |
||
|
2395.1.1
by Martin Pool
rename 'revision store' to 'repository' in bzr info |
572 |
Repository:
|
|
1624.3.21
by Olaf Conradi
Make bzr info command work on both local and remote locations. Support |
573 |
0 revisions
|
|
1551.15.41
by Aaron Bentley
Make info provide more related brances, and format all branches nicely |
574 |
""" % (format.get_branch_format().get_format_description(), |
|
2204.4.13
by Aaron Bentley
Update all test cases to avoid set_default_format |
575 |
format.repository_format.get_format_description(), |
|
1666.1.6
by Robert Collins
Make knit the default format. |
576 |
), out) |
|
1624.3.21
by Olaf Conradi
Make bzr info command work on both local and remote locations. Support |
577 |
self.assertEqual('', err) |
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
578 |
|
579 |
# Create lightweight checkout
|
|
|
1624.3.18
by Olaf Conradi
Move to using bzrlib API for blackbox test cases. |
580 |
transport.mkdir('tree') |
581 |
transport.mkdir('tree/lightcheckout') |
|
|
3943.8.1
by Marius Kruger
remove all trailing whitespace from bzr source |
582 |
tree2 = branch1.create_checkout('tree/lightcheckout', |
|
2204.4.13
by Aaron Bentley
Update all test cases to avoid set_default_format |
583 |
lightweight=True) |
|
1624.3.18
by Olaf Conradi
Move to using bzrlib API for blackbox test cases. |
584 |
branch2 = tree2.branch |
|
2363.5.11
by Aaron Bentley
All info tests pass |
585 |
self.assertCheckoutStatusOutput('-v tree/lightcheckout', tree2, |
|
2363.5.18
by Aaron Bentley
Get all tests passing |
586 |
shared_repo=repo, repo_branch=branch1, verbose=True) |
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
587 |
|
588 |
# Create normal checkout
|
|
|
1551.8.5
by Aaron Bentley
Change name to create_checkout |
589 |
tree3 = branch1.create_checkout('tree/checkout') |
|
1780.1.2
by Robert Collins
(robertc)Partial refactoring of info tests to be more robust to format changes. |
590 |
self.assertCheckoutStatusOutput('tree/checkout --verbose', tree3, |
591 |
verbose=True, |
|
592 |
light_checkout=False, repo_branch=branch1) |
|
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
593 |
# Update lightweight checkout
|
|
1624.3.18
by Olaf Conradi
Move to using bzrlib API for blackbox test cases. |
594 |
self.build_tree(['tree/lightcheckout/a']) |
595 |
tree2.add('a') |
|
596 |
tree2.commit('commit one') |
|
|
6165.4.1
by Jelmer Vernooij
Avoid using revision_history. |
597 |
rev = repo.get_revision(branch2.last_revision()) |
|
5010.2.2
by Vincent Ladeuil
Fix blackbox/test_infp.py imports. |
598 |
datestring_first = osutils.format_date(rev.timestamp, rev.timezone) |
|
2530.3.1
by Martin Pool
Cleanup old variations on run_bzr in the test suite |
599 |
out, err = self.run_bzr('info tree/lightcheckout --verbose') |
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
600 |
self.assertEqualDiff( |
|
4599.3.1
by Robert Collins
Factor out some string duplication from blackbox.test_info to make changing the default format easier. |
601 |
"""Lightweight checkout (format: %s)
|
|
2363.5.3
by Aaron Bentley
Add layout description to info output |
602 |
Location:
|
|
1551.15.41
by Aaron Bentley
Make info provide more related brances, and format all branches nicely |
603 |
light checkout root: tree/lightcheckout
|
604 |
checkout of branch: repo/branch
|
|
605 |
shared repository: repo
|
|
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
606 |
|
607 |
Format:
|
|
|
1624.3.19
by Olaf Conradi
New call get_format_description to give a user-friendly description of a |
608 |
control: Meta directory format 1
|
|
4599.4.7
by Robert Collins
Update blackbox.test_info tests for 2a as default. |
609 |
working tree: Working tree format 6
|
|
2230.3.13
by Aaron Bentley
Fix most info tests (but some depend on odd cloning behavior) |
610 |
branch: %s
|
|
1666.1.6
by Robert Collins
Make knit the default format. |
611 |
repository: %s
|
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
612 |
|
613 |
In the working tree:
|
|
614 |
1 unchanged
|
|
615 |
0 modified
|
|
616 |
0 added
|
|
617 |
0 removed
|
|
618 |
0 renamed
|
|
619 |
0 unknown
|
|
620 |
0 ignored
|
|
621 |
0 versioned subdirectories
|
|
622 |
||
623 |
Branch history:
|
|
624 |
1 revision
|
|
625 |
0 days old
|
|
626 |
first revision: %s
|
|
627 |
latest revision: %s
|
|
628 |
||
|
2395.1.1
by Martin Pool
rename 'revision store' to 'repository' in bzr info |
629 |
Repository:
|
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
630 |
1 revision
|
|
4599.3.1
by Robert Collins
Factor out some string duplication from blackbox.test_info to make changing the default format easier. |
631 |
""" % (self._repo_strings, format.get_branch_format().get_format_description(), |
|
2204.4.13
by Aaron Bentley
Update all test cases to avoid set_default_format |
632 |
format.repository_format.get_format_description(), |
|
1666.1.6
by Robert Collins
Make knit the default format. |
633 |
datestring_first, datestring_first, |
634 |
), out) |
|
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
635 |
self.assertEqual('', err) |
636 |
||
637 |
# Out of date checkout
|
|
|
2530.3.1
by Martin Pool
Cleanup old variations on run_bzr in the test suite |
638 |
out, err = self.run_bzr('info -v tree/checkout') |
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
639 |
self.assertEqualDiff( |
|
4599.4.7
by Robert Collins
Update blackbox.test_info tests for 2a as default. |
640 |
"""Checkout (format: unnamed)
|
|
2363.5.3
by Aaron Bentley
Add layout description to info output |
641 |
Location:
|
|
1551.15.41
by Aaron Bentley
Make info provide more related brances, and format all branches nicely |
642 |
checkout root: tree/checkout
|
643 |
checkout of branch: repo/branch
|
|
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
644 |
|
645 |
Format:
|
|
|
1624.3.19
by Olaf Conradi
New call get_format_description to give a user-friendly description of a |
646 |
control: Meta directory format 1
|
|
4599.4.7
by Robert Collins
Update blackbox.test_info tests for 2a as default. |
647 |
working tree: Working tree format 6
|
|
2230.3.13
by Aaron Bentley
Fix most info tests (but some depend on odd cloning behavior) |
648 |
branch: %s
|
|
1666.1.6
by Robert Collins
Make knit the default format. |
649 |
repository: %s
|
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
650 |
|
651 |
Branch is out of date: missing 1 revision.
|
|
652 |
||
653 |
In the working tree:
|
|
654 |
0 unchanged
|
|
655 |
0 modified
|
|
656 |
0 added
|
|
657 |
0 removed
|
|
658 |
0 renamed
|
|
659 |
0 unknown
|
|
660 |
0 ignored
|
|
661 |
0 versioned subdirectories
|
|
662 |
||
663 |
Branch history:
|
|
664 |
0 revisions
|
|
665 |
||
|
2395.1.1
by Martin Pool
rename 'revision store' to 'repository' in bzr info |
666 |
Repository:
|
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
667 |
0 revisions
|
|
1551.15.41
by Aaron Bentley
Make info provide more related brances, and format all branches nicely |
668 |
""" % (format.get_branch_format().get_format_description(), |
|
2204.4.13
by Aaron Bentley
Update all test cases to avoid set_default_format |
669 |
format.repository_format.get_format_description(), |
|
1666.1.6
by Robert Collins
Make knit the default format. |
670 |
), out) |
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
671 |
self.assertEqual('', err) |
672 |
||
673 |
# Update checkout
|
|
|
1624.3.18
by Olaf Conradi
Move to using bzrlib API for blackbox test cases. |
674 |
tree3.update() |
675 |
self.build_tree(['tree/checkout/b']) |
|
676 |
tree3.add('b') |
|
|
2530.3.1
by Martin Pool
Cleanup old variations on run_bzr in the test suite |
677 |
out, err = self.run_bzr('info tree/checkout --verbose') |
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
678 |
self.assertEqualDiff( |
|
4599.4.7
by Robert Collins
Update blackbox.test_info tests for 2a as default. |
679 |
"""Checkout (format: unnamed)
|
|
2363.5.3
by Aaron Bentley
Add layout description to info output |
680 |
Location:
|
|
1551.15.41
by Aaron Bentley
Make info provide more related brances, and format all branches nicely |
681 |
checkout root: tree/checkout
|
682 |
checkout of branch: repo/branch
|
|
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
683 |
|
684 |
Format:
|
|
|
1624.3.19
by Olaf Conradi
New call get_format_description to give a user-friendly description of a |
685 |
control: Meta directory format 1
|
|
4599.4.7
by Robert Collins
Update blackbox.test_info tests for 2a as default. |
686 |
working tree: Working tree format 6
|
|
2230.3.13
by Aaron Bentley
Fix most info tests (but some depend on odd cloning behavior) |
687 |
branch: %s
|
|
1666.1.6
by Robert Collins
Make knit the default format. |
688 |
repository: %s
|
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
689 |
|
690 |
In the working tree:
|
|
691 |
1 unchanged
|
|
692 |
0 modified
|
|
693 |
1 added
|
|
694 |
0 removed
|
|
695 |
0 renamed
|
|
696 |
0 unknown
|
|
697 |
0 ignored
|
|
698 |
0 versioned subdirectories
|
|
699 |
||
700 |
Branch history:
|
|
701 |
1 revision
|
|
702 |
0 days old
|
|
703 |
first revision: %s
|
|
704 |
latest revision: %s
|
|
705 |
||
|
2395.1.1
by Martin Pool
rename 'revision store' to 'repository' in bzr info |
706 |
Repository:
|
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
707 |
1 revision
|
|
1551.15.41
by Aaron Bentley
Make info provide more related brances, and format all branches nicely |
708 |
""" % (format.get_branch_format().get_format_description(), |
|
2204.4.13
by Aaron Bentley
Update all test cases to avoid set_default_format |
709 |
format.repository_format.get_format_description(), |
|
1666.1.6
by Robert Collins
Make knit the default format. |
710 |
datestring_first, datestring_first, |
711 |
), out) |
|
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
712 |
self.assertEqual('', err) |
|
1624.3.18
by Olaf Conradi
Move to using bzrlib API for blackbox test cases. |
713 |
tree3.commit('commit two') |
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
714 |
|
715 |
# Out of date lightweight checkout
|
|
|
6165.4.1
by Jelmer Vernooij
Avoid using revision_history. |
716 |
rev = repo.get_revision(branch1.last_revision()) |
|
5010.2.2
by Vincent Ladeuil
Fix blackbox/test_infp.py imports. |
717 |
datestring_last = osutils.format_date(rev.timestamp, rev.timezone) |
|
2530.3.1
by Martin Pool
Cleanup old variations on run_bzr in the test suite |
718 |
out, err = self.run_bzr('info tree/lightcheckout --verbose') |
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
719 |
self.assertEqualDiff( |
|
4599.3.1
by Robert Collins
Factor out some string duplication from blackbox.test_info to make changing the default format easier. |
720 |
"""Lightweight checkout (format: %s)
|
|
2363.5.3
by Aaron Bentley
Add layout description to info output |
721 |
Location:
|
|
1551.15.41
by Aaron Bentley
Make info provide more related brances, and format all branches nicely |
722 |
light checkout root: tree/lightcheckout
|
723 |
checkout of branch: repo/branch
|
|
724 |
shared repository: repo
|
|
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
725 |
|
726 |
Format:
|
|
|
1624.3.19
by Olaf Conradi
New call get_format_description to give a user-friendly description of a |
727 |
control: Meta directory format 1
|
|
4599.4.7
by Robert Collins
Update blackbox.test_info tests for 2a as default. |
728 |
working tree: Working tree format 6
|
|
2230.3.13
by Aaron Bentley
Fix most info tests (but some depend on odd cloning behavior) |
729 |
branch: %s
|
|
1666.1.6
by Robert Collins
Make knit the default format. |
730 |
repository: %s
|
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
731 |
|
732 |
Working tree is out of date: missing 1 revision.
|
|
733 |
||
734 |
In the working tree:
|
|
735 |
1 unchanged
|
|
736 |
0 modified
|
|
737 |
0 added
|
|
738 |
0 removed
|
|
739 |
0 renamed
|
|
740 |
0 unknown
|
|
741 |
0 ignored
|
|
742 |
0 versioned subdirectories
|
|
743 |
||
744 |
Branch history:
|
|
745 |
2 revisions
|
|
746 |
0 days old
|
|
747 |
first revision: %s
|
|
748 |
latest revision: %s
|
|
749 |
||
|
2395.1.1
by Martin Pool
rename 'revision store' to 'repository' in bzr info |
750 |
Repository:
|
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
751 |
2 revisions
|
|
4599.3.1
by Robert Collins
Factor out some string duplication from blackbox.test_info to make changing the default format easier. |
752 |
""" % (self._repo_strings, format.get_branch_format().get_format_description(), |
|
2204.4.13
by Aaron Bentley
Update all test cases to avoid set_default_format |
753 |
format.repository_format.get_format_description(), |
|
1666.1.6
by Robert Collins
Make knit the default format. |
754 |
datestring_first, datestring_last, |
755 |
), out) |
|
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
756 |
self.assertEqual('', err) |
757 |
||
|
1624.3.21
by Olaf Conradi
Make bzr info command work on both local and remote locations. Support |
758 |
# Show info about shared branch
|
|
2530.3.1
by Martin Pool
Cleanup old variations on run_bzr in the test suite |
759 |
out, err = self.run_bzr('info repo/branch --verbose') |
|
1624.3.21
by Olaf Conradi
Make bzr info command work on both local and remote locations. Support |
760 |
self.assertEqualDiff( |
|
2363.5.17
by Aaron Bentley
Change separator from '/' to 'or' |
761 |
"""Repository branch (format: dirstate or knit)
|
|
2363.5.3
by Aaron Bentley
Add layout description to info output |
762 |
Location:
|
|
1551.15.41
by Aaron Bentley
Make info provide more related brances, and format all branches nicely |
763 |
shared repository: repo
|
764 |
repository branch: repo/branch
|
|
|
1624.3.21
by Olaf Conradi
Make bzr info command work on both local and remote locations. Support |
765 |
|
766 |
Format:
|
|
767 |
control: Meta directory format 1
|
|
|
2230.3.13
by Aaron Bentley
Fix most info tests (but some depend on odd cloning behavior) |
768 |
branch: %s
|
|
1666.1.6
by Robert Collins
Make knit the default format. |
769 |
repository: %s
|
|
1624.3.21
by Olaf Conradi
Make bzr info command work on both local and remote locations. Support |
770 |
|
771 |
Branch history:
|
|
772 |
2 revisions
|
|
773 |
0 days old
|
|
774 |
first revision: %s
|
|
775 |
latest revision: %s
|
|
776 |
||
|
2395.1.1
by Martin Pool
rename 'revision store' to 'repository' in bzr info |
777 |
Repository:
|
|
1624.3.21
by Olaf Conradi
Make bzr info command work on both local and remote locations. Support |
778 |
2 revisions
|
|
1551.15.41
by Aaron Bentley
Make info provide more related brances, and format all branches nicely |
779 |
""" % (format.get_branch_format().get_format_description(), |
|
2204.4.13
by Aaron Bentley
Update all test cases to avoid set_default_format |
780 |
format.repository_format.get_format_description(), |
|
1666.1.6
by Robert Collins
Make knit the default format. |
781 |
datestring_first, datestring_last, |
782 |
), out) |
|
|
1624.3.21
by Olaf Conradi
Make bzr info command work on both local and remote locations. Support |
783 |
self.assertEqual('', err) |
784 |
||
785 |
# Show info about repository with revisions
|
|
|
2530.3.1
by Martin Pool
Cleanup old variations on run_bzr in the test suite |
786 |
out, err = self.run_bzr('info -v repo') |
|
1624.3.21
by Olaf Conradi
Make bzr info command work on both local and remote locations. Support |
787 |
self.assertEqualDiff( |
|
2363.5.17
by Aaron Bentley
Change separator from '/' to 'or' |
788 |
"""Shared repository (format: dirstate or dirstate-tags or knit)
|
|
2363.5.3
by Aaron Bentley
Add layout description to info output |
789 |
Location:
|
|
1551.15.41
by Aaron Bentley
Make info provide more related brances, and format all branches nicely |
790 |
shared repository: repo
|
|
1624.3.21
by Olaf Conradi
Make bzr info command work on both local and remote locations. Support |
791 |
|
792 |
Format:
|
|
793 |
control: Meta directory format 1
|
|
|
1666.1.6
by Robert Collins
Make knit the default format. |
794 |
repository: %s
|
|
1624.3.21
by Olaf Conradi
Make bzr info command work on both local and remote locations. Support |
795 |
|
|
2395.1.1
by Martin Pool
rename 'revision store' to 'repository' in bzr info |
796 |
Repository:
|
|
1624.3.21
by Olaf Conradi
Make bzr info command work on both local and remote locations. Support |
797 |
2 revisions
|
|
1551.15.41
by Aaron Bentley
Make info provide more related brances, and format all branches nicely |
798 |
""" % (format.repository_format.get_format_description(), |
|
1694.2.6
by Martin Pool
[merge] bzr.dev |
799 |
), out) |
|
1624.3.21
by Olaf Conradi
Make bzr info command work on both local and remote locations. Support |
800 |
self.assertEqual('', err) |
801 |
||
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
802 |
def test_info_shared_repository_with_trees(self): |
|
2241.1.4
by Martin Pool
Moved old weave-based repository formats into bzrlib.repofmt.weaverepo. |
803 |
format = bzrdir.format_registry.make_bzrdir('knit') |
|
1624.3.18
by Olaf Conradi
Move to using bzrlib API for blackbox test cases. |
804 |
transport = self.get_transport() |
805 |
||
|
1624.3.21
by Olaf Conradi
Make bzr info command work on both local and remote locations. Support |
806 |
# Create shared repository with working trees
|
|
2204.4.13
by Aaron Bentley
Update all test cases to avoid set_default_format |
807 |
repo = self.make_repository('repo', shared=True, format=format) |
|
1624.3.18
by Olaf Conradi
Move to using bzrlib API for blackbox test cases. |
808 |
repo.set_make_working_trees(True) |
|
2530.3.1
by Martin Pool
Cleanup old variations on run_bzr in the test suite |
809 |
out, err = self.run_bzr('info -v repo') |
|
1624.3.21
by Olaf Conradi
Make bzr info command work on both local and remote locations. Support |
810 |
self.assertEqualDiff( |
|
2363.5.17
by Aaron Bentley
Change separator from '/' to 'or' |
811 |
"""Shared repository with trees (format: dirstate or dirstate-tags or knit)
|
|
2363.5.3
by Aaron Bentley
Add layout description to info output |
812 |
Location:
|
|
1551.15.41
by Aaron Bentley
Make info provide more related brances, and format all branches nicely |
813 |
shared repository: repo
|
|
1624.3.21
by Olaf Conradi
Make bzr info command work on both local and remote locations. Support |
814 |
|
815 |
Format:
|
|
816 |
control: Meta directory format 1
|
|
|
1666.1.6
by Robert Collins
Make knit the default format. |
817 |
repository: %s
|
|
1624.3.21
by Olaf Conradi
Make bzr info command work on both local and remote locations. Support |
818 |
|
819 |
Create working tree for new branches inside the repository.
|
|
820 |
||
|
2395.1.1
by Martin Pool
rename 'revision store' to 'repository' in bzr info |
821 |
Repository:
|
|
1624.3.21
by Olaf Conradi
Make bzr info command work on both local and remote locations. Support |
822 |
0 revisions
|
|
1551.15.41
by Aaron Bentley
Make info provide more related brances, and format all branches nicely |
823 |
""" % (format.repository_format.get_format_description(), |
|
1666.1.6
by Robert Collins
Make knit the default format. |
824 |
), out) |
|
1624.3.21
by Olaf Conradi
Make bzr info command work on both local and remote locations. Support |
825 |
self.assertEqual('', err) |
826 |
||
827 |
# Create two branches
|
|
|
1624.3.18
by Olaf Conradi
Move to using bzrlib API for blackbox test cases. |
828 |
repo.bzrdir.root_transport.mkdir('branch1') |
|
6207.3.3
by jelmer at samba
Fix tests and the like. |
829 |
branch1 = controldir.ControlDir.create_branch_convenience('repo/branch1', |
|
2204.4.13
by Aaron Bentley
Update all test cases to avoid set_default_format |
830 |
format=format) |
|
1624.3.18
by Olaf Conradi
Move to using bzrlib API for blackbox test cases. |
831 |
branch2 = branch1.bzrdir.sprout('repo/branch2').open_branch() |
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
832 |
|
833 |
# Empty first branch
|
|
|
2530.3.1
by Martin Pool
Cleanup old variations on run_bzr in the test suite |
834 |
out, err = self.run_bzr('info repo/branch1 --verbose') |
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
835 |
self.assertEqualDiff( |
|
2363.5.6
by Aaron Bentley
Add short format description |
836 |
"""Repository tree (format: knit)
|
|
2363.5.3
by Aaron Bentley
Add layout description to info output |
837 |
Location:
|
|
1551.15.41
by Aaron Bentley
Make info provide more related brances, and format all branches nicely |
838 |
shared repository: repo
|
839 |
repository branch: repo/branch1
|
|
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
840 |
|
841 |
Format:
|
|
|
1624.3.19
by Olaf Conradi
New call get_format_description to give a user-friendly description of a |
842 |
control: Meta directory format 1
|
|
2255.2.201
by Robert Collins
Test_info needed updating after freezing the meaning of 'knit' format dirs. |
843 |
working tree: Working tree format 3
|
|
2230.3.13
by Aaron Bentley
Fix most info tests (but some depend on odd cloning behavior) |
844 |
branch: %s
|
|
1666.1.6
by Robert Collins
Make knit the default format. |
845 |
repository: %s
|
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
846 |
|
847 |
In the working tree:
|
|
848 |
0 unchanged
|
|
849 |
0 modified
|
|
850 |
0 added
|
|
851 |
0 removed
|
|
852 |
0 renamed
|
|
853 |
0 unknown
|
|
854 |
0 ignored
|
|
855 |
0 versioned subdirectories
|
|
856 |
||
857 |
Branch history:
|
|
858 |
0 revisions
|
|
859 |
||
|
2395.1.1
by Martin Pool
rename 'revision store' to 'repository' in bzr info |
860 |
Repository:
|
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
861 |
0 revisions
|
|
1551.15.41
by Aaron Bentley
Make info provide more related brances, and format all branches nicely |
862 |
""" % (format.get_branch_format().get_format_description(), |
|
2204.4.13
by Aaron Bentley
Update all test cases to avoid set_default_format |
863 |
format.repository_format.get_format_description(), |
|
1666.1.6
by Robert Collins
Make knit the default format. |
864 |
), out) |
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
865 |
self.assertEqual('', err) |
866 |
||
867 |
# Update first branch
|
|
|
1624.3.18
by Olaf Conradi
Move to using bzrlib API for blackbox test cases. |
868 |
self.build_tree(['repo/branch1/a']) |
869 |
tree1 = branch1.bzrdir.open_workingtree() |
|
870 |
tree1.add('a') |
|
871 |
tree1.commit('commit one') |
|
|
6165.4.1
by Jelmer Vernooij
Avoid using revision_history. |
872 |
rev = repo.get_revision(branch1.last_revision()) |
|
5010.2.2
by Vincent Ladeuil
Fix blackbox/test_infp.py imports. |
873 |
datestring_first = osutils.format_date(rev.timestamp, rev.timezone) |
|
2530.3.1
by Martin Pool
Cleanup old variations on run_bzr in the test suite |
874 |
out, err = self.run_bzr('info -v repo/branch1') |
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
875 |
self.assertEqualDiff( |
|
2363.5.6
by Aaron Bentley
Add short format description |
876 |
"""Repository tree (format: knit)
|
|
2363.5.3
by Aaron Bentley
Add layout description to info output |
877 |
Location:
|
|
1551.15.41
by Aaron Bentley
Make info provide more related brances, and format all branches nicely |
878 |
shared repository: repo
|
879 |
repository branch: repo/branch1
|
|
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
880 |
|
881 |
Format:
|
|
|
1624.3.19
by Olaf Conradi
New call get_format_description to give a user-friendly description of a |
882 |
control: Meta directory format 1
|
|
2255.2.201
by Robert Collins
Test_info needed updating after freezing the meaning of 'knit' format dirs. |
883 |
working tree: Working tree format 3
|
|
2230.3.13
by Aaron Bentley
Fix most info tests (but some depend on odd cloning behavior) |
884 |
branch: %s
|
|
1666.1.6
by Robert Collins
Make knit the default format. |
885 |
repository: %s
|
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
886 |
|
887 |
In the working tree:
|
|
888 |
1 unchanged
|
|
889 |
0 modified
|
|
890 |
0 added
|
|
891 |
0 removed
|
|
892 |
0 renamed
|
|
893 |
0 unknown
|
|
894 |
0 ignored
|
|
895 |
0 versioned subdirectories
|
|
896 |
||
897 |
Branch history:
|
|
898 |
1 revision
|
|
899 |
0 days old
|
|
900 |
first revision: %s
|
|
901 |
latest revision: %s
|
|
902 |
||
|
2395.1.1
by Martin Pool
rename 'revision store' to 'repository' in bzr info |
903 |
Repository:
|
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
904 |
1 revision
|
|
1551.15.41
by Aaron Bentley
Make info provide more related brances, and format all branches nicely |
905 |
""" % (format.get_branch_format().get_format_description(), |
|
2204.4.13
by Aaron Bentley
Update all test cases to avoid set_default_format |
906 |
format.repository_format.get_format_description(), |
|
1666.1.6
by Robert Collins
Make knit the default format. |
907 |
datestring_first, datestring_first, |
908 |
), out) |
|
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
909 |
self.assertEqual('', err) |
910 |
||
911 |
# Out of date second branch
|
|
|
2530.3.1
by Martin Pool
Cleanup old variations on run_bzr in the test suite |
912 |
out, err = self.run_bzr('info repo/branch2 --verbose') |
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
913 |
self.assertEqualDiff( |
|
2363.5.6
by Aaron Bentley
Add short format description |
914 |
"""Repository tree (format: knit)
|
|
2363.5.3
by Aaron Bentley
Add layout description to info output |
915 |
Location:
|
|
1551.15.41
by Aaron Bentley
Make info provide more related brances, and format all branches nicely |
916 |
shared repository: repo
|
917 |
repository branch: repo/branch2
|
|
|
1694.2.6
by Martin Pool
[merge] bzr.dev |
918 |
|
919 |
Related branches:
|
|
|
1551.15.41
by Aaron Bentley
Make info provide more related brances, and format all branches nicely |
920 |
parent branch: repo/branch1
|
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
921 |
|
922 |
Format:
|
|
|
1624.3.19
by Olaf Conradi
New call get_format_description to give a user-friendly description of a |
923 |
control: Meta directory format 1
|
|
2255.2.201
by Robert Collins
Test_info needed updating after freezing the meaning of 'knit' format dirs. |
924 |
working tree: Working tree format 3
|
|
2230.3.13
by Aaron Bentley
Fix most info tests (but some depend on odd cloning behavior) |
925 |
branch: %s
|
|
1666.1.6
by Robert Collins
Make knit the default format. |
926 |
repository: %s
|
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
927 |
|
928 |
In the working tree:
|
|
929 |
0 unchanged
|
|
930 |
0 modified
|
|
931 |
0 added
|
|
932 |
0 removed
|
|
933 |
0 renamed
|
|
934 |
0 unknown
|
|
935 |
0 ignored
|
|
936 |
0 versioned subdirectories
|
|
937 |
||
938 |
Branch history:
|
|
939 |
0 revisions
|
|
940 |
||
|
2395.1.1
by Martin Pool
rename 'revision store' to 'repository' in bzr info |
941 |
Repository:
|
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
942 |
1 revision
|
|
1551.15.41
by Aaron Bentley
Make info provide more related brances, and format all branches nicely |
943 |
""" % (format.get_branch_format().get_format_description(), |
|
2204.4.13
by Aaron Bentley
Update all test cases to avoid set_default_format |
944 |
format.repository_format.get_format_description(), |
|
1666.1.6
by Robert Collins
Make knit the default format. |
945 |
), out) |
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
946 |
self.assertEqual('', err) |
947 |
||
948 |
# Update second branch
|
|
|
1624.3.18
by Olaf Conradi
Move to using bzrlib API for blackbox test cases. |
949 |
tree2 = branch2.bzrdir.open_workingtree() |
950 |
tree2.pull(branch1) |
|
|
2530.3.1
by Martin Pool
Cleanup old variations on run_bzr in the test suite |
951 |
out, err = self.run_bzr('info -v repo/branch2') |
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
952 |
self.assertEqualDiff( |
|
2363.5.6
by Aaron Bentley
Add short format description |
953 |
"""Repository tree (format: knit)
|
|
2363.5.3
by Aaron Bentley
Add layout description to info output |
954 |
Location:
|
|
1551.15.41
by Aaron Bentley
Make info provide more related brances, and format all branches nicely |
955 |
shared repository: repo
|
956 |
repository branch: repo/branch2
|
|
|
1694.2.6
by Martin Pool
[merge] bzr.dev |
957 |
|
958 |
Related branches:
|
|
|
1551.15.41
by Aaron Bentley
Make info provide more related brances, and format all branches nicely |
959 |
parent branch: repo/branch1
|
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
960 |
|
961 |
Format:
|
|
|
1624.3.19
by Olaf Conradi
New call get_format_description to give a user-friendly description of a |
962 |
control: Meta directory format 1
|
|
2255.2.201
by Robert Collins
Test_info needed updating after freezing the meaning of 'knit' format dirs. |
963 |
working tree: Working tree format 3
|
|
2230.3.13
by Aaron Bentley
Fix most info tests (but some depend on odd cloning behavior) |
964 |
branch: %s
|
|
1666.1.6
by Robert Collins
Make knit the default format. |
965 |
repository: %s
|
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
966 |
|
967 |
In the working tree:
|
|
968 |
1 unchanged
|
|
969 |
0 modified
|
|
970 |
0 added
|
|
971 |
0 removed
|
|
972 |
0 renamed
|
|
973 |
0 unknown
|
|
974 |
0 ignored
|
|
975 |
0 versioned subdirectories
|
|
976 |
||
977 |
Branch history:
|
|
978 |
1 revision
|
|
979 |
0 days old
|
|
980 |
first revision: %s
|
|
981 |
latest revision: %s
|
|
982 |
||
|
2395.1.1
by Martin Pool
rename 'revision store' to 'repository' in bzr info |
983 |
Repository:
|
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
984 |
1 revision
|
|
1551.15.41
by Aaron Bentley
Make info provide more related brances, and format all branches nicely |
985 |
""" % (format.get_branch_format().get_format_description(), |
|
2204.4.13
by Aaron Bentley
Update all test cases to avoid set_default_format |
986 |
format.repository_format.get_format_description(), |
|
1666.1.6
by Robert Collins
Make knit the default format. |
987 |
datestring_first, datestring_first, |
988 |
), out) |
|
|
1624.3.10
by Olaf Conradi
Add blackbox test case for command bzr info. |
989 |
self.assertEqual('', err) |
|
1624.3.18
by Olaf Conradi
Move to using bzrlib API for blackbox test cases. |
990 |
|
|
1624.3.21
by Olaf Conradi
Make bzr info command work on both local and remote locations. Support |
991 |
# Show info about repository with revisions
|
|
2530.3.1
by Martin Pool
Cleanup old variations on run_bzr in the test suite |
992 |
out, err = self.run_bzr('info -v repo') |
|
1624.3.21
by Olaf Conradi
Make bzr info command work on both local and remote locations. Support |
993 |
self.assertEqualDiff( |
|
2363.5.17
by Aaron Bentley
Change separator from '/' to 'or' |
994 |
"""Shared repository with trees (format: dirstate or dirstate-tags or knit)
|
|
2363.5.3
by Aaron Bentley
Add layout description to info output |
995 |
Location:
|
|
1551.15.41
by Aaron Bentley
Make info provide more related brances, and format all branches nicely |
996 |
shared repository: repo
|
|
1624.3.21
by Olaf Conradi
Make bzr info command work on both local and remote locations. Support |
997 |
|
998 |
Format:
|
|
999 |
control: Meta directory format 1
|
|
|
1666.1.6
by Robert Collins
Make knit the default format. |
1000 |
repository: %s
|
|
1624.3.21
by Olaf Conradi
Make bzr info command work on both local and remote locations. Support |
1001 |
|
1002 |
Create working tree for new branches inside the repository.
|
|
1003 |
||
|
2395.1.1
by Martin Pool
rename 'revision store' to 'repository' in bzr info |
1004 |
Repository:
|
|
1624.3.21
by Olaf Conradi
Make bzr info command work on both local and remote locations. Support |
1005 |
1 revision
|
|
1551.15.41
by Aaron Bentley
Make info provide more related brances, and format all branches nicely |
1006 |
""" % (format.repository_format.get_format_description(), |
|
1666.1.6
by Robert Collins
Make knit the default format. |
1007 |
),
|
1008 |
out) |
|
|
1624.3.21
by Olaf Conradi
Make bzr info command work on both local and remote locations. Support |
1009 |
self.assertEqual('', err) |
|
3943.8.1
by Marius Kruger
remove all trailing whitespace from bzr source |
1010 |
|
|
1694.2.6
by Martin Pool
[merge] bzr.dev |
1011 |
def test_info_shared_repository_with_tree_in_root(self): |
|
2241.1.4
by Martin Pool
Moved old weave-based repository formats into bzrlib.repofmt.weaverepo. |
1012 |
format = bzrdir.format_registry.make_bzrdir('knit') |
|
1694.2.6
by Martin Pool
[merge] bzr.dev |
1013 |
transport = self.get_transport() |
1014 |
||
1015 |
# Create shared repository with working trees
|
|
|
2204.4.13
by Aaron Bentley
Update all test cases to avoid set_default_format |
1016 |
repo = self.make_repository('repo', shared=True, format=format) |
|
1694.2.6
by Martin Pool
[merge] bzr.dev |
1017 |
repo.set_make_working_trees(True) |
|
2530.3.1
by Martin Pool
Cleanup old variations on run_bzr in the test suite |
1018 |
out, err = self.run_bzr('info -v repo') |
|
1694.2.6
by Martin Pool
[merge] bzr.dev |
1019 |
self.assertEqualDiff( |
|
2363.5.17
by Aaron Bentley
Change separator from '/' to 'or' |
1020 |
"""Shared repository with trees (format: dirstate or dirstate-tags or knit)
|
|
2363.5.3
by Aaron Bentley
Add layout description to info output |
1021 |
Location:
|
|
1551.15.41
by Aaron Bentley
Make info provide more related brances, and format all branches nicely |
1022 |
shared repository: repo
|
|
1694.2.6
by Martin Pool
[merge] bzr.dev |
1023 |
|
1024 |
Format:
|
|
1025 |
control: Meta directory format 1
|
|
1026 |
repository: %s
|
|
1027 |
||
1028 |
Create working tree for new branches inside the repository.
|
|
1029 |
||
|
2395.1.1
by Martin Pool
rename 'revision store' to 'repository' in bzr info |
1030 |
Repository:
|
|
1694.2.6
by Martin Pool
[merge] bzr.dev |
1031 |
0 revisions
|
|
1551.15.41
by Aaron Bentley
Make info provide more related brances, and format all branches nicely |
1032 |
""" % (format.repository_format.get_format_description(), |
|
1694.2.6
by Martin Pool
[merge] bzr.dev |
1033 |
), out) |
1034 |
self.assertEqual('', err) |
|
1035 |
||
1036 |
# Create branch in root of repository
|
|
1037 |
control = repo.bzrdir |
|
1038 |
branch = control.create_branch() |
|
1039 |
control.create_workingtree() |
|
|
2530.3.1
by Martin Pool
Cleanup old variations on run_bzr in the test suite |
1040 |
out, err = self.run_bzr('info -v repo') |
|
1694.2.6
by Martin Pool
[merge] bzr.dev |
1041 |
self.assertEqualDiff( |
|
2363.5.6
by Aaron Bentley
Add short format description |
1042 |
"""Repository tree (format: knit)
|
|
2363.5.3
by Aaron Bentley
Add layout description to info output |
1043 |
Location:
|
|
1551.15.41
by Aaron Bentley
Make info provide more related brances, and format all branches nicely |
1044 |
shared repository: repo
|
1045 |
repository branch: repo
|
|
|
1694.2.6
by Martin Pool
[merge] bzr.dev |
1046 |
|
1047 |
Format:
|
|
1048 |
control: Meta directory format 1
|
|
|
2255.2.201
by Robert Collins
Test_info needed updating after freezing the meaning of 'knit' format dirs. |
1049 |
working tree: Working tree format 3
|
|
2230.3.13
by Aaron Bentley
Fix most info tests (but some depend on odd cloning behavior) |
1050 |
branch: %s
|
|
1694.2.6
by Martin Pool
[merge] bzr.dev |
1051 |
repository: %s
|
1052 |
||
1053 |
In the working tree:
|
|
1054 |
0 unchanged
|
|
1055 |
0 modified
|
|
1056 |
0 added
|
|
1057 |
0 removed
|
|
1058 |
0 renamed
|
|
1059 |
0 unknown
|
|
1060 |
0 ignored
|
|
1061 |
0 versioned subdirectories
|
|
1062 |
||
1063 |
Branch history:
|
|
1064 |
0 revisions
|
|
1065 |
||
|
2395.1.1
by Martin Pool
rename 'revision store' to 'repository' in bzr info |
1066 |
Repository:
|
|
1694.2.6
by Martin Pool
[merge] bzr.dev |
1067 |
0 revisions
|
|
1551.15.41
by Aaron Bentley
Make info provide more related brances, and format all branches nicely |
1068 |
""" % (format.get_branch_format().get_format_description(), |
|
2204.4.13
by Aaron Bentley
Update all test cases to avoid set_default_format |
1069 |
format.repository_format.get_format_description(), |
|
1694.2.6
by Martin Pool
[merge] bzr.dev |
1070 |
), out) |
1071 |
self.assertEqual('', err) |
|
1072 |
||
|
4307.3.2
by Jelmer Vernooij
Add tests for the repository info hook. |
1073 |
def test_info_repository_hook(self): |
1074 |
format = bzrdir.format_registry.make_bzrdir('knit') |
|
|
4307.3.3
by Jelmer Vernooij
Add repository argument to 'repository' info hook, per Roberts review. |
1075 |
def repo_info(repo, stats, outf): |
|
4307.3.2
by Jelmer Vernooij
Add tests for the repository info hook. |
1076 |
outf.write("more info\n") |
1077 |
info.hooks.install_named_hook('repository', repo_info, None) |
|
1078 |
# Create shared repository with working trees
|
|
1079 |
repo = self.make_repository('repo', shared=True, format=format) |
|
1080 |
out, err = self.run_bzr('info -v repo') |
|
1081 |
self.assertEqualDiff( |
|
1082 |
"""Shared repository with trees (format: dirstate or dirstate-tags or knit)
|
|
1083 |
Location:
|
|
1084 |
shared repository: repo
|
|
1085 |
||
1086 |
Format:
|
|
1087 |
control: Meta directory format 1
|
|
1088 |
repository: %s
|
|
1089 |
||
1090 |
Create working tree for new branches inside the repository.
|
|
1091 |
||
1092 |
Repository:
|
|
1093 |
0 revisions
|
|
1094 |
more info
|
|
1095 |
""" % (format.repository_format.get_format_description(), |
|
1096 |
), out) |
|
1097 |
self.assertEqual('', err) |
|
1098 |
||
|
3010.1.13
by Robert Collins
Use the info code functions to determine format strings in the blackbox tests, and handle repositories that do not lock like packs. |
1099 |
def assertCheckoutStatusOutput(self, |
|
1780.1.2
by Robert Collins
(robertc)Partial refactoring of info tests to be more robust to format changes. |
1100 |
command_string, lco_tree, shared_repo=None, |
1101 |
repo_branch=None, |
|
1102 |
tree_locked=False, |
|
1103 |
branch_locked=False, repo_locked=False, |
|
1104 |
verbose=False, |
|
|
2363.5.18
by Aaron Bentley
Get all tests passing |
1105 |
light_checkout=True, |
1106 |
checkout_root=None): |
|
1107 |
"""Check the output of info in a checkout. |
|
|
1780.1.2
by Robert Collins
(robertc)Partial refactoring of info tests to be more robust to format changes. |
1108 |
|
1109 |
This is not quite a mirror of the info code: rather than using the
|
|
1110 |
tree being examined to predict output, it uses a bunch of flags which
|
|
1111 |
allow us, the test writers, to document what *should* be present in
|
|
1112 |
the output. Removing this separation would remove the value of the
|
|
1113 |
tests.
|
|
|
3943.8.1
by Marius Kruger
remove all trailing whitespace from bzr source |
1114 |
|
|
1780.1.2
by Robert Collins
(robertc)Partial refactoring of info tests to be more robust to format changes. |
1115 |
:param path: the path to the light checkout.
|
1116 |
:param lco_tree: the tree object for the light checkout.
|
|
1117 |
:param shared_repo: A shared repository is in use, expect that in
|
|
1118 |
the output.
|
|
1119 |
:param repo_branch: A branch in a shared repository for non light
|
|
1120 |
checkouts.
|
|
1121 |
:param tree_locked: If true, expect the tree to be locked.
|
|
1122 |
:param branch_locked: If true, expect the branch to be locked.
|
|
1123 |
:param repo_locked: If true, expect the repository to be locked.
|
|
|
3010.1.13
by Robert Collins
Use the info code functions to determine format strings in the blackbox tests, and handle repositories that do not lock like packs. |
1124 |
Note that the lco_tree.branch.repository is inspected, and if is not
|
1125 |
actually locked then this parameter is overridden. This is because
|
|
1126 |
pack repositories do not have any public API for obtaining an
|
|
1127 |
exclusive repository wide lock.
|
|
|
4032.2.1
by Ian Clatworthy
omit branch committers from info -v (now requires -vv) |
1128 |
:param verbose: verbosity level: 2 or higher to show committers
|
|
1780.1.2
by Robert Collins
(robertc)Partial refactoring of info tests to be more robust to format changes. |
1129 |
"""
|
|
1551.15.41
by Aaron Bentley
Make info provide more related brances, and format all branches nicely |
1130 |
def friendly_location(url): |
1131 |
path = urlutils.unescape_for_display(url, 'ascii') |
|
1132 |
try: |
|
|
2804.4.3
by Alexander Belchenko
fix for test_info-tests: using osutils.getcwd instead of os.getcwd (sigh) |
1133 |
return osutils.relpath(osutils.getcwd(), path) |
|
1551.15.41
by Aaron Bentley
Make info provide more related brances, and format all branches nicely |
1134 |
except errors.PathNotChild: |
1135 |
return path |
|
1136 |
||
|
3113.5.1
by Alexander Belchenko
XFAIL test for #174055: can't run bzr info while dirstate is locked |
1137 |
if tree_locked: |
1138 |
# We expect this to fail because of locking errors.
|
|
1139 |
# (A write-locked file cannot be read-locked
|
|
1140 |
# in the different process -- either on win32 or on linux).
|
|
|
2425.3.3
by John Arbash Meinel
Update comment according to Martin |
1141 |
# This should be removed when the locking errors are fixed.
|
|
3113.5.1
by Alexander Belchenko
XFAIL test for #174055: can't run bzr info while dirstate is locked |
1142 |
self.expectFailure('OS locks are exclusive ' |
1143 |
'for different processes (Bug #174055)', |
|
1144 |
self.run_bzr_subprocess, |
|
1145 |
'info ' + command_string) |
|
|
2530.3.1
by Martin Pool
Cleanup old variations on run_bzr in the test suite |
1146 |
out, err = self.run_bzr('info %s' % command_string) |
|
2363.5.3
by Aaron Bentley
Add layout description to info output |
1147 |
description = { |
|
2363.5.4
by Aaron Bentley
Eliminate the concept of a 'repository lightweight checkout' |
1148 |
(True, True): 'Lightweight checkout', |
|
2363.5.3
by Aaron Bentley
Add layout description to info output |
1149 |
(True, False): 'Repository checkout', |
1150 |
(False, True): 'Lightweight checkout', |
|
1151 |
(False, False): 'Checkout', |
|
1152 |
}[(shared_repo is not None, light_checkout)] |
|
|
4599.3.1
by Robert Collins
Factor out some string duplication from blackbox.test_info to make changing the default format easier. |
1153 |
format = {True: self._repo_strings, |
|
4599.4.7
by Robert Collins
Update blackbox.test_info tests for 2a as default. |
1154 |
False: 'unnamed'}[light_checkout] |
|
3010.1.13
by Robert Collins
Use the info code functions to determine format strings in the blackbox tests, and handle repositories that do not lock like packs. |
1155 |
if repo_locked: |
1156 |
repo_locked = lco_tree.branch.repository.get_physical_lock_status() |
|
|
1780.1.2
by Robert Collins
(robertc)Partial refactoring of info tests to be more robust to format changes. |
1157 |
if repo_locked or branch_locked or tree_locked: |
1158 |
def locked_message(a_bool): |
|
1159 |
if a_bool: |
|
1160 |
return 'locked' |
|
1161 |
else: |
|
1162 |
return 'unlocked' |
|
1163 |
expected_lock_output = ( |
|
1164 |
"\n" |
|
1165 |
"Lock status:\n" |
|
1166 |
" working tree: %s\n" |
|
1167 |
" branch: %s\n" |
|
1168 |
" repository: %s\n" % ( |
|
1169 |
locked_message(tree_locked), |
|
1170 |
locked_message(branch_locked), |
|
1171 |
locked_message(repo_locked))) |
|
1172 |
else: |
|
1173 |
expected_lock_output = '' |
|
|
2363.5.18
by Aaron Bentley
Get all tests passing |
1174 |
tree_data = '' |
1175 |
extra_space = '' |
|
|
1780.1.2
by Robert Collins
(robertc)Partial refactoring of info tests to be more robust to format changes. |
1176 |
if light_checkout: |
|
2363.5.18
by Aaron Bentley
Get all tests passing |
1177 |
tree_data = (" light checkout root: %s\n" % |
|
1551.15.41
by Aaron Bentley
Make info provide more related brances, and format all branches nicely |
1178 |
friendly_location(lco_tree.bzrdir.root_transport.base)) |
|
2363.5.18
by Aaron Bentley
Get all tests passing |
1179 |
extra_space = ' ' |
1180 |
if lco_tree.branch.get_bound_location() is not None: |
|
1181 |
tree_data += ("%s checkout root: %s\n" % (extra_space, |
|
|
1551.15.41
by Aaron Bentley
Make info provide more related brances, and format all branches nicely |
1182 |
friendly_location(lco_tree.branch.bzrdir.root_transport.base))) |
|
1780.1.2
by Robert Collins
(robertc)Partial refactoring of info tests to be more robust to format changes. |
1183 |
if shared_repo is not None: |
1184 |
branch_data = ( |
|
|
2363.5.18
by Aaron Bentley
Get all tests passing |
1185 |
" checkout of branch: %s\n" |
1186 |
" shared repository: %s\n" % |
|
|
1551.15.41
by Aaron Bentley
Make info provide more related brances, and format all branches nicely |
1187 |
(friendly_location(repo_branch.bzrdir.root_transport.base), |
1188 |
friendly_location(shared_repo.bzrdir.root_transport.base))) |
|
|
1780.1.2
by Robert Collins
(robertc)Partial refactoring of info tests to be more robust to format changes. |
1189 |
elif repo_branch is not None: |
1190 |
branch_data = ( |
|
|
2363.5.18
by Aaron Bentley
Get all tests passing |
1191 |
"%s checkout of branch: %s\n" % |
1192 |
(extra_space, |
|
|
1551.15.41
by Aaron Bentley
Make info provide more related brances, and format all branches nicely |
1193 |
friendly_location(repo_branch.bzrdir.root_transport.base))) |
|
1780.1.2
by Robert Collins
(robertc)Partial refactoring of info tests to be more robust to format changes. |
1194 |
else: |
|
2363.5.18
by Aaron Bentley
Get all tests passing |
1195 |
branch_data = (" checkout of branch: %s\n" % |
|
1780.1.2
by Robert Collins
(robertc)Partial refactoring of info tests to be more robust to format changes. |
1196 |
lco_tree.branch.bzrdir.root_transport.base) |
|
4035.1.2
by Ian Clatworthy
clean-up trailing whitespace |
1197 |
|
|
4032.2.1
by Ian Clatworthy
omit branch committers from info -v (now requires -vv) |
1198 |
if verbose >= 2: |
|
1780.1.2
by Robert Collins
(robertc)Partial refactoring of info tests to be more robust to format changes. |
1199 |
verbose_info = ' 0 committers\n' |
1200 |
else: |
|
1201 |
verbose_info = '' |
|
|
3943.8.1
by Marius Kruger
remove all trailing whitespace from bzr source |
1202 |
|
|
1780.1.2
by Robert Collins
(robertc)Partial refactoring of info tests to be more robust to format changes. |
1203 |
self.assertEqualDiff( |
|
2363.5.6
by Aaron Bentley
Add short format description |
1204 |
"""%s (format: %s)
|
|
2363.5.3
by Aaron Bentley
Add layout description to info output |
1205 |
Location:
|
|
2363.5.18
by Aaron Bentley
Get all tests passing |
1206 |
%s%s
|
|
1780.1.2
by Robert Collins
(robertc)Partial refactoring of info tests to be more robust to format changes. |
1207 |
Format:
|
1208 |
control: Meta directory format 1
|
|
1209 |
working tree: %s
|
|
|
2230.3.13
by Aaron Bentley
Fix most info tests (but some depend on odd cloning behavior) |
1210 |
branch: %s
|
|
1780.1.2
by Robert Collins
(robertc)Partial refactoring of info tests to be more robust to format changes. |
1211 |
repository: %s
|
1212 |
%s
|
|
1213 |
In the working tree:
|
|
1214 |
0 unchanged
|
|
1215 |
0 modified
|
|
1216 |
0 added
|
|
1217 |
0 removed
|
|
1218 |
0 renamed
|
|
1219 |
0 unknown
|
|
1220 |
0 ignored
|
|
1221 |
0 versioned subdirectories
|
|
1222 |
||
1223 |
Branch history:
|
|
1224 |
0 revisions
|
|
1225 |
%s
|
|
|
2395.1.1
by Martin Pool
rename 'revision store' to 'repository' in bzr info |
1226 |
Repository:
|
|
1780.1.2
by Robert Collins
(robertc)Partial refactoring of info tests to be more robust to format changes. |
1227 |
0 revisions
|
|
2363.5.3
by Aaron Bentley
Add layout description to info output |
1228 |
""" % (description, |
|
2363.5.6
by Aaron Bentley
Add short format description |
1229 |
format, |
|
2363.5.3
by Aaron Bentley
Add layout description to info output |
1230 |
tree_data, |
|
1780.1.2
by Robert Collins
(robertc)Partial refactoring of info tests to be more robust to format changes. |
1231 |
branch_data, |
1232 |
lco_tree._format.get_format_description(), |
|
|
2230.3.13
by Aaron Bentley
Fix most info tests (but some depend on odd cloning behavior) |
1233 |
lco_tree.branch._format.get_format_description(), |
|
1780.1.2
by Robert Collins
(robertc)Partial refactoring of info tests to be more robust to format changes. |
1234 |
lco_tree.branch.repository._format.get_format_description(), |
1235 |
expected_lock_output, |
|
1236 |
verbose_info, |
|
1237 |
), out) |
|
1238 |
self.assertEqual('', err) |
|
1239 |
||
|
1694.2.6
by Martin Pool
[merge] bzr.dev |
1240 |
def test_info_locking(self): |
1241 |
transport = self.get_transport() |
|
1242 |
# Create shared repository with a branch
|
|
1243 |
repo = self.make_repository('repo', shared=True, |
|
|
3575.1.1
by Andrew Bennetts
Tidy imports in blackbox.test_info, fixing trivial test failure caused by a missing import. |
1244 |
format=bzrdir.BzrDirMetaFormat1()) |
|
1694.2.6
by Martin Pool
[merge] bzr.dev |
1245 |
repo.set_make_working_trees(False) |
1246 |
repo.bzrdir.root_transport.mkdir('branch') |
|
|
6207.3.3
by jelmer at samba
Fix tests and the like. |
1247 |
repo_branch = controldir.ControlDir.create_branch_convenience( |
1248 |
'repo/branch', format=bzrdir.BzrDirMetaFormat1()) |
|
|
1694.2.6
by Martin Pool
[merge] bzr.dev |
1249 |
# Do a heavy checkout
|
1250 |
transport.mkdir('tree') |
|
1251 |
transport.mkdir('tree/checkout') |
|
|
6207.3.8
by Jelmer Vernooij
Fix a bunch of tests. |
1252 |
co_branch = controldir.ControlDir.create_branch_convenience( |
1253 |
'tree/checkout', format=bzrdir.BzrDirMetaFormat1()) |
|
|
1694.2.6
by Martin Pool
[merge] bzr.dev |
1254 |
co_branch.bind(repo_branch) |
1255 |
# Do a light checkout of the heavy one
|
|
1256 |
transport.mkdir('tree/lightcheckout') |
|
|
3575.1.1
by Andrew Bennetts
Tidy imports in blackbox.test_info, fixing trivial test failure caused by a missing import. |
1257 |
lco_dir = bzrdir.BzrDirMetaFormat1().initialize('tree/lightcheckout') |
|
5051.3.10
by Jelmer Vernooij
Pass colocated branch name around in more places. |
1258 |
branch.BranchReferenceFormat().initialize(lco_dir, |
1259 |
target_branch=co_branch) |
|
|
1694.2.6
by Martin Pool
[merge] bzr.dev |
1260 |
lco_dir.create_workingtree() |
1261 |
lco_tree = lco_dir.open_workingtree() |
|
1262 |
||
1263 |
# Test all permutations of locking the working tree, branch and repository
|
|
1264 |
# W B R
|
|
1265 |
||
1266 |
# U U U
|
|
|
2363.5.11
by Aaron Bentley
All info tests pass |
1267 |
self.assertCheckoutStatusOutput('-v tree/lightcheckout', lco_tree, |
|
2363.5.18
by Aaron Bentley
Get all tests passing |
1268 |
repo_branch=repo_branch, |
1269 |
verbose=True, light_checkout=True) |
|
|
1694.2.6
by Martin Pool
[merge] bzr.dev |
1270 |
# U U L
|
1271 |
lco_tree.branch.repository.lock_write() |
|
|
1780.1.2
by Robert Collins
(robertc)Partial refactoring of info tests to be more robust to format changes. |
1272 |
try: |
|
2363.5.11
by Aaron Bentley
All info tests pass |
1273 |
self.assertCheckoutStatusOutput('-v tree/lightcheckout', |
|
2363.5.18
by Aaron Bentley
Get all tests passing |
1274 |
lco_tree, repo_branch=repo_branch, |
1275 |
repo_locked=True, verbose=True, light_checkout=True) |
|
|
1780.1.2
by Robert Collins
(robertc)Partial refactoring of info tests to be more robust to format changes. |
1276 |
finally: |
1277 |
lco_tree.branch.repository.unlock() |
|
|
1694.2.6
by Martin Pool
[merge] bzr.dev |
1278 |
# U L L
|
1279 |
lco_tree.branch.lock_write() |
|
|
1780.1.2
by Robert Collins
(robertc)Partial refactoring of info tests to be more robust to format changes. |
1280 |
try: |
|
2363.5.11
by Aaron Bentley
All info tests pass |
1281 |
self.assertCheckoutStatusOutput('-v tree/lightcheckout', |
|
1780.1.2
by Robert Collins
(robertc)Partial refactoring of info tests to be more robust to format changes. |
1282 |
lco_tree, |
1283 |
branch_locked=True, |
|
|
2363.5.11
by Aaron Bentley
All info tests pass |
1284 |
repo_locked=True, |
|
2363.5.18
by Aaron Bentley
Get all tests passing |
1285 |
repo_branch=repo_branch, |
|
2363.5.11
by Aaron Bentley
All info tests pass |
1286 |
verbose=True) |
|
1780.1.2
by Robert Collins
(robertc)Partial refactoring of info tests to be more robust to format changes. |
1287 |
finally: |
1288 |
lco_tree.branch.unlock() |
|
|
1694.2.6
by Martin Pool
[merge] bzr.dev |
1289 |
# L L L
|
1290 |
lco_tree.lock_write() |
|
|
1780.1.2
by Robert Collins
(robertc)Partial refactoring of info tests to be more robust to format changes. |
1291 |
try: |
|
2363.5.11
by Aaron Bentley
All info tests pass |
1292 |
self.assertCheckoutStatusOutput('-v tree/lightcheckout', |
|
2363.5.18
by Aaron Bentley
Get all tests passing |
1293 |
lco_tree, repo_branch=repo_branch, |
|
1780.1.2
by Robert Collins
(robertc)Partial refactoring of info tests to be more robust to format changes. |
1294 |
tree_locked=True, |
1295 |
branch_locked=True, |
|
|
2363.5.11
by Aaron Bentley
All info tests pass |
1296 |
repo_locked=True, |
1297 |
verbose=True) |
|
|
1780.1.2
by Robert Collins
(robertc)Partial refactoring of info tests to be more robust to format changes. |
1298 |
finally: |
1299 |
lco_tree.unlock() |
|
|
1694.2.6
by Martin Pool
[merge] bzr.dev |
1300 |
# L L U
|
1301 |
lco_tree.lock_write() |
|
1302 |
lco_tree.branch.repository.unlock() |
|
|
1780.1.2
by Robert Collins
(robertc)Partial refactoring of info tests to be more robust to format changes. |
1303 |
try: |
|
2363.5.11
by Aaron Bentley
All info tests pass |
1304 |
self.assertCheckoutStatusOutput('-v tree/lightcheckout', |
|
2363.5.18
by Aaron Bentley
Get all tests passing |
1305 |
lco_tree, repo_branch=repo_branch, |
|
1780.1.2
by Robert Collins
(robertc)Partial refactoring of info tests to be more robust to format changes. |
1306 |
tree_locked=True, |
|
2363.5.11
by Aaron Bentley
All info tests pass |
1307 |
branch_locked=True, |
1308 |
verbose=True) |
|
|
1780.1.2
by Robert Collins
(robertc)Partial refactoring of info tests to be more robust to format changes. |
1309 |
finally: |
1310 |
lco_tree.branch.repository.lock_write() |
|
1311 |
lco_tree.unlock() |
|
|
1694.2.6
by Martin Pool
[merge] bzr.dev |
1312 |
# L U U
|
1313 |
lco_tree.lock_write() |
|
1314 |
lco_tree.branch.unlock() |
|
|
1780.1.2
by Robert Collins
(robertc)Partial refactoring of info tests to be more robust to format changes. |
1315 |
try: |
|
2363.5.11
by Aaron Bentley
All info tests pass |
1316 |
self.assertCheckoutStatusOutput('-v tree/lightcheckout', |
|
2363.5.18
by Aaron Bentley
Get all tests passing |
1317 |
lco_tree, repo_branch=repo_branch, |
|
2363.5.11
by Aaron Bentley
All info tests pass |
1318 |
tree_locked=True, |
1319 |
verbose=True) |
|
|
1780.1.2
by Robert Collins
(robertc)Partial refactoring of info tests to be more robust to format changes. |
1320 |
finally: |
1321 |
lco_tree.branch.lock_write() |
|
1322 |
lco_tree.unlock() |
|
|
1694.2.6
by Martin Pool
[merge] bzr.dev |
1323 |
# L U L
|
1324 |
lco_tree.lock_write() |
|
1325 |
lco_tree.branch.unlock() |
|
1326 |
lco_tree.branch.repository.lock_write() |
|
|
1780.1.2
by Robert Collins
(robertc)Partial refactoring of info tests to be more robust to format changes. |
1327 |
try: |
|
2363.5.11
by Aaron Bentley
All info tests pass |
1328 |
self.assertCheckoutStatusOutput('-v tree/lightcheckout', |
|
2363.5.18
by Aaron Bentley
Get all tests passing |
1329 |
lco_tree, repo_branch=repo_branch, |
|
1780.1.2
by Robert Collins
(robertc)Partial refactoring of info tests to be more robust to format changes. |
1330 |
tree_locked=True, |
|
2363.5.11
by Aaron Bentley
All info tests pass |
1331 |
repo_locked=True, |
1332 |
verbose=True) |
|
|
1780.1.2
by Robert Collins
(robertc)Partial refactoring of info tests to be more robust to format changes. |
1333 |
finally: |
1334 |
lco_tree.branch.repository.unlock() |
|
1335 |
lco_tree.branch.lock_write() |
|
1336 |
lco_tree.unlock() |
|
|
1694.2.6
by Martin Pool
[merge] bzr.dev |
1337 |
# U L U
|
1338 |
lco_tree.branch.lock_write() |
|
1339 |
lco_tree.branch.repository.unlock() |
|
|
1780.1.2
by Robert Collins
(robertc)Partial refactoring of info tests to be more robust to format changes. |
1340 |
try: |
|
2363.5.11
by Aaron Bentley
All info tests pass |
1341 |
self.assertCheckoutStatusOutput('-v tree/lightcheckout', |
|
2363.5.18
by Aaron Bentley
Get all tests passing |
1342 |
lco_tree, repo_branch=repo_branch, |
|
2363.5.11
by Aaron Bentley
All info tests pass |
1343 |
branch_locked=True, |
1344 |
verbose=True) |
|
|
1780.1.2
by Robert Collins
(robertc)Partial refactoring of info tests to be more robust to format changes. |
1345 |
finally: |
1346 |
lco_tree.branch.repository.lock_write() |
|
1347 |
lco_tree.branch.unlock() |
|
|
1694.2.6
by Martin Pool
[merge] bzr.dev |
1348 |
|
|
2425.3.2
by John Arbash Meinel
Make "test_info_locking" an expected failure on win32 for now. |
1349 |
if sys.platform == 'win32': |
1350 |
self.knownFailure('Win32 cannot run "bzr info"' |
|
1351 |
' when the tree is locked.') |
|
1352 |
||
|
3221.21.3
by Ian Clatworthy
shallow -> stacked |
1353 |
def test_info_stacked(self): |
|
3221.11.21
by Robert Collins
Have info report on stacked branches. |
1354 |
# We have a mainline
|
1355 |
trunk_tree = self.make_branch_and_tree('mainline', |
|
|
3735.1.2
by Robert Collins
Remove 1.5 series dev formats and document development2 a little better. |
1356 |
format='1.6') |
|
3221.11.21
by Robert Collins
Have info report on stacked branches. |
1357 |
trunk_tree.commit('mainline') |
|
3221.21.3
by Ian Clatworthy
shallow -> stacked |
1358 |
# and a branch from it which is stacked
|
1359 |
new_dir = trunk_tree.bzrdir.sprout('newbranch', stacked=True) |
|
|
3221.11.21
by Robert Collins
Have info report on stacked branches. |
1360 |
out, err = self.run_bzr('info newbranch') |
1361 |
self.assertEqual( |
|
|
3735.1.2
by Robert Collins
Remove 1.5 series dev formats and document development2 a little better. |
1362 |
"""Standalone tree (format: 1.6)
|
|
3221.11.21
by Robert Collins
Have info report on stacked branches. |
1363 |
Location:
|
1364 |
branch root: newbranch
|
|
1365 |
||
1366 |
Related branches:
|
|
1367 |
parent branch: mainline
|
|
1368 |
stacked on: mainline
|
|
1369 |
""", out) |
|
1370 |
self.assertEqual("", err) |
|
|
6181.1.1
by Jelmer Vernooij
If the branch doesn't support last_revision_info, don't display |
1371 |
|
1372 |
def test_info_revinfo_optional(self): |
|
1373 |
tree = self.make_branch_and_tree('.') |
|
1374 |
def last_revision_info(self): |
|
1375 |
raise errors.UnsupportedOperation(last_revision_info, self) |
|
1376 |
self.overrideAttr( |
|
1377 |
branch.Branch, "last_revision_info", last_revision_info) |
|
1378 |
out, err = self.run_bzr('info -v .') |
|
1379 |
self.assertEqual( |
|
1380 |
"""Standalone tree (format: 2a)
|
|
1381 |
Location:
|
|
1382 |
branch root: .
|
|
1383 |
||
1384 |
Format:
|
|
1385 |
control: Meta directory format 1
|
|
1386 |
working tree: Working tree format 6
|
|
1387 |
branch: Branch format 7
|
|
1388 |
repository: Repository format 2a - rich roots, group compression and chk inventories
|
|
1389 |
||
1390 |
In the working tree:
|
|
1391 |
0 unchanged
|
|
1392 |
0 modified
|
|
1393 |
0 added
|
|
1394 |
0 removed
|
|
1395 |
0 renamed
|
|
1396 |
0 unknown
|
|
1397 |
0 ignored
|
|
1398 |
0 versioned subdirectories
|
|
1399 |
""", out) |
|
1400 |
self.assertEqual("", err) |
|
|
6240.1.1
by Jelmer Vernooij
Show the number of colocated branches in 'bzr info -v'. |
1401 |
|
1402 |
def test_info_shows_colocated_branches(self): |
|
1403 |
bzrdir = self.make_branch('.', format='development-colo').bzrdir |
|
1404 |
bzrdir.create_branch(name="colo1") |
|
1405 |
bzrdir.create_branch(name="colo2") |
|
1406 |
bzrdir.create_branch(name="colo3") |
|
1407 |
out, err = self.run_bzr('info -v .') |
|
1408 |
self.assertEqualDiff( |
|
1409 |
"""Standalone branch (format: development-colo)
|
|
1410 |
Location:
|
|
1411 |
branch root: .
|
|
1412 |
||
1413 |
Format:
|
|
1414 |
control: Meta directory format 1 with support for colocated branches
|
|
1415 |
branch: Branch format 7
|
|
1416 |
repository: Repository format 2a - rich roots, group compression and chk inventories
|
|
1417 |
||
1418 |
Control directory:
|
|
1419 |
4 branches
|
|
1420 |
||
1421 |
Branch history:
|
|
1422 |
0 revisions
|
|
1423 |
||
1424 |
Repository:
|
|
1425 |
0 revisions
|
|
1426 |
""", out) |
|
1427 |
self.assertEqual("", err) |
|
|
6283.1.3
by Jelmer Vernooij
Add hpss call count test for 'bzr info' and 'bzr info -v'. |
1428 |
|
1429 |
||
1430 |
class TestSmartServerInfo(tests.TestCaseWithTransport): |
|
1431 |
||
1432 |
def test_simple_branch_info(self): |
|
1433 |
self.setup_smart_server_with_call_log() |
|
1434 |
t = self.make_branch_and_tree('branch') |
|
1435 |
self.build_tree_contents([('branch/foo', 'thecontents')]) |
|
1436 |
t.add("foo") |
|
1437 |
t.commit("message") |
|
1438 |
self.reset_smart_call_log() |
|
1439 |
out, err = self.run_bzr(['info', self.get_url('branch')]) |
|
1440 |
# This figure represent the amount of work to perform this use case. It
|
|
1441 |
# is entirely ok to reduce this number if a test fails due to rpc_count
|
|
1442 |
# being too low. If rpc_count increases, more network roundtrips have
|
|
1443 |
# become necessary for this use case. Please do not adjust this number
|
|
1444 |
# upwards without agreement from bzr's network support maintainers.
|
|
1445 |
self.assertLength(12, self.hpss_calls) |
|
1446 |
||
1447 |
def test_verbose_branch_info(self): |
|
1448 |
self.setup_smart_server_with_call_log() |
|
1449 |
t = self.make_branch_and_tree('branch') |
|
1450 |
self.build_tree_contents([('branch/foo', 'thecontents')]) |
|
1451 |
t.add("foo") |
|
1452 |
t.commit("message") |
|
1453 |
self.reset_smart_call_log() |
|
1454 |
out, err = self.run_bzr(['info', '-v', self.get_url('branch')]) |
|
1455 |
# This figure represent the amount of work to perform this use case. It
|
|
1456 |
# is entirely ok to reduce this number if a test fails due to rpc_count
|
|
1457 |
# being too low. If rpc_count increases, more network roundtrips have
|
|
1458 |
# become necessary for this use case. Please do not adjust this number
|
|
1459 |
# upwards without agreement from bzr's network support maintainers.
|
|
|
6280.6.5
by Jelmer Vernooij
Merge bzr.dev, fix HPSS call count. |
1460 |
self.assertLength(16, self.hpss_calls) |