~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-04-26 21:11:03 UTC
  • mfrom: (2447.1.7 bundle_empty_properties)
  • Revision ID: pqm@pqm.ubuntu.com-20070426211103-h84prqh7a4ad3ez2
(John Arbash Meinel) Fix bug #109613 by teaching Bundle how to properly read/write revision properties with no value.

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