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