~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_info.py

  • Committer: John Arbash Meinel
  • Date: 2007-06-28 23:18:09 UTC
  • mfrom: (2562 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2566.
  • Revision ID: john@arbash-meinel.com-20070628231809-pqbt7puoqj8bl07b
[merge] bzr.dev 2562

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
            location = "C:/i/do/not/exist/"
37
37
        else:
38
38
            location = "/i/do/not/exist/"
39
 
        out, err = self.runbzr('info '+location, retcode=3)
 
39
        out, err = self.run_bzr('info '+location, retcode=3)
40
40
        self.assertEqual(out, '')
41
41
        self.assertEqual(err, 'bzr: ERROR: Not a branch: %s\n' % location)
42
42
 
48
48
        self.build_tree(['standalone/a'])
49
49
        tree1.add('a')
50
50
        branch1 = tree1.branch
51
 
        out, err = self.runbzr('info standalone')
 
51
        out, err = self.run_bzr('info standalone -v')
52
52
        self.assertEqualDiff(
53
 
"""Location:
 
53
"""Standalone tree (format: weave)
 
54
Location:
54
55
  branch root: %s
55
56
 
56
57
Format:
71
72
 
72
73
Branch history:
73
74
         0 revisions
 
75
         0 committers
74
76
 
75
77
Repository:
76
78
         0 revisions
84
86
        # Branch standalone with push location
85
87
        branch2 = branch1.bzrdir.sprout('branch').open_branch()
86
88
        branch2.set_push_location(branch1.bzrdir.root_transport.base)
87
 
        out, err = self.runbzr('info branch --verbose')
 
89
        out, err = self.run_bzr('info branch --verbose')
88
90
        self.assertEqualDiff(
89
 
"""Location:
 
91
"""Standalone tree (format: weave)
 
92
Location:
90
93
  branch root: %s
91
94
 
92
95
Related branches:
138
141
        branch3 = bzrlib.bzrdir.BzrDir.open('bound').open_branch()
139
142
        branch3.bind(branch1)
140
143
        bound_tree = branch3.bzrdir.open_workingtree()
141
 
        out, err = self.runbzr('info bound')
 
144
        out, err = self.run_bzr('info -v bound')
142
145
        self.assertEqualDiff(
143
 
"""Location:
 
146
"""Checkout (format: knit)
 
147
Location:
144
148
       checkout root: %s
145
149
  checkout of branch: %s
146
150
 
165
169
 
166
170
Branch history:
167
171
         1 revision
 
172
         1 committer
168
173
         0 days old
169
174
   first revision: %s
170
175
  latest revision: %s
191
196
            format=knit1_format)
192
197
        branch4.bind(branch1)
193
198
        branch4.bzrdir.open_workingtree().update()
194
 
        out, err = self.runbzr('info checkout --verbose')
 
199
        out, err = self.run_bzr('info checkout --verbose')
195
200
        self.assertEqualDiff(
196
 
"""Location:
 
201
"""Checkout (format: knit)
 
202
Location:
197
203
       checkout root: %s
198
204
  checkout of branch: %s
199
205
 
237
243
        # Lightweight checkout (same as above, different branch and repository)
238
244
        tree5 = branch1.create_checkout('lightcheckout', lightweight=True)
239
245
        branch5 = tree5.branch
240
 
        out, err = self.runbzr('info lightcheckout')
 
246
        out, err = self.run_bzr('info -v lightcheckout')
241
247
        self.assertEqualDiff(
242
 
"""Location:
243
 
 light checkout root: %s
244
 
  checkout of branch: %s
 
248
"""Lightweight checkout (format: dirstate or dirstate-tags)
 
249
Location:
 
250
  light checkout root: %s
 
251
   checkout of branch: %s
245
252
 
246
253
Format:
247
254
       control: Meta directory format 1
261
268
 
262
269
Branch history:
263
270
         1 revision
 
271
         1 committer
264
272
         0 days old
265
273
   first revision: %s
266
274
  latest revision: %s
282
290
        datestring_last = format_date(rev.timestamp, rev.timezone)
283
291
 
284
292
        # Out of date branched standalone branch will not be detected
285
 
        out, err = self.runbzr('info branch')
 
293
        out, err = self.run_bzr('info -v branch')
286
294
        self.assertEqualDiff(
287
 
"""Location:
 
295
"""Standalone tree (format: weave)
 
296
Location:
288
297
  branch root: %s
289
298
 
290
299
Related branches:
309
318
 
310
319
Branch history:
311
320
         1 revision
 
321
         1 committer
312
322
         0 days old
313
323
   first revision: %s
314
324
  latest revision: %s
324
334
        self.assertEqual('', err)
325
335
 
326
336
        # Out of date bound branch
327
 
        out, err = self.runbzr('info bound')
 
337
        out, err = self.run_bzr('info -v bound')
328
338
        self.assertEqualDiff(
329
 
"""Location:
 
339
"""Checkout (format: knit)
 
340
Location:
330
341
       checkout root: %s
331
342
  checkout of branch: %s
332
343
 
353
364
 
354
365
Branch history:
355
366
         1 revision
 
367
         1 committer
356
368
         0 days old
357
369
   first revision: %s
358
370
  latest revision: %s
373
385
        self.assertEqual('', err)
374
386
 
375
387
        # Out of date checkout
376
 
        out, err = self.runbzr('info checkout')
 
388
        out, err = self.run_bzr('info -v checkout')
377
389
        self.assertEqualDiff(
378
 
"""Location:
 
390
"""Checkout (format: knit)
 
391
Location:
379
392
       checkout root: %s
380
393
  checkout of branch: %s
381
394
 
399
412
 
400
413
Branch history:
401
414
         1 revision
 
415
         1 committer
402
416
         0 days old
403
417
   first revision: %s
404
418
  latest revision: %s
418
432
        self.assertEqual('', err)
419
433
 
420
434
        # Out of date lightweight checkout
421
 
        out, err = self.runbzr('info lightcheckout --verbose')
 
435
        out, err = self.run_bzr('info lightcheckout --verbose')
422
436
        self.assertEqualDiff(
423
 
"""Location:
424
 
 light checkout root: %s
425
 
  checkout of branch: %s
 
437
"""Lightweight checkout (format: dirstate or dirstate-tags)
 
438
Location:
 
439
  light checkout root: %s
 
440
   checkout of branch: %s
426
441
 
427
442
Format:
428
443
       control: Meta directory format 1
463
478
        format = bzrdir.format_registry.make_bzrdir('default')
464
479
        branch = self.make_branch('branch')
465
480
        repo = branch.repository
466
 
        out, err = self.runbzr('info branch')
 
481
        out, err = self.run_bzr('info branch -v')
467
482
        self.assertEqualDiff(
468
 
"""Location:
 
483
"""Standalone branch (format: dirstate or knit)
 
484
Location:
469
485
  branch root: %s
470
486
 
471
487
Format:
475
491
 
476
492
Branch history:
477
493
         0 revisions
 
494
         0 committers
478
495
 
479
496
Repository:
480
497
         0 revisions
492
509
        # Create shared repository
493
510
        repo = self.make_repository('repo', shared=True, format=format)
494
511
        repo.set_make_working_trees(False)
495
 
        out, err = self.runbzr('info repo')
 
512
        out, err = self.run_bzr('info -v repo')
496
513
        self.assertEqualDiff(
497
 
"""Location:
 
514
"""Shared repository (format: dirstate or dirstate-tags or knit)
 
515
Location:
498
516
  shared repository: %s
499
517
 
500
518
Format:
513
531
        repo.bzrdir.root_transport.mkdir('branch')
514
532
        branch1 = repo.bzrdir.create_branch_convenience('repo/branch',
515
533
            format=format)
516
 
        out, err = self.runbzr('info repo/branch')
 
534
        out, err = self.run_bzr('info -v repo/branch')
517
535
        self.assertEqualDiff(
518
 
"""Location:
 
536
"""Repository branch (format: dirstate or knit)
 
537
Location:
519
538
  shared repository: %s
520
539
  repository branch: branch
521
540
 
526
545
 
527
546
Branch history:
528
547
         0 revisions
 
548
         0 committers
529
549
 
530
550
Repository:
531
551
         0 revisions
542
562
        tree2 = branch1.create_checkout('tree/lightcheckout', 
543
563
            lightweight=True)
544
564
        branch2 = tree2.branch
545
 
        self.assertCheckoutStatusOutput('tree/lightcheckout', tree2, 
546
 
                   shared_repo=repo)
 
565
        self.assertCheckoutStatusOutput('-v tree/lightcheckout', tree2,
 
566
                   shared_repo=repo, repo_branch=branch1, verbose=True)
547
567
 
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(
561
 
"""Location:
562
 
 light checkout root: %s
563
 
   shared repository: %s
564
 
   repository branch: branch
 
581
"""Lightweight checkout (format: dirstate or dirstate-tags)
 
582
Location:
 
583
  light checkout root: %s
 
584
   checkout of branch: %s
 
585
    shared repository: %s
565
586
 
566
587
Format:
567
588
       control: Meta directory format 1
590
611
         1 revision
591
612
         %d KiB
592
613
""" % (tree2.bzrdir.root_transport.base,
 
614
       tree2.branch.bzrdir.root_transport.base,
593
615
       repo.bzrdir.root_transport.base,
594
616
       format.get_branch_format().get_format_description(),
595
617
       format.repository_format.get_format_description(),
601
623
        self.assertEqual('', err)
602
624
 
603
625
        # Out of date checkout
604
 
        out, err = self.runbzr('info tree/checkout')
 
626
        out, err = self.run_bzr('info -v tree/checkout')
605
627
        self.assertEqualDiff(
606
 
"""Location:
 
628
"""Checkout (format: dirstate)
 
629
Location:
607
630
       checkout root: %s
608
631
  checkout of branch: %s
609
632
 
627
650
 
628
651
Branch history:
629
652
         0 revisions
 
653
         0 committers
630
654
 
631
655
Repository:
632
656
         0 revisions
642
666
        tree3.update()
643
667
        self.build_tree(['tree/checkout/b'])
644
668
        tree3.add('b')
645
 
        out, err = self.runbzr('info tree/checkout --verbose')
 
669
        out, err = self.run_bzr('info tree/checkout --verbose')
646
670
        self.assertEqualDiff(
647
 
"""Location:
 
671
"""Checkout (format: dirstate)
 
672
Location:
648
673
       checkout root: %s
649
674
  checkout of branch: %s
650
675
 
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(
693
 
"""Location:
694
 
 light checkout root: %s
695
 
   shared repository: %s
696
 
   repository branch: branch
 
718
"""Lightweight checkout (format: dirstate or dirstate-tags)
 
719
Location:
 
720
  light checkout root: %s
 
721
   checkout of branch: %s
 
722
    shared repository: %s
697
723
 
698
724
Format:
699
725
       control: Meta directory format 1
724
750
         2 revisions
725
751
         %d KiB
726
752
""" % (tree2.bzrdir.root_transport.base,
 
753
       tree2.branch.bzrdir.root_transport.base,
727
754
       repo.bzrdir.root_transport.base,
728
755
       format.get_branch_format().get_format_description(),
729
756
       format.repository_format.get_format_description(),
735
762
        self.assertEqual('', err)
736
763
 
737
764
        # Show info about shared branch
738
 
        out, err = self.runbzr('info repo/branch --verbose')
 
765
        out, err = self.run_bzr('info repo/branch --verbose')
739
766
        self.assertEqualDiff(
740
 
"""Location:
 
767
"""Repository branch (format: dirstate or knit)
 
768
Location:
741
769
  shared repository: %s
742
770
  repository branch: branch
743
771
 
767
795
        self.assertEqual('', err)
768
796
 
769
797
        # Show info about repository with revisions
770
 
        out, err = self.runbzr('info repo')
 
798
        out, err = self.run_bzr('info -v repo')
771
799
        self.assertEqualDiff(
772
 
"""Location:
 
800
"""Shared repository (format: dirstate or dirstate-tags or knit)
 
801
Location:
773
802
  shared repository: %s
774
803
 
775
804
Format:
794
823
        # Create shared repository with working trees
795
824
        repo = self.make_repository('repo', shared=True, format=format)
796
825
        repo.set_make_working_trees(True)
797
 
        out, err = self.runbzr('info repo')
 
826
        out, err = self.run_bzr('info -v repo')
798
827
        self.assertEqualDiff(
799
 
"""Location:
 
828
"""Shared repository with trees (format: dirstate or dirstate-tags or knit)
 
829
Location:
800
830
  shared repository: %s
801
831
 
802
832
Format:
820
850
        branch2 = branch1.bzrdir.sprout('repo/branch2').open_branch()
821
851
 
822
852
        # Empty first branch
823
 
        out, err = self.runbzr('info repo/branch1 --verbose')
 
853
        out, err = self.run_bzr('info repo/branch1 --verbose')
824
854
        self.assertEqualDiff(
825
 
"""Location:
826
 
    shared repository: %s
827
 
  repository checkout: branch1
 
855
"""Repository tree (format: knit)
 
856
Location:
 
857
  shared repository: %s
 
858
  repository branch: branch1
828
859
 
829
860
Format:
830
861
       control: Meta directory format 1
862
893
        tree1.commit('commit one')
863
894
        rev = repo.get_revision(branch1.revision_history()[0])
864
895
        datestring_first = format_date(rev.timestamp, rev.timezone)
865
 
        out, err = self.runbzr('info repo/branch1')
 
896
        out, err = self.run_bzr('info -v repo/branch1')
866
897
        self.assertEqualDiff(
867
 
"""Location:
868
 
    shared repository: %s
869
 
  repository checkout: branch1
 
898
"""Repository tree (format: knit)
 
899
Location:
 
900
  shared repository: %s
 
901
  repository branch: branch1
870
902
 
871
903
Format:
872
904
       control: Meta directory format 1
886
918
 
887
919
Branch history:
888
920
         1 revision
 
921
         1 committer
889
922
         0 days old
890
923
   first revision: %s
891
924
  latest revision: %s
904
937
        self.assertEqual('', err)
905
938
 
906
939
        # Out of date second branch
907
 
        out, err = self.runbzr('info repo/branch2 --verbose')
 
940
        out, err = self.run_bzr('info repo/branch2 --verbose')
908
941
        self.assertEqualDiff(
909
 
"""Location:
910
 
    shared repository: %s
911
 
  repository checkout: branch2
 
942
"""Repository tree (format: knit)
 
943
Location:
 
944
  shared repository: %s
 
945
  repository branch: branch2
912
946
 
913
947
Related branches:
914
948
  parent branch: %s
949
983
        # Update second branch
950
984
        tree2 = branch2.bzrdir.open_workingtree()
951
985
        tree2.pull(branch1)
952
 
        out, err = self.runbzr('info repo/branch2')
 
986
        out, err = self.run_bzr('info -v repo/branch2')
953
987
        self.assertEqualDiff(
954
 
"""Location:
955
 
    shared repository: %s
956
 
  repository checkout: branch2
 
988
"""Repository tree (format: knit)
 
989
Location:
 
990
  shared repository: %s
 
991
  repository branch: branch2
957
992
 
958
993
Related branches:
959
994
  parent branch: %s
976
1011
 
977
1012
Branch history:
978
1013
         1 revision
 
1014
         1 committer
979
1015
         0 days old
980
1016
   first revision: %s
981
1017
  latest revision: %s
995
1031
        self.assertEqual('', err)
996
1032
 
997
1033
        # Show info about repository with revisions
998
 
        out, err = self.runbzr('info repo')
 
1034
        out, err = self.run_bzr('info -v repo')
999
1035
        self.assertEqualDiff(
1000
 
"""Location:
 
1036
"""Shared repository with trees (format: dirstate or dirstate-tags or knit)
 
1037
Location:
1001
1038
  shared repository: %s
1002
1039
 
1003
1040
Format:
1025
1062
        # Create shared repository with working trees
1026
1063
        repo = self.make_repository('repo', shared=True, format=format)
1027
1064
        repo.set_make_working_trees(True)
1028
 
        out, err = self.runbzr('info repo')
 
1065
        out, err = self.run_bzr('info -v repo')
1029
1066
        self.assertEqualDiff(
1030
 
"""Location:
 
1067
"""Shared repository with trees (format: dirstate or dirstate-tags or knit)
 
1068
Location:
1031
1069
  shared repository: %s
1032
1070
 
1033
1071
Format:
1048
1086
        control = repo.bzrdir
1049
1087
        branch = control.create_branch()
1050
1088
        control.create_workingtree()
1051
 
        out, err = self.runbzr('info repo')
 
1089
        out, err = self.run_bzr('info -v repo')
1052
1090
        self.assertEqualDiff(
1053
 
"""Location:
1054
 
    shared repository: %s
1055
 
  repository checkout: .
 
1091
"""Repository tree (format: knit)
 
1092
Location:
 
1093
  shared repository: %s
 
1094
  repository branch: .
1056
1095
 
1057
1096
Format:
1058
1097
       control: Meta directory format 1
1072
1111
 
1073
1112
Branch history:
1074
1113
         0 revisions
 
1114
         0 committers
1075
1115
 
1076
1116
Repository:
1077
1117
         0 revisions
1088
1128
        tree_locked=False,
1089
1129
        branch_locked=False, repo_locked=False,
1090
1130
        verbose=False,
1091
 
        light_checkout=True):
1092
 
        """Check the output of info in a light checkout tree.
 
1131
        light_checkout=True,
 
1132
        checkout_root=None):
 
1133
        """Check the output of info in a checkout.
1093
1134
 
1094
1135
        This is not quite a mirror of the info code: rather than using the
1095
1136
        tree being examined to predict output, it uses a bunch of flags which
1115
1156
            args = command_string.split(' ')
1116
1157
            self.run_bzr_error([], 'info', *args)
1117
1158
            return
1118
 
        out, err = self.runbzr('info %s' % command_string)
 
1159
        out, err = self.run_bzr('info %s' % command_string)
 
1160
        description = {
 
1161
            (True, True): 'Lightweight checkout',
 
1162
            (True, False): 'Repository checkout',
 
1163
            (False, True): 'Lightweight checkout',
 
1164
            (False, False): 'Checkout',
 
1165
            }[(shared_repo is not None, light_checkout)]
 
1166
        format = {True: 'dirstate or dirstate-tags',
 
1167
                  False: 'dirstate'}[light_checkout]
1119
1168
        if repo_locked or branch_locked or tree_locked:
1120
1169
            def locked_message(a_bool):
1121
1170
                if a_bool:
1133
1182
                    locked_message(repo_locked)))
1134
1183
        else:
1135
1184
            expected_lock_output = ''
 
1185
        tree_data = ''
 
1186
        extra_space = ''
1136
1187
        if light_checkout:
1137
 
            tree_data = (" light checkout root: %s" %
1138
 
                lco_tree.bzrdir.root_transport.base)
1139
 
        else:
1140
 
            tree_data = ("       checkout root: %s" %
1141
 
                lco_tree.bzrdir.root_transport.base)
 
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))
1142
1194
        if shared_repo is not None:
1143
1195
            branch_data = (
1144
 
                "   shared repository: %s\n"
1145
 
                "   repository branch: branch\n" %
1146
 
                shared_repo.bzrdir.root_transport.base)
 
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))
1147
1200
        elif repo_branch is not None:
1148
1201
            branch_data = (
1149
 
                "  checkout of branch: %s\n" % 
1150
 
                repo_branch.bzrdir.root_transport.base)
 
1202
                "%s  checkout of branch: %s\n" %
 
1203
                (extra_space,
 
1204
                 repo_branch.bzrdir.root_transport.base))
1151
1205
        else:
1152
 
            branch_data = ("  checkout of branch: %s\n" % 
 
1206
            branch_data = ("   checkout of branch: %s\n" %
1153
1207
                lco_tree.branch.bzrdir.root_transport.base)
1154
1208
        
1155
1209
        if verbose:
1158
1212
            verbose_info = ''
1159
1213
            
1160
1214
        self.assertEqualDiff(
1161
 
"""Location:
1162
 
%s
1163
 
%s
 
1215
"""%s (format: %s)
 
1216
Location:
 
1217
%s%s
1164
1218
Format:
1165
1219
       control: Meta directory format 1
1166
1220
  working tree: %s
1183
1237
Repository:
1184
1238
         0 revisions
1185
1239
         0 KiB
1186
 
""" %  (tree_data,
 
1240
""" %  (description,
 
1241
        format,
 
1242
        tree_data,
1187
1243
        branch_data,
1188
1244
        lco_tree._format.get_format_description(),
1189
1245
        lco_tree.branch._format.get_format_description(),
1219
1275
        # W B R
1220
1276
 
1221
1277
        # U U U
1222
 
        self.assertCheckoutStatusOutput('tree/lightcheckout', lco_tree)
 
1278
        self.assertCheckoutStatusOutput('-v tree/lightcheckout', lco_tree,
 
1279
                                        repo_branch=repo_branch,
 
1280
                                        verbose=True, light_checkout=True)
1223
1281
        # U U L
1224
1282
        lco_tree.branch.repository.lock_write()
1225
1283
        try:
1226
 
            self.assertCheckoutStatusOutput('tree/lightcheckout',
1227
 
            lco_tree,
1228
 
            repo_locked=True)
 
1284
            self.assertCheckoutStatusOutput('-v tree/lightcheckout',
 
1285
            lco_tree, repo_branch=repo_branch,
 
1286
            repo_locked=True, verbose=True, light_checkout=True)
1229
1287
        finally:
1230
1288
            lco_tree.branch.repository.unlock()
1231
1289
        # U L L
1232
1290
        lco_tree.branch.lock_write()
1233
1291
        try:
1234
 
            self.assertCheckoutStatusOutput('tree/lightcheckout',
 
1292
            self.assertCheckoutStatusOutput('-v tree/lightcheckout',
1235
1293
            lco_tree,
1236
1294
            branch_locked=True,
1237
 
            repo_locked=True)
 
1295
            repo_locked=True,
 
1296
            repo_branch=repo_branch,
 
1297
            verbose=True)
1238
1298
        finally:
1239
1299
            lco_tree.branch.unlock()
1240
1300
        # L L L
1241
1301
        lco_tree.lock_write()
1242
1302
        try:
1243
 
            self.assertCheckoutStatusOutput('tree/lightcheckout',
1244
 
            lco_tree,
 
1303
            self.assertCheckoutStatusOutput('-v tree/lightcheckout',
 
1304
            lco_tree, repo_branch=repo_branch,
1245
1305
            tree_locked=True,
1246
1306
            branch_locked=True,
1247
 
            repo_locked=True)
 
1307
            repo_locked=True,
 
1308
            verbose=True)
1248
1309
        finally:
1249
1310
            lco_tree.unlock()
1250
1311
        # L L U
1251
1312
        lco_tree.lock_write()
1252
1313
        lco_tree.branch.repository.unlock()
1253
1314
        try:
1254
 
            self.assertCheckoutStatusOutput('tree/lightcheckout',
1255
 
            lco_tree,
 
1315
            self.assertCheckoutStatusOutput('-v tree/lightcheckout',
 
1316
            lco_tree, repo_branch=repo_branch,
1256
1317
            tree_locked=True,
1257
 
            branch_locked=True)
 
1318
            branch_locked=True,
 
1319
            verbose=True)
1258
1320
        finally:
1259
1321
            lco_tree.branch.repository.lock_write()
1260
1322
            lco_tree.unlock()
1262
1324
        lco_tree.lock_write()
1263
1325
        lco_tree.branch.unlock()
1264
1326
        try:
1265
 
            self.assertCheckoutStatusOutput('tree/lightcheckout',
1266
 
            lco_tree,
1267
 
            tree_locked=True)
 
1327
            self.assertCheckoutStatusOutput('-v tree/lightcheckout',
 
1328
            lco_tree, repo_branch=repo_branch,
 
1329
            tree_locked=True,
 
1330
            verbose=True)
1268
1331
        finally:
1269
1332
            lco_tree.branch.lock_write()
1270
1333
            lco_tree.unlock()
1273
1336
        lco_tree.branch.unlock()
1274
1337
        lco_tree.branch.repository.lock_write()
1275
1338
        try:
1276
 
            self.assertCheckoutStatusOutput('tree/lightcheckout',
1277
 
            lco_tree,
 
1339
            self.assertCheckoutStatusOutput('-v tree/lightcheckout',
 
1340
            lco_tree, repo_branch=repo_branch,
1278
1341
            tree_locked=True,
1279
 
            repo_locked=True)
 
1342
            repo_locked=True,
 
1343
            verbose=True)
1280
1344
        finally:
1281
1345
            lco_tree.branch.repository.unlock()
1282
1346
            lco_tree.branch.lock_write()
1285
1349
        lco_tree.branch.lock_write()
1286
1350
        lco_tree.branch.repository.unlock()
1287
1351
        try:
1288
 
            self.assertCheckoutStatusOutput('tree/lightcheckout',
1289
 
            lco_tree,
1290
 
            branch_locked=True)
 
1352
            self.assertCheckoutStatusOutput('-v tree/lightcheckout',
 
1353
            lco_tree, repo_branch=repo_branch,
 
1354
            branch_locked=True,
 
1355
            verbose=True)
1291
1356
        finally:
1292
1357
            lco_tree.branch.repository.lock_write()
1293
1358
            lco_tree.branch.unlock()
1310
1375
        # W B R
1311
1376
 
1312
1377
        # U U U
1313
 
        out, err = self.runbzr('info branch')
 
1378
        out, err = self.run_bzr('info -v branch')
1314
1379
        self.assertEqualDiff(
1315
 
"""Location:
 
1380
"""Standalone tree (format: weave)
 
1381
Location:
1316
1382
  branch root: %s
1317
1383
 
1318
1384
Format:
1333
1399
 
1334
1400
Branch history:
1335
1401
         0 revisions
 
1402
         0 committers
1336
1403
 
1337
1404
Repository:
1338
1405
         0 revisions
1343
1410
        self.assertEqual('', err)
1344
1411
        # L L L
1345
1412
        tree.lock_write()
1346
 
        out, err = self.runbzr('info branch')
 
1413
        out, err = self.run_bzr('info -v branch')
1347
1414
        self.assertEqualDiff(
1348
 
"""Location:
 
1415
"""Standalone tree (format: weave)
 
1416
Location:
1349
1417
  branch root: %s
1350
1418
 
1351
1419
Format:
1366
1434
 
1367
1435
Branch history:
1368
1436
         0 revisions
 
1437
         0 committers
1369
1438
 
1370
1439
Repository:
1371
1440
         0 revisions