49
49
transport = self.get_transport()
51
51
# Create initial standalone branch
52
tree1 = self.make_branch_and_tree('standalone', 'knit')
52
tree1 = self.make_branch_and_tree('standalone', 'weave')
53
53
self.build_tree(['standalone/a'])
55
55
branch1 = tree1.branch
57
57
out, err = self.run_bzr('info standalone')
58
58
self.assertEqualDiff(
59
"""Standalone tree (format: knit)
59
"""Standalone tree (format: weave)
61
61
branch root: standalone
65
65
# Standalone branch - verbose mode
66
66
out, err = self.run_bzr('info standalone -v')
67
67
self.assertEqualDiff(
68
"""Standalone tree (format: knit)
68
"""Standalone tree (format: weave)
70
70
branch root: standalone
73
control: Meta directory format 1
74
working tree: Working tree format 3
75
branch: Branch format 5
76
repository: Knit repository format 1
73
control: All-in-one format 6
74
working tree: Working tree format 2
75
branch: Branch format 4
76
repository: Weave repository format 6
78
78
In the working tree:
96
96
# Standalone branch - really verbose mode
97
97
out, err = self.run_bzr('info standalone -vv')
98
98
self.assertEqualDiff(
99
"""Standalone tree (format: knit)
99
"""Standalone tree (format: weave)
101
101
branch root: standalone
104
control: Meta directory format 1
105
working tree: Working tree format 3
106
branch: Branch format 5
107
repository: Knit repository format 1
104
control: All-in-one format 6
105
working tree: Working tree format 2
106
branch: Branch format 4
107
repository: Weave repository format 6
109
109
In the working tree:
155
155
parent branch: standalone
158
control: Meta directory format 1
159
working tree: Working tree format 3
160
branch: Branch format 5
161
repository: Knit repository format 1
158
control: All-in-one format 6
159
working tree: Working tree format 2
160
branch: Branch format 4
161
repository: Weave repository format 6
163
163
In the working tree:
276
276
tree5 = branch1.create_checkout('lightcheckout', lightweight=True)
277
277
branch5 = tree5.branch
278
278
out, err = self.run_bzr('info -v lightcheckout')
279
if "metaweave" in bzrdir.format_registry:
280
format_description = "knit or metaweave"
282
format_description = "knit"
283
279
self.assertEqualDiff(
284
280
"""Lightweight checkout (format: %s)
290
286
control: Meta directory format 1
291
working tree: Working tree format 3
292
branch: Branch format 5
293
repository: Knit repository format 1
287
working tree: Working tree format 6
288
branch: Branch format 4
289
repository: Weave repository format 6
295
291
In the working tree:
313
""" % (format_description, datestring_first, datestring_first,), out)
309
""" % (self._repo_strings, datestring_first, datestring_first,), out)
314
310
self.assertEqual('', err)
316
312
# Update initial standalone branch
323
319
# Out of date branched standalone branch will not be detected
324
320
out, err = self.run_bzr('info -v branch')
325
321
self.assertEqualDiff(
326
"""Standalone tree (format: knit)
322
"""Standalone tree (format: weave)
328
324
branch root: branch
332
328
parent branch: standalone
335
control: Meta directory format 1
336
working tree: Working tree format 3
337
branch: Branch format 5
338
repository: Knit repository format 1
331
control: All-in-one format 6
332
working tree: Working tree format 2
333
branch: Branch format 4
334
repository: Weave repository format 6
340
336
In the working tree:
452
448
control: Meta directory format 1
453
working tree: Working tree format 3
454
branch: Branch format 5
455
repository: Knit repository format 1
449
working tree: Working tree format 6
450
branch: Branch format 4
451
repository: Weave repository format 6
457
453
Working tree is out of date: missing 1 revision.
477
""" % (format_description, datestring_first, datestring_last,), out)
473
""" % (self._repo_strings, datestring_first, datestring_last,), out)
478
474
self.assertEqual('', err)
480
476
def test_info_standalone_no_tree(self):
1327
1323
self.knownFailure('Win32 cannot run "bzr info"'
1328
1324
' when the tree is locked.')
1326
def test_info_locking_oslocks(self):
1327
if sys.platform == "win32":
1328
self.skip("don't use oslocks on win32 in unix manner")
1329
# This test tests old (all-in-one, OS lock using) behaviour which
1330
# simply cannot work on windows (and is indeed why we changed our
1331
# design. As such, don't try to remove the thisFailsStrictLockCheck
1333
self.thisFailsStrictLockCheck()
1335
tree = self.make_branch_and_tree('branch',
1336
format=bzrdir.BzrDirFormat6())
1338
# Test all permutations of locking the working tree, branch and repository
1339
# XXX: Well not yet, as we can't query oslocks yet. Currently, it's
1340
# implemented by raising NotImplementedError and get_physical_lock_status()
1341
# always returns false. This makes bzr info hide the lock status. (Olaf)
1345
out, err = self.run_bzr('info -v branch')
1346
self.assertEqualDiff(
1347
"""Standalone tree (format: weave)
1352
control: All-in-one format 6
1353
working tree: Working tree format 2
1354
branch: Branch format 4
1357
In the working tree:
1365
0 versioned subdirectories
1372
""" % ('branch', tree.branch.repository._format.get_format_description(),
1374
self.assertEqual('', err)
1377
out, err = self.run_bzr('info -v branch')
1378
self.assertEqualDiff(
1379
"""Standalone tree (format: weave)
1384
control: All-in-one format 6
1385
working tree: Working tree format 2
1386
branch: Branch format 4
1389
In the working tree:
1397
0 versioned subdirectories
1404
""" % ('branch', tree.branch.repository._format.get_format_description(),
1406
self.assertEqual('', err)
1330
1409
def test_info_stacked(self):
1331
1410
# We have a mainline
1332
1411
trunk_tree = self.make_branch_and_tree('mainline',