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