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