36
41
location = "C:/i/do/not/exist/"
38
43
location = "/i/do/not/exist/"
39
out, err = self.runbzr('info '+location, retcode=3)
44
out, err = self.run_bzr('info '+location, retcode=3)
40
45
self.assertEqual(out, '')
41
self.assertEqual(err, 'bzr: ERROR: Not a branch: %s\n' % location)
46
self.assertEqual(err, 'bzr: ERROR: Not a branch: "%s".\n' % location)
43
48
def test_info_standalone(self):
44
49
transport = self.get_transport()
48
53
self.build_tree(['standalone/a'])
50
55
branch1 = tree1.branch
51
out, err = self.runbzr('info standalone')
57
out, err = self.run_bzr('info standalone')
59
"""Standalone tree (format: weave)
61
branch root: standalone
63
self.assertEqual('', err)
65
out, err = self.run_bzr('info standalone -v')
67
"""Standalone tree (format: weave)
69
branch root: standalone
57
72
control: All-in-one format 6
84
100
# Branch standalone with push location
85
101
branch2 = branch1.bzrdir.sprout('branch').open_branch()
86
102
branch2.set_push_location(branch1.bzrdir.root_transport.base)
87
out, err = self.runbzr('info branch --verbose')
104
out, err = self.run_bzr('info branch')
105
self.assertEqualDiff(
106
"""Standalone tree (format: weave)
111
push branch: standalone
112
parent branch: standalone
114
self.assertEqual('', err)
116
out, err = self.run_bzr('info branch --verbose')
117
self.assertEqualDiff(
118
"""Standalone tree (format: weave)
123
push branch: standalone
124
parent branch: standalone
97
127
control: All-in-one format 6
122
""" % (branch2.bzrdir.root_transport.base,
123
branch1.bzrdir.root_transport.base,
124
branch1.bzrdir.root_transport.base,
125
datestring_first, datestring_first,
152
""" % (datestring_first, datestring_first,
126
153
# poking at _revision_store isn't all that clean, but neither is
127
154
# having the ui test dependent on the exact overhead of a given store.
128
155
branch2.repository._revision_store.total_size(
138
165
branch3 = bzrlib.bzrdir.BzrDir.open('bound').open_branch()
139
166
branch3.bind(branch1)
140
167
bound_tree = branch3.bzrdir.open_workingtree()
141
out, err = self.runbzr('info bound')
168
out, err = self.run_bzr('info -v bound')
142
169
self.assertEqualDiff(
145
checkout of branch: %s
170
"""Checkout (format: knit)
173
checkout of branch: standalone
147
175
Related branches:
176
parent branch: standalone
151
179
control: Meta directory format 1
175
""" % (branch3.bzrdir.root_transport.base,
176
branch1.bzrdir.root_transport.base,
177
branch1.bzrdir.root_transport.base,
178
bound_tree._format.get_format_description(),
204
""" % (bound_tree._format.get_format_description(),
179
205
branch3._format.get_format_description(),
180
206
branch3.repository._format.get_format_description(),
181
207
datestring_first, datestring_first,
191
217
format=knit1_format)
192
218
branch4.bind(branch1)
193
219
branch4.bzrdir.open_workingtree().update()
194
out, err = self.runbzr('info checkout --verbose')
220
out, err = self.run_bzr('info checkout --verbose')
195
221
self.assertEqualDiff(
198
checkout of branch: %s
222
"""Checkout (format: knit)
224
checkout root: checkout
225
checkout of branch: standalone
201
228
control: Meta directory format 1
226
""" % (branch4.bzrdir.root_transport.base,
227
branch1.bzrdir.root_transport.base,
228
branch4.repository._format.get_format_description(),
253
""" % (branch4.repository._format.get_format_description(),
229
254
datestring_first, datestring_first,
230
255
# poking at _revision_store isn't all that clean, but neither is
231
256
# having the ui test dependent on the exact overhead of a given store.
237
262
# Lightweight checkout (same as above, different branch and repository)
238
263
tree5 = branch1.create_checkout('lightcheckout', lightweight=True)
239
264
branch5 = tree5.branch
240
out, err = self.runbzr('info lightcheckout')
265
out, err = self.run_bzr('info -v lightcheckout')
241
266
self.assertEqualDiff(
243
light checkout root: %s
244
checkout of branch: %s
267
"""Lightweight checkout (format: dirstate or dirstate-tags or \
268
pack-0.92 or rich-root or rich-root-pack)
270
light checkout root: lightcheckout
271
checkout of branch: standalone
247
274
control: Meta directory format 1
271
""" % (tree5.bzrdir.root_transport.base,
272
branch1.bzrdir.root_transport.base,
273
datestring_first, datestring_first,
299
""" % (datestring_first, datestring_first,), out)
275
300
self.assertEqual('', err)
277
302
# Update initial standalone branch
282
307
datestring_last = format_date(rev.timestamp, rev.timezone)
284
309
# Out of date branched standalone branch will not be detected
285
out, err = self.runbzr('info branch')
310
out, err = self.run_bzr('info -v branch')
286
311
self.assertEqualDiff(
312
"""Standalone tree (format: weave)
290
316
Related branches:
292
publish to branch: %s
317
push branch: standalone
318
parent branch: standalone
295
321
control: All-in-one format 6
319
""" % (branch2.bzrdir.root_transport.base,
320
branch1.bzrdir.root_transport.base,
321
branch1.bzrdir.root_transport.base,
322
datestring_first, datestring_first,
346
""" % (datestring_first, datestring_first,
324
348
self.assertEqual('', err)
326
350
# Out of date bound branch
327
out, err = self.runbzr('info bound')
351
out, err = self.run_bzr('info -v bound')
328
352
self.assertEqualDiff(
331
checkout of branch: %s
353
"""Checkout (format: knit)
356
checkout of branch: standalone
333
358
Related branches:
359
parent branch: standalone
337
362
control: Meta directory format 1
363
""" % (branch3.bzrdir.root_transport.base,
364
branch1.bzrdir.root_transport.base,
365
branch1.bzrdir.root_transport.base,
366
branch3.repository._format.get_format_description(),
389
""" % (branch3.repository._format.get_format_description(),
367
390
datestring_first, datestring_first,
368
391
# poking at _revision_store isn't all that clean, but neither is
369
392
# having the ui test dependent on the exact overhead of a given store.
373
396
self.assertEqual('', err)
375
398
# Out of date checkout
376
out, err = self.runbzr('info checkout')
399
out, err = self.run_bzr('info -v checkout')
377
400
self.assertEqualDiff(
380
checkout of branch: %s
401
"""Checkout (format: knit)
403
checkout root: checkout
404
checkout of branch: standalone
383
407
control: Meta directory format 1
409
""" % (branch4.bzrdir.root_transport.base,
410
branch1.bzrdir.root_transport.base,
411
branch4.repository._format.get_format_description(),
434
""" % (branch4.repository._format.get_format_description(),
412
435
datestring_first, datestring_first,
413
436
# poking at _revision_store isn't all that clean, but neither is
414
437
# having the ui test dependent on the exact overhead of a given store.
418
441
self.assertEqual('', err)
420
443
# Out of date lightweight checkout
421
out, err = self.runbzr('info lightcheckout --verbose')
444
out, err = self.run_bzr('info lightcheckout --verbose')
422
445
self.assertEqualDiff(
424
light checkout root: %s
425
checkout of branch: %s
446
"""Lightweight checkout (format: dirstate or dirstate-tags or \
447
pack-0.92 or rich-root or rich-root-pack)
449
light checkout root: lightcheckout
450
checkout of branch: standalone
428
453
control: Meta directory format 1
455
""" % (tree5.bzrdir.root_transport.base,
456
branch1.bzrdir.root_transport.base,
457
datestring_first, datestring_last,
480
""" % (datestring_first, datestring_last,), out)
459
481
self.assertEqual('', err)
461
483
def test_info_standalone_no_tree(self):
463
485
format = bzrdir.format_registry.make_bzrdir('default')
464
486
branch = self.make_branch('branch')
465
487
repo = branch.repository
466
out, err = self.runbzr('info branch')
488
out, err = self.run_bzr('info branch -v')
467
489
self.assertEqualDiff(
490
"""Standalone branch (format: %s)
472
495
control: Meta directory format 1
482
""" % (branch.bzrdir.root_transport.base,
506
""" % (info.describe_format(repo.bzrdir, repo, branch, None),
483
507
format.get_branch_format().get_format_description(),
484
508
format.repository_format.get_format_description(),
492
516
# Create shared repository
493
517
repo = self.make_repository('repo', shared=True, format=format)
494
518
repo.set_make_working_trees(False)
495
out, err = self.runbzr('info repo')
519
out, err = self.run_bzr('info -v repo')
496
520
self.assertEqualDiff(
521
"""Shared repository (format: dirstate or dirstate-tags or knit)
498
523
shared repository: %s
507
""" % (repo.bzrdir.root_transport.base,
508
format.repository_format.get_format_description(),
532
""" % ('repo', format.repository_format.get_format_description(),
510
534
self.assertEqual('', err)
513
537
repo.bzrdir.root_transport.mkdir('branch')
514
538
branch1 = repo.bzrdir.create_branch_convenience('repo/branch',
516
out, err = self.runbzr('info repo/branch')
540
out, err = self.run_bzr('info -v repo/branch')
517
541
self.assertEqualDiff(
519
shared repository: %s
520
repository branch: branch
542
"""Repository branch (format: dirstate or knit)
544
shared repository: repo
545
repository branch: repo/branch
523
548
control: Meta directory format 1
533
""" % (repo.bzrdir.root_transport.base,
534
format.get_branch_format().get_format_description(),
559
""" % (format.get_branch_format().get_format_description(),
535
560
format.repository_format.get_format_description(),
537
562
self.assertEqual('', err)
542
567
tree2 = branch1.create_checkout('tree/lightcheckout',
543
568
lightweight=True)
544
569
branch2 = tree2.branch
545
self.assertCheckoutStatusOutput('tree/lightcheckout', tree2,
570
self.assertCheckoutStatusOutput('-v tree/lightcheckout', tree2,
571
shared_repo=repo, repo_branch=branch1, verbose=True)
548
573
# Create normal checkout
549
574
tree3 = branch1.create_checkout('tree/checkout')
556
581
tree2.commit('commit one')
557
582
rev = repo.get_revision(branch2.revision_history()[0])
558
583
datestring_first = format_date(rev.timestamp, rev.timezone)
559
out, err = self.runbzr('info tree/lightcheckout --verbose')
584
out, err = self.run_bzr('info tree/lightcheckout --verbose')
560
585
self.assertEqualDiff(
562
light checkout root: %s
563
shared repository: %s
564
repository branch: branch
586
"""Lightweight checkout (format: dirstate or dirstate-tags or \
587
pack-0.92 or rich-root or rich-root-pack)
589
light checkout root: tree/lightcheckout
590
checkout of branch: repo/branch
591
shared repository: repo
567
594
control: Meta directory format 1
592
""" % (tree2.bzrdir.root_transport.base,
593
repo.bzrdir.root_transport.base,
594
format.get_branch_format().get_format_description(),
619
""" % (format.get_branch_format().get_format_description(),
595
620
format.repository_format.get_format_description(),
596
621
datestring_first, datestring_first,
597
622
# poking at _revision_store isn't all that clean, but neither is
601
626
self.assertEqual('', err)
603
628
# Out of date checkout
604
out, err = self.runbzr('info tree/checkout')
629
out, err = self.run_bzr('info -v tree/checkout')
605
630
self.assertEqualDiff(
608
checkout of branch: %s
631
"""Checkout (format: dirstate)
633
checkout root: tree/checkout
634
checkout of branch: repo/branch
611
637
control: Meta directory format 1
634
""" % (tree3.bzrdir.root_transport.base,
635
branch1.bzrdir.root_transport.base,
636
format.get_branch_format().get_format_description(),
661
""" % (format.get_branch_format().get_format_description(),
637
662
format.repository_format.get_format_description(),
639
664
self.assertEqual('', err)
643
668
self.build_tree(['tree/checkout/b'])
645
out, err = self.runbzr('info tree/checkout --verbose')
670
out, err = self.run_bzr('info tree/checkout --verbose')
646
671
self.assertEqualDiff(
649
checkout of branch: %s
672
"""Checkout (format: dirstate)
674
checkout root: tree/checkout
675
checkout of branch: repo/branch
652
678
control: Meta directory format 1
677
""" % (tree3.bzrdir.root_transport.base, branch1.bzrdir.root_transport.base,
678
format.get_branch_format().get_format_description(),
703
""" % (format.get_branch_format().get_format_description(),
679
704
format.repository_format.get_format_description(),
680
705
datestring_first, datestring_first,
681
706
# poking at _revision_store isn't all that clean, but neither is
688
713
# Out of date lightweight checkout
689
714
rev = repo.get_revision(branch1.revision_history()[-1])
690
715
datestring_last = format_date(rev.timestamp, rev.timezone)
691
out, err = self.runbzr('info tree/lightcheckout --verbose')
716
out, err = self.run_bzr('info tree/lightcheckout --verbose')
692
717
self.assertEqualDiff(
694
light checkout root: %s
695
shared repository: %s
696
repository branch: branch
718
"""Lightweight checkout (format: dirstate or dirstate-tags or \
719
pack-0.92 or rich-root or rich-root-pack)
721
light checkout root: tree/lightcheckout
722
checkout of branch: repo/branch
723
shared repository: repo
699
726
control: Meta directory format 1
726
""" % (tree2.bzrdir.root_transport.base,
727
repo.bzrdir.root_transport.base,
728
format.get_branch_format().get_format_description(),
753
""" % (format.get_branch_format().get_format_description(),
729
754
format.repository_format.get_format_description(),
730
755
datestring_first, datestring_last,
731
756
# poking at _revision_store isn't all that clean, but neither is
735
760
self.assertEqual('', err)
737
762
# Show info about shared branch
738
out, err = self.runbzr('info repo/branch --verbose')
763
out, err = self.run_bzr('info repo/branch --verbose')
739
764
self.assertEqualDiff(
741
shared repository: %s
742
repository branch: branch
765
"""Repository branch (format: dirstate or knit)
767
shared repository: repo
768
repository branch: repo/branch
745
771
control: Meta directory format 1
759
""" % (repo.bzrdir.root_transport.base,
760
format.get_branch_format().get_format_description(),
785
""" % (format.get_branch_format().get_format_description(),
761
786
format.repository_format.get_format_description(),
762
787
datestring_first, datestring_last,
763
788
# poking at _revision_store isn't all that clean, but neither is
767
792
self.assertEqual('', err)
769
794
# Show info about repository with revisions
770
out, err = self.runbzr('info repo')
795
out, err = self.run_bzr('info -v repo')
771
796
self.assertEqualDiff(
773
shared repository: %s
797
"""Shared repository (format: dirstate or dirstate-tags or knit)
799
shared repository: repo
776
802
control: Meta directory format 1
782
""" % (repo.bzrdir.root_transport.base,
783
format.repository_format.get_format_description(),
808
""" % (format.repository_format.get_format_description(),
784
809
# poking at _revision_store isn't all that clean, but neither is
785
810
# having the ui test dependent on the exact overhead of a given store.
786
811
repo._revision_store.total_size(repo.get_transaction())[1] / 1024,
794
819
# Create shared repository with working trees
795
820
repo = self.make_repository('repo', shared=True, format=format)
796
821
repo.set_make_working_trees(True)
797
out, err = self.runbzr('info repo')
822
out, err = self.run_bzr('info -v repo')
798
823
self.assertEqualDiff(
800
shared repository: %s
824
"""Shared repository with trees (format: dirstate or dirstate-tags or knit)
826
shared repository: repo
803
829
control: Meta directory format 1
820
845
branch2 = branch1.bzrdir.sprout('repo/branch2').open_branch()
822
847
# Empty first branch
823
out, err = self.runbzr('info repo/branch1 --verbose')
848
out, err = self.run_bzr('info repo/branch1 --verbose')
824
849
self.assertEqualDiff(
826
shared repository: %s
827
repository checkout: branch1
850
"""Repository tree (format: knit)
852
shared repository: repo
853
repository branch: repo/branch1
830
856
control: Meta directory format 1
852
""" % (repo.bzrdir.root_transport.base,
853
format.get_branch_format().get_format_description(),
878
""" % (format.get_branch_format().get_format_description(),
854
879
format.repository_format.get_format_description(),
856
881
self.assertEqual('', err)
862
887
tree1.commit('commit one')
863
888
rev = repo.get_revision(branch1.revision_history()[0])
864
889
datestring_first = format_date(rev.timestamp, rev.timezone)
865
out, err = self.runbzr('info repo/branch1')
890
out, err = self.run_bzr('info -v repo/branch1')
866
891
self.assertEqualDiff(
868
shared repository: %s
869
repository checkout: branch1
892
"""Repository tree (format: knit)
894
shared repository: repo
895
repository branch: repo/branch1
872
898
control: Meta directory format 1
896
""" % (repo.bzrdir.root_transport.base,
897
format.get_branch_format().get_format_description(),
923
""" % (format.get_branch_format().get_format_description(),
898
924
format.repository_format.get_format_description(),
899
925
datestring_first, datestring_first,
900
926
# poking at _revision_store isn't all that clean, but neither is
904
930
self.assertEqual('', err)
906
932
# Out of date second branch
907
out, err = self.runbzr('info repo/branch2 --verbose')
933
out, err = self.run_bzr('info repo/branch2 --verbose')
908
934
self.assertEqualDiff(
910
shared repository: %s
911
repository checkout: branch2
935
"""Repository tree (format: knit)
937
shared repository: repo
938
repository branch: repo/branch2
913
940
Related branches:
941
parent branch: repo/branch1
917
944
control: Meta directory format 1
939
""" % (repo.bzrdir.root_transport.base,
940
branch1.bzrdir.root_transport.base,
941
format.get_branch_format().get_format_description(),
966
""" % (format.get_branch_format().get_format_description(),
942
967
format.repository_format.get_format_description(),
943
968
# poking at _revision_store isn't all that clean, but neither is
944
969
# having the ui test dependent on the exact overhead of a given store.
949
974
# Update second branch
950
975
tree2 = branch2.bzrdir.open_workingtree()
951
976
tree2.pull(branch1)
952
out, err = self.runbzr('info repo/branch2')
977
out, err = self.run_bzr('info -v repo/branch2')
953
978
self.assertEqualDiff(
955
shared repository: %s
956
repository checkout: branch2
979
"""Repository tree (format: knit)
981
shared repository: repo
982
repository branch: repo/branch2
958
984
Related branches:
985
parent branch: repo/branch1
962
988
control: Meta directory format 1
986
""" % (repo.bzrdir.root_transport.base,
987
branch1.bzrdir.root_transport.base,
988
format.get_branch_format().get_format_description(),
1013
""" % (format.get_branch_format().get_format_description(),
989
1014
format.repository_format.get_format_description(),
990
1015
datestring_first, datestring_first,
991
1016
# poking at _revision_store isn't all that clean, but neither is
995
1020
self.assertEqual('', err)
997
1022
# Show info about repository with revisions
998
out, err = self.runbzr('info repo')
1023
out, err = self.run_bzr('info -v repo')
999
1024
self.assertEqualDiff(
1001
shared repository: %s
1025
"""Shared repository with trees (format: dirstate or dirstate-tags or knit)
1027
shared repository: repo
1004
1030
control: Meta directory format 1
1012
""" % (repo.bzrdir.root_transport.base,
1013
format.repository_format.get_format_description(),
1038
""" % (format.repository_format.get_format_description(),
1014
1039
# poking at _revision_store isn't all that clean, but neither is
1015
1040
# having the ui test dependent on the exact overhead of a given store.
1016
1041
repo._revision_store.total_size(repo.get_transaction())[1] / 1024,
1025
1050
# Create shared repository with working trees
1026
1051
repo = self.make_repository('repo', shared=True, format=format)
1027
1052
repo.set_make_working_trees(True)
1028
out, err = self.runbzr('info repo')
1053
out, err = self.run_bzr('info -v repo')
1029
1054
self.assertEqualDiff(
1031
shared repository: %s
1055
"""Shared repository with trees (format: dirstate or dirstate-tags or knit)
1057
shared repository: repo
1034
1060
control: Meta directory format 1
1048
1073
control = repo.bzrdir
1049
1074
branch = control.create_branch()
1050
1075
control.create_workingtree()
1051
out, err = self.runbzr('info repo')
1076
out, err = self.run_bzr('info -v repo')
1052
1077
self.assertEqualDiff(
1054
shared repository: %s
1055
repository checkout: .
1078
"""Repository tree (format: knit)
1080
shared repository: repo
1081
repository branch: repo
1058
1084
control: Meta directory format 1
1073
1099
Branch history:
1079
""" % (repo.bzrdir.root_transport.base,
1080
format.get_branch_format().get_format_description(),
1106
""" % (format.get_branch_format().get_format_description(),
1081
1107
format.repository_format.get_format_description(),
1083
1109
self.assertEqual('', err)
1085
def assertCheckoutStatusOutput(self,
1111
def assertCheckoutStatusOutput(self,
1086
1112
command_string, lco_tree, shared_repo=None,
1087
1113
repo_branch=None,
1088
1114
tree_locked=False,
1089
1115
branch_locked=False, repo_locked=False,
1091
light_checkout=True):
1092
"""Check the output of info in a light checkout tree.
1117
light_checkout=True,
1118
checkout_root=None):
1119
"""Check the output of info in a checkout.
1094
1121
This is not quite a mirror of the info code: rather than using the
1095
1122
tree being examined to predict output, it uses a bunch of flags which
1106
1133
:param tree_locked: If true, expect the tree to be locked.
1107
1134
:param branch_locked: If true, expect the branch to be locked.
1108
1135
:param repo_locked: If true, expect the repository to be locked.
1136
Note that the lco_tree.branch.repository is inspected, and if is not
1137
actually locked then this parameter is overridden. This is because
1138
pack repositories do not have any public API for obtaining an
1139
exclusive repository wide lock.
1109
1140
:param verbose: If true, expect verbose output
1111
if tree_locked and sys.platform == 'win32':
1112
# We expect this to fail because of locking errors. (A write-locked
1113
# file cannot be read-locked in the same process).
1142
def friendly_location(url):
1143
path = urlutils.unescape_for_display(url, 'ascii')
1145
return osutils.relpath(osutils.getcwd(), path)
1146
except errors.PathNotChild:
1150
# We expect this to fail because of locking errors.
1151
# (A write-locked file cannot be read-locked
1152
# in the different process -- either on win32 or on linux).
1114
1153
# This should be removed when the locking errors are fixed.
1115
args = command_string.split(' ')
1116
self.run_bzr_error([], 'info', *args)
1118
out, err = self.runbzr('info %s' % command_string)
1154
self.expectFailure('OS locks are exclusive '
1155
'for different processes (Bug #174055)',
1156
self.run_bzr_subprocess,
1157
'info ' + command_string)
1158
out, err = self.run_bzr('info %s' % command_string)
1160
(True, True): 'Lightweight checkout',
1161
(True, False): 'Repository checkout',
1162
(False, True): 'Lightweight checkout',
1163
(False, False): 'Checkout',
1164
}[(shared_repo is not None, light_checkout)]
1165
format = {True: 'dirstate or dirstate-tags or pack-0.92'
1166
' or rich-root or rich-root-pack',
1167
False: 'dirstate'}[light_checkout]
1169
repo_locked = lco_tree.branch.repository.get_physical_lock_status()
1119
1170
if repo_locked or branch_locked or tree_locked:
1120
1171
def locked_message(a_bool):
1133
1184
locked_message(repo_locked)))
1135
1186
expected_lock_output = ''
1136
1189
if light_checkout:
1137
tree_data = (" light checkout root: %s" %
1138
lco_tree.bzrdir.root_transport.base)
1140
tree_data = (" checkout root: %s" %
1141
lco_tree.bzrdir.root_transport.base)
1190
tree_data = (" light checkout root: %s\n" %
1191
friendly_location(lco_tree.bzrdir.root_transport.base))
1193
if lco_tree.branch.get_bound_location() is not None:
1194
tree_data += ("%s checkout root: %s\n" % (extra_space,
1195
friendly_location(lco_tree.branch.bzrdir.root_transport.base)))
1142
1196
if shared_repo is not None:
1143
1197
branch_data = (
1144
" shared repository: %s\n"
1145
" repository branch: branch\n" %
1146
shared_repo.bzrdir.root_transport.base)
1198
" checkout of branch: %s\n"
1199
" shared repository: %s\n" %
1200
(friendly_location(repo_branch.bzrdir.root_transport.base),
1201
friendly_location(shared_repo.bzrdir.root_transport.base)))
1147
1202
elif repo_branch is not None:
1148
1203
branch_data = (
1149
" checkout of branch: %s\n" %
1150
repo_branch.bzrdir.root_transport.base)
1204
"%s checkout of branch: %s\n" %
1206
friendly_location(repo_branch.bzrdir.root_transport.base)))
1152
branch_data = (" checkout of branch: %s\n" %
1208
branch_data = (" checkout of branch: %s\n" %
1153
1209
lco_tree.branch.bzrdir.root_transport.base)
1222
self.assertCheckoutStatusOutput('tree/lightcheckout', lco_tree)
1280
self.assertCheckoutStatusOutput('-v tree/lightcheckout', lco_tree,
1281
repo_branch=repo_branch,
1282
verbose=True, light_checkout=True)
1224
1284
lco_tree.branch.repository.lock_write()
1226
self.assertCheckoutStatusOutput('tree/lightcheckout',
1286
self.assertCheckoutStatusOutput('-v tree/lightcheckout',
1287
lco_tree, repo_branch=repo_branch,
1288
repo_locked=True, verbose=True, light_checkout=True)
1230
1290
lco_tree.branch.repository.unlock()
1232
1292
lco_tree.branch.lock_write()
1234
self.assertCheckoutStatusOutput('tree/lightcheckout',
1294
self.assertCheckoutStatusOutput('-v tree/lightcheckout',
1236
1296
branch_locked=True,
1298
repo_branch=repo_branch,
1239
1301
lco_tree.branch.unlock()
1241
1303
lco_tree.lock_write()
1243
self.assertCheckoutStatusOutput('tree/lightcheckout',
1305
self.assertCheckoutStatusOutput('-v tree/lightcheckout',
1306
lco_tree, repo_branch=repo_branch,
1245
1307
tree_locked=True,
1246
1308
branch_locked=True,
1249
1312
lco_tree.unlock()
1251
1314
lco_tree.lock_write()
1252
1315
lco_tree.branch.repository.unlock()
1254
self.assertCheckoutStatusOutput('tree/lightcheckout',
1317
self.assertCheckoutStatusOutput('-v tree/lightcheckout',
1318
lco_tree, repo_branch=repo_branch,
1256
1319
tree_locked=True,
1259
1323
lco_tree.branch.repository.lock_write()
1260
1324
lco_tree.unlock()
1273
1338
lco_tree.branch.unlock()
1274
1339
lco_tree.branch.repository.lock_write()
1276
self.assertCheckoutStatusOutput('tree/lightcheckout',
1341
self.assertCheckoutStatusOutput('-v tree/lightcheckout',
1342
lco_tree, repo_branch=repo_branch,
1278
1343
tree_locked=True,
1281
1347
lco_tree.branch.repository.unlock()
1282
1348
lco_tree.branch.lock_write()
1285
1351
lco_tree.branch.lock_write()
1286
1352
lco_tree.branch.repository.unlock()
1288
self.assertCheckoutStatusOutput('tree/lightcheckout',
1354
self.assertCheckoutStatusOutput('-v tree/lightcheckout',
1355
lco_tree, repo_branch=repo_branch,
1292
1359
lco_tree.branch.repository.lock_write()
1293
1360
lco_tree.branch.unlock()
1334
1402
Branch history:
1340
""" % (tree.bzrdir.root_transport.base,
1341
tree.branch.repository._format.get_format_description(),
1409
""" % ('branch', tree.branch.repository._format.get_format_description(),
1343
1411
self.assertEqual('', err)
1345
1413
tree.lock_write()
1346
out, err = self.runbzr('info branch')
1414
out, err = self.run_bzr('info -v branch')
1347
1415
self.assertEqualDiff(
1416
"""Standalone tree (format: weave)
1349
1418
branch root: %s
1367
1436
Branch history:
1373
""" % (tree.bzrdir.root_transport.base,
1374
tree.branch.repository._format.get_format_description(),
1443
""" % ('branch', tree.branch.repository._format.get_format_description(),
1376
1445
self.assertEqual('', err)