36
39
location = "C:/i/do/not/exist/"
38
41
location = "/i/do/not/exist/"
39
out, err = self.runbzr('info '+location, retcode=3)
42
out, err = self.run_bzr('info '+location, retcode=3)
40
43
self.assertEqual(out, '')
41
44
self.assertEqual(err, 'bzr: ERROR: Not a branch: %s\n' % location)
48
51
self.build_tree(['standalone/a'])
50
53
branch1 = tree1.branch
51
out, err = self.runbzr('info standalone')
55
out, err = self.run_bzr('info standalone')
57
"""Standalone tree (format: weave)
59
branch root: standalone
61
self.assertEqual('', err)
63
out, err = self.run_bzr('info standalone -v')
65
"""Standalone tree (format: weave)
67
branch root: standalone
57
70
control: All-in-one format 6
78
""" % branch1.bzrdir.root_transport.base, out)
79
93
self.assertEqual('', err)
80
94
tree1.commit('commit one')
81
95
rev = branch1.repository.get_revision(branch1.revision_history()[0])
84
98
# Branch standalone with push location
85
99
branch2 = branch1.bzrdir.sprout('branch').open_branch()
86
100
branch2.set_push_location(branch1.bzrdir.root_transport.base)
87
out, err = self.runbzr('info branch --verbose')
102
out, err = self.run_bzr('info branch')
103
self.assertEqualDiff(
104
"""Standalone tree (format: weave)
109
push branch: standalone
110
parent branch: standalone
112
self.assertEqual('', err)
114
out, err = self.run_bzr('info branch --verbose')
115
self.assertEqualDiff(
116
"""Standalone tree (format: weave)
121
push branch: standalone
122
parent branch: standalone
97
125
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,
150
""" % (datestring_first, datestring_first,
126
151
# poking at _revision_store isn't all that clean, but neither is
127
152
# having the ui test dependent on the exact overhead of a given store.
128
153
branch2.repository._revision_store.total_size(
138
163
branch3 = bzrlib.bzrdir.BzrDir.open('bound').open_branch()
139
164
branch3.bind(branch1)
140
165
bound_tree = branch3.bzrdir.open_workingtree()
141
out, err = self.runbzr('info bound')
166
out, err = self.run_bzr('info -v bound')
142
167
self.assertEqualDiff(
145
checkout of branch: %s
168
"""Checkout (format: knit)
171
checkout of branch: standalone
147
173
Related branches:
174
parent branch: standalone
151
177
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(),
202
""" % (bound_tree._format.get_format_description(),
179
203
branch3._format.get_format_description(),
180
204
branch3.repository._format.get_format_description(),
181
205
datestring_first, datestring_first,
191
215
format=knit1_format)
192
216
branch4.bind(branch1)
193
217
branch4.bzrdir.open_workingtree().update()
194
out, err = self.runbzr('info checkout --verbose')
218
out, err = self.run_bzr('info checkout --verbose')
195
219
self.assertEqualDiff(
198
checkout of branch: %s
220
"""Checkout (format: knit)
222
checkout root: checkout
223
checkout of branch: standalone
201
226
control: Meta directory format 1
226
""" % (branch4.bzrdir.root_transport.base,
227
branch1.bzrdir.root_transport.base,
228
branch4.repository._format.get_format_description(),
251
""" % (branch4.repository._format.get_format_description(),
229
252
datestring_first, datestring_first,
230
253
# poking at _revision_store isn't all that clean, but neither is
231
254
# having the ui test dependent on the exact overhead of a given store.
237
260
# Lightweight checkout (same as above, different branch and repository)
238
261
tree5 = branch1.create_checkout('lightcheckout', lightweight=True)
239
262
branch5 = tree5.branch
240
out, err = self.runbzr('info lightcheckout')
263
out, err = self.run_bzr('info -v lightcheckout')
241
264
self.assertEqualDiff(
243
light checkout root: %s
244
checkout of branch: %s
265
"""Lightweight checkout (format: dirstate or dirstate-tags)
267
light checkout root: lightcheckout
268
checkout of branch: standalone
247
271
control: Meta directory format 1
271
""" % (tree5.bzrdir.root_transport.base,
272
branch1.bzrdir.root_transport.base,
273
datestring_first, datestring_first,
296
""" % (datestring_first, datestring_first,), out)
275
297
self.assertEqual('', err)
277
299
# Update initial standalone branch
282
304
datestring_last = format_date(rev.timestamp, rev.timezone)
284
306
# Out of date branched standalone branch will not be detected
285
out, err = self.runbzr('info branch')
307
out, err = self.run_bzr('info -v branch')
286
308
self.assertEqualDiff(
309
"""Standalone tree (format: weave)
290
313
Related branches:
292
publish to branch: %s
314
push branch: standalone
315
parent branch: standalone
295
318
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,
343
""" % (datestring_first, datestring_first,
324
345
self.assertEqual('', err)
326
347
# Out of date bound branch
327
out, err = self.runbzr('info bound')
348
out, err = self.run_bzr('info -v bound')
328
349
self.assertEqualDiff(
331
checkout of branch: %s
350
"""Checkout (format: knit)
353
checkout of branch: standalone
333
355
Related branches:
356
parent branch: standalone
337
359
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(),
386
""" % (branch3.repository._format.get_format_description(),
367
387
datestring_first, datestring_first,
368
388
# poking at _revision_store isn't all that clean, but neither is
369
389
# having the ui test dependent on the exact overhead of a given store.
373
393
self.assertEqual('', err)
375
395
# Out of date checkout
376
out, err = self.runbzr('info checkout')
396
out, err = self.run_bzr('info -v checkout')
377
397
self.assertEqualDiff(
380
checkout of branch: %s
398
"""Checkout (format: knit)
400
checkout root: checkout
401
checkout of branch: standalone
383
404
control: Meta directory format 1
409
""" % (branch4.bzrdir.root_transport.base,
410
branch1.bzrdir.root_transport.base,
411
branch4.repository._format.get_format_description(),
431
""" % (branch4.repository._format.get_format_description(),
412
432
datestring_first, datestring_first,
413
433
# poking at _revision_store isn't all that clean, but neither is
414
434
# having the ui test dependent on the exact overhead of a given store.
418
438
self.assertEqual('', err)
420
440
# Out of date lightweight checkout
421
out, err = self.runbzr('info lightcheckout --verbose')
441
out, err = self.run_bzr('info lightcheckout --verbose')
422
442
self.assertEqualDiff(
424
light checkout root: %s
425
checkout of branch: %s
443
"""Lightweight checkout (format: dirstate or dirstate-tags)
445
light checkout root: lightcheckout
446
checkout of branch: standalone
428
449
control: Meta directory format 1
455
""" % (tree5.bzrdir.root_transport.base,
456
branch1.bzrdir.root_transport.base,
457
datestring_first, datestring_last,
476
""" % (datestring_first, datestring_last,), out)
459
477
self.assertEqual('', err)
461
479
def test_info_standalone_no_tree(self):
463
481
format = bzrdir.format_registry.make_bzrdir('default')
464
482
branch = self.make_branch('branch')
465
483
repo = branch.repository
466
out, err = self.runbzr('info branch')
484
out, err = self.run_bzr('info branch -v')
467
485
self.assertEqualDiff(
486
"""Standalone branch (format: dirstate or knit)
472
491
control: Meta directory format 1
482
""" % (branch.bzrdir.root_transport.base,
483
format.get_branch_format().get_format_description(),
502
""" % (format.get_branch_format().get_format_description(),
484
503
format.repository_format.get_format_description(),
486
505
self.assertEqual('', err)
492
511
# Create shared repository
493
512
repo = self.make_repository('repo', shared=True, format=format)
494
513
repo.set_make_working_trees(False)
495
out, err = self.runbzr('info repo')
514
out, err = self.run_bzr('info -v repo')
496
515
self.assertEqualDiff(
516
"""Shared repository (format: dirstate or dirstate-tags or knit)
498
518
shared repository: %s
507
""" % (repo.bzrdir.root_transport.base,
508
format.repository_format.get_format_description(),
527
""" % ('repo', format.repository_format.get_format_description(),
510
529
self.assertEqual('', err)
513
532
repo.bzrdir.root_transport.mkdir('branch')
514
533
branch1 = repo.bzrdir.create_branch_convenience('repo/branch',
516
out, err = self.runbzr('info repo/branch')
535
out, err = self.run_bzr('info -v repo/branch')
517
536
self.assertEqualDiff(
519
shared repository: %s
520
repository branch: branch
537
"""Repository branch (format: dirstate or knit)
539
shared repository: repo
540
repository branch: repo/branch
523
543
control: Meta directory format 1
533
""" % (repo.bzrdir.root_transport.base,
534
format.get_branch_format().get_format_description(),
554
""" % (format.get_branch_format().get_format_description(),
535
555
format.repository_format.get_format_description(),
537
557
self.assertEqual('', err)
542
562
tree2 = branch1.create_checkout('tree/lightcheckout',
543
563
lightweight=True)
544
564
branch2 = tree2.branch
545
self.assertCheckoutStatusOutput('tree/lightcheckout', tree2,
565
self.assertCheckoutStatusOutput('-v tree/lightcheckout', tree2,
566
shared_repo=repo, repo_branch=branch1, verbose=True)
548
568
# Create normal checkout
549
569
tree3 = branch1.create_checkout('tree/checkout')
556
576
tree2.commit('commit one')
557
577
rev = repo.get_revision(branch2.revision_history()[0])
558
578
datestring_first = format_date(rev.timestamp, rev.timezone)
559
out, err = self.runbzr('info tree/lightcheckout --verbose')
579
out, err = self.run_bzr('info tree/lightcheckout --verbose')
560
580
self.assertEqualDiff(
562
light checkout root: %s
563
shared repository: %s
564
repository branch: branch
581
"""Lightweight checkout (format: dirstate or dirstate-tags)
583
light checkout root: tree/lightcheckout
584
checkout of branch: repo/branch
585
shared repository: repo
567
588
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(),
613
""" % (format.get_branch_format().get_format_description(),
595
614
format.repository_format.get_format_description(),
596
615
datestring_first, datestring_first,
597
616
# poking at _revision_store isn't all that clean, but neither is
601
620
self.assertEqual('', err)
603
622
# Out of date checkout
604
out, err = self.runbzr('info tree/checkout')
623
out, err = self.run_bzr('info -v tree/checkout')
605
624
self.assertEqualDiff(
608
checkout of branch: %s
625
"""Checkout (format: dirstate)
627
checkout root: tree/checkout
628
checkout of branch: repo/branch
611
631
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(),
655
""" % (format.get_branch_format().get_format_description(),
637
656
format.repository_format.get_format_description(),
639
658
self.assertEqual('', err)
643
662
self.build_tree(['tree/checkout/b'])
645
out, err = self.runbzr('info tree/checkout --verbose')
664
out, err = self.run_bzr('info tree/checkout --verbose')
646
665
self.assertEqualDiff(
649
checkout of branch: %s
666
"""Checkout (format: dirstate)
668
checkout root: tree/checkout
669
checkout of branch: repo/branch
652
672
control: Meta directory format 1
677
""" % (tree3.bzrdir.root_transport.base, branch1.bzrdir.root_transport.base,
678
format.get_branch_format().get_format_description(),
697
""" % (format.get_branch_format().get_format_description(),
679
698
format.repository_format.get_format_description(),
680
699
datestring_first, datestring_first,
681
700
# poking at _revision_store isn't all that clean, but neither is
688
707
# Out of date lightweight checkout
689
708
rev = repo.get_revision(branch1.revision_history()[-1])
690
709
datestring_last = format_date(rev.timestamp, rev.timezone)
691
out, err = self.runbzr('info tree/lightcheckout --verbose')
710
out, err = self.run_bzr('info tree/lightcheckout --verbose')
692
711
self.assertEqualDiff(
694
light checkout root: %s
695
shared repository: %s
696
repository branch: branch
712
"""Lightweight checkout (format: dirstate or dirstate-tags)
714
light checkout root: tree/lightcheckout
715
checkout of branch: repo/branch
716
shared repository: repo
699
719
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(),
746
""" % (format.get_branch_format().get_format_description(),
729
747
format.repository_format.get_format_description(),
730
748
datestring_first, datestring_last,
731
749
# poking at _revision_store isn't all that clean, but neither is
735
753
self.assertEqual('', err)
737
755
# Show info about shared branch
738
out, err = self.runbzr('info repo/branch --verbose')
756
out, err = self.run_bzr('info repo/branch --verbose')
739
757
self.assertEqualDiff(
741
shared repository: %s
742
repository branch: branch
758
"""Repository branch (format: dirstate or knit)
760
shared repository: repo
761
repository branch: repo/branch
745
764
control: Meta directory format 1
759
""" % (repo.bzrdir.root_transport.base,
760
format.get_branch_format().get_format_description(),
778
""" % (format.get_branch_format().get_format_description(),
761
779
format.repository_format.get_format_description(),
762
780
datestring_first, datestring_last,
763
781
# poking at _revision_store isn't all that clean, but neither is
767
785
self.assertEqual('', err)
769
787
# Show info about repository with revisions
770
out, err = self.runbzr('info repo')
788
out, err = self.run_bzr('info -v repo')
771
789
self.assertEqualDiff(
773
shared repository: %s
790
"""Shared repository (format: dirstate or dirstate-tags or knit)
792
shared repository: repo
776
795
control: Meta directory format 1
782
""" % (repo.bzrdir.root_transport.base,
783
format.repository_format.get_format_description(),
801
""" % (format.repository_format.get_format_description(),
784
802
# poking at _revision_store isn't all that clean, but neither is
785
803
# having the ui test dependent on the exact overhead of a given store.
786
804
repo._revision_store.total_size(repo.get_transaction())[1] / 1024,
794
812
# Create shared repository with working trees
795
813
repo = self.make_repository('repo', shared=True, format=format)
796
814
repo.set_make_working_trees(True)
797
out, err = self.runbzr('info repo')
815
out, err = self.run_bzr('info -v repo')
798
816
self.assertEqualDiff(
800
shared repository: %s
817
"""Shared repository with trees (format: dirstate or dirstate-tags or knit)
819
shared repository: repo
803
822
control: Meta directory format 1
811
""" % (repo.bzrdir.root_transport.base,
812
format.repository_format.get_format_description(),
830
""" % (format.repository_format.get_format_description(),
814
832
self.assertEqual('', err)
820
838
branch2 = branch1.bzrdir.sprout('repo/branch2').open_branch()
822
840
# Empty first branch
823
out, err = self.runbzr('info repo/branch1 --verbose')
841
out, err = self.run_bzr('info repo/branch1 --verbose')
824
842
self.assertEqualDiff(
826
shared repository: %s
827
repository checkout: branch1
843
"""Repository tree (format: knit)
845
shared repository: repo
846
repository branch: repo/branch1
830
849
control: Meta directory format 1
852
""" % (repo.bzrdir.root_transport.base,
853
format.get_branch_format().get_format_description(),
871
""" % (format.get_branch_format().get_format_description(),
854
872
format.repository_format.get_format_description(),
856
874
self.assertEqual('', err)
862
880
tree1.commit('commit one')
863
881
rev = repo.get_revision(branch1.revision_history()[0])
864
882
datestring_first = format_date(rev.timestamp, rev.timezone)
865
out, err = self.runbzr('info repo/branch1')
883
out, err = self.run_bzr('info -v repo/branch1')
866
884
self.assertEqualDiff(
868
shared repository: %s
869
repository checkout: branch1
885
"""Repository tree (format: knit)
887
shared repository: repo
888
repository branch: repo/branch1
872
891
control: Meta directory format 1
896
""" % (repo.bzrdir.root_transport.base,
897
format.get_branch_format().get_format_description(),
916
""" % (format.get_branch_format().get_format_description(),
898
917
format.repository_format.get_format_description(),
899
918
datestring_first, datestring_first,
900
919
# poking at _revision_store isn't all that clean, but neither is
904
923
self.assertEqual('', err)
906
925
# Out of date second branch
907
out, err = self.runbzr('info repo/branch2 --verbose')
926
out, err = self.run_bzr('info repo/branch2 --verbose')
908
927
self.assertEqualDiff(
910
shared repository: %s
911
repository checkout: branch2
928
"""Repository tree (format: knit)
930
shared repository: repo
931
repository branch: repo/branch2
913
933
Related branches:
934
parent branch: repo/branch1
917
937
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(),
959
""" % (format.get_branch_format().get_format_description(),
942
960
format.repository_format.get_format_description(),
943
961
# poking at _revision_store isn't all that clean, but neither is
944
962
# having the ui test dependent on the exact overhead of a given store.
949
967
# Update second branch
950
968
tree2 = branch2.bzrdir.open_workingtree()
951
969
tree2.pull(branch1)
952
out, err = self.runbzr('info repo/branch2')
970
out, err = self.run_bzr('info -v repo/branch2')
953
971
self.assertEqualDiff(
955
shared repository: %s
956
repository checkout: branch2
972
"""Repository tree (format: knit)
974
shared repository: repo
975
repository branch: repo/branch2
958
977
Related branches:
978
parent branch: repo/branch1
962
981
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(),
1006
""" % (format.get_branch_format().get_format_description(),
989
1007
format.repository_format.get_format_description(),
990
1008
datestring_first, datestring_first,
991
1009
# poking at _revision_store isn't all that clean, but neither is
995
1013
self.assertEqual('', err)
997
1015
# Show info about repository with revisions
998
out, err = self.runbzr('info repo')
1016
out, err = self.run_bzr('info -v repo')
999
1017
self.assertEqualDiff(
1001
shared repository: %s
1018
"""Shared repository with trees (format: dirstate or dirstate-tags or knit)
1020
shared repository: repo
1004
1023
control: Meta directory format 1
1012
""" % (repo.bzrdir.root_transport.base,
1013
format.repository_format.get_format_description(),
1031
""" % (format.repository_format.get_format_description(),
1014
1032
# poking at _revision_store isn't all that clean, but neither is
1015
1033
# having the ui test dependent on the exact overhead of a given store.
1016
1034
repo._revision_store.total_size(repo.get_transaction())[1] / 1024,
1025
1043
# Create shared repository with working trees
1026
1044
repo = self.make_repository('repo', shared=True, format=format)
1027
1045
repo.set_make_working_trees(True)
1028
out, err = self.runbzr('info repo')
1046
out, err = self.run_bzr('info -v repo')
1029
1047
self.assertEqualDiff(
1031
shared repository: %s
1048
"""Shared repository with trees (format: dirstate or dirstate-tags or knit)
1050
shared repository: repo
1034
1053
control: Meta directory format 1
1042
""" % (repo.bzrdir.root_transport.base,
1043
format.repository_format.get_format_description(),
1061
""" % (format.repository_format.get_format_description(),
1045
1063
self.assertEqual('', err)
1048
1066
control = repo.bzrdir
1049
1067
branch = control.create_branch()
1050
1068
control.create_workingtree()
1051
out, err = self.runbzr('info repo')
1069
out, err = self.run_bzr('info -v repo')
1052
1070
self.assertEqualDiff(
1054
shared repository: %s
1055
repository checkout: .
1071
"""Repository tree (format: knit)
1073
shared repository: repo
1074
repository branch: repo
1058
1077
control: Meta directory format 1
1073
1092
Branch history:
1079
""" % (repo.bzrdir.root_transport.base,
1080
format.get_branch_format().get_format_description(),
1099
""" % (format.get_branch_format().get_format_description(),
1081
1100
format.repository_format.get_format_description(),
1083
1102
self.assertEqual('', err)
1088
1107
tree_locked=False,
1089
1108
branch_locked=False, repo_locked=False,
1091
light_checkout=True):
1092
"""Check the output of info in a light checkout tree.
1110
light_checkout=True,
1111
checkout_root=None):
1112
"""Check the output of info in a checkout.
1094
1114
This is not quite a mirror of the info code: rather than using the
1095
1115
tree being examined to predict output, it uses a bunch of flags which
1108
1128
:param repo_locked: If true, expect the repository to be locked.
1109
1129
:param verbose: If true, expect verbose output
1131
def friendly_location(url):
1132
path = urlutils.unescape_for_display(url, 'ascii')
1134
return osutils.relpath(os.getcwd(), path)
1135
except errors.PathNotChild:
1111
1138
if tree_locked and sys.platform == 'win32':
1112
1139
# We expect this to fail because of locking errors. (A write-locked
1113
1140
# file cannot be read-locked in the same process).
1115
1142
args = command_string.split(' ')
1116
1143
self.run_bzr_error([], 'info', *args)
1118
out, err = self.runbzr('info %s' % command_string)
1145
out, err = self.run_bzr('info %s' % command_string)
1147
(True, True): 'Lightweight checkout',
1148
(True, False): 'Repository checkout',
1149
(False, True): 'Lightweight checkout',
1150
(False, False): 'Checkout',
1151
}[(shared_repo is not None, light_checkout)]
1152
format = {True: 'dirstate or dirstate-tags',
1153
False: 'dirstate'}[light_checkout]
1119
1154
if repo_locked or branch_locked or tree_locked:
1120
1155
def locked_message(a_bool):
1133
1168
locked_message(repo_locked)))
1135
1170
expected_lock_output = ''
1136
1173
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)
1174
tree_data = (" light checkout root: %s\n" %
1175
friendly_location(lco_tree.bzrdir.root_transport.base))
1177
if lco_tree.branch.get_bound_location() is not None:
1178
tree_data += ("%s checkout root: %s\n" % (extra_space,
1179
friendly_location(lco_tree.branch.bzrdir.root_transport.base)))
1142
1180
if shared_repo is not None:
1143
1181
branch_data = (
1144
" shared repository: %s\n"
1145
" repository branch: branch\n" %
1146
shared_repo.bzrdir.root_transport.base)
1182
" checkout of branch: %s\n"
1183
" shared repository: %s\n" %
1184
(friendly_location(repo_branch.bzrdir.root_transport.base),
1185
friendly_location(shared_repo.bzrdir.root_transport.base)))
1147
1186
elif repo_branch is not None:
1148
1187
branch_data = (
1149
" checkout of branch: %s\n" %
1150
repo_branch.bzrdir.root_transport.base)
1188
"%s checkout of branch: %s\n" %
1190
friendly_location(repo_branch.bzrdir.root_transport.base)))
1152
branch_data = (" checkout of branch: %s\n" %
1192
branch_data = (" checkout of branch: %s\n" %
1153
1193
lco_tree.branch.bzrdir.root_transport.base)
1222
self.assertCheckoutStatusOutput('tree/lightcheckout', lco_tree)
1264
self.assertCheckoutStatusOutput('-v tree/lightcheckout', lco_tree,
1265
repo_branch=repo_branch,
1266
verbose=True, light_checkout=True)
1224
1268
lco_tree.branch.repository.lock_write()
1226
self.assertCheckoutStatusOutput('tree/lightcheckout',
1270
self.assertCheckoutStatusOutput('-v tree/lightcheckout',
1271
lco_tree, repo_branch=repo_branch,
1272
repo_locked=True, verbose=True, light_checkout=True)
1230
1274
lco_tree.branch.repository.unlock()
1232
1276
lco_tree.branch.lock_write()
1234
self.assertCheckoutStatusOutput('tree/lightcheckout',
1278
self.assertCheckoutStatusOutput('-v tree/lightcheckout',
1236
1280
branch_locked=True,
1282
repo_branch=repo_branch,
1239
1285
lco_tree.branch.unlock()
1241
1287
lco_tree.lock_write()
1243
self.assertCheckoutStatusOutput('tree/lightcheckout',
1289
self.assertCheckoutStatusOutput('-v tree/lightcheckout',
1290
lco_tree, repo_branch=repo_branch,
1245
1291
tree_locked=True,
1246
1292
branch_locked=True,
1249
1296
lco_tree.unlock()
1251
1298
lco_tree.lock_write()
1252
1299
lco_tree.branch.repository.unlock()
1254
self.assertCheckoutStatusOutput('tree/lightcheckout',
1301
self.assertCheckoutStatusOutput('-v tree/lightcheckout',
1302
lco_tree, repo_branch=repo_branch,
1256
1303
tree_locked=True,
1259
1307
lco_tree.branch.repository.lock_write()
1260
1308
lco_tree.unlock()
1262
1310
lco_tree.lock_write()
1263
1311
lco_tree.branch.unlock()
1265
self.assertCheckoutStatusOutput('tree/lightcheckout',
1313
self.assertCheckoutStatusOutput('-v tree/lightcheckout',
1314
lco_tree, repo_branch=repo_branch,
1269
1318
lco_tree.branch.lock_write()
1270
1319
lco_tree.unlock()
1273
1322
lco_tree.branch.unlock()
1274
1323
lco_tree.branch.repository.lock_write()
1276
self.assertCheckoutStatusOutput('tree/lightcheckout',
1325
self.assertCheckoutStatusOutput('-v tree/lightcheckout',
1326
lco_tree, repo_branch=repo_branch,
1278
1327
tree_locked=True,
1281
1331
lco_tree.branch.repository.unlock()
1282
1332
lco_tree.branch.lock_write()
1285
1335
lco_tree.branch.lock_write()
1286
1336
lco_tree.branch.repository.unlock()
1288
self.assertCheckoutStatusOutput('tree/lightcheckout',
1338
self.assertCheckoutStatusOutput('-v tree/lightcheckout',
1339
lco_tree, repo_branch=repo_branch,
1292
1343
lco_tree.branch.repository.lock_write()
1293
1344
lco_tree.branch.unlock()
1334
1386
Branch history:
1340
""" % (tree.bzrdir.root_transport.base,
1341
tree.branch.repository._format.get_format_description(),
1393
""" % ('branch', tree.branch.repository._format.get_format_description(),
1343
1395
self.assertEqual('', err)
1345
1397
tree.lock_write()
1346
out, err = self.runbzr('info branch')
1398
out, err = self.run_bzr('info -v branch')
1347
1399
self.assertEqualDiff(
1400
"""Standalone tree (format: weave)
1349
1402
branch root: %s
1367
1420
Branch history:
1373
""" % (tree.bzrdir.root_transport.base,
1374
tree.branch.repository._format.get_format_description(),
1427
""" % ('branch', tree.branch.repository._format.get_format_description(),
1376
1429
self.assertEqual('', err)