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