/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

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

Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2006 Canonical Ltd
2
 
# -*- coding: utf-8 -*-
 
1
# Copyright (C) 2006, 2007 Canonical Ltd
3
2
#
4
3
# This program is free software; you can redistribute it and/or modify
5
4
# it under the terms of the GNU General Public License as published by
21
20
import sys
22
21
 
23
22
import bzrlib
24
 
from bzrlib import repository
 
23
from bzrlib import (
 
24
    bzrdir,
 
25
    repository,
 
26
    )
25
27
from bzrlib.osutils import format_date
26
28
from bzrlib.tests import TestSkipped
27
29
from bzrlib.tests.blackbox import ExternalBase
42
44
        transport = self.get_transport()
43
45
 
44
46
        # Create initial standalone branch
45
 
        old_format = bzrlib.bzrdir.BzrDirFormat.get_default_format()
46
 
        bzrlib.bzrdir.BzrDirFormat.set_default_format(bzrlib.bzrdir.BzrDirFormat6())
47
 
        tree1 = self.make_branch_and_tree('standalone')
48
 
        bzrlib.bzrdir.BzrDirFormat.set_default_format(old_format)
 
47
        tree1 = self.make_branch_and_tree('standalone', 'weave')
49
48
        self.build_tree(['standalone/a'])
50
49
        tree1.add('a')
51
50
        branch1 = tree1.branch
73
72
Branch history:
74
73
         0 revisions
75
74
 
76
 
Revision store:
 
75
Repository:
77
76
         0 revisions
78
77
         0 KiB
79
78
""" % branch1.bzrdir.root_transport.base, out)
117
116
   first revision: %s
118
117
  latest revision: %s
119
118
 
120
 
Revision store:
 
119
Repository:
121
120
         1 revision
122
121
         %d KiB
123
122
""" % (branch2.bzrdir.root_transport.base,
134
133
        # Branch and bind to standalone, needs upgrade to metadir
135
134
        # (creates backup as unknown)
136
135
        branch1.bzrdir.sprout('bound')
137
 
        knit1_format = bzrlib.bzrdir.BzrDirMetaFormat1()
138
 
        knit1_format.repository_format = repository.RepositoryFormatKnit1()
 
136
        knit1_format = bzrdir.format_registry.make_bzrdir('knit')
139
137
        bzrlib.upgrade.upgrade('bound', knit1_format)
140
138
        branch3 = bzrlib.bzrdir.BzrDir.open('bound').open_branch()
141
139
        branch3.bind(branch1)
152
150
Format:
153
151
       control: Meta directory format 1
154
152
  working tree: %s
155
 
        branch: Branch format 5
 
153
        branch: %s
156
154
    repository: %s
157
155
 
158
156
In the working tree:
171
169
   first revision: %s
172
170
  latest revision: %s
173
171
 
174
 
Revision store:
 
172
Repository:
175
173
         1 revision
176
174
         %d KiB
177
175
""" % (branch3.bzrdir.root_transport.base,
178
176
       branch1.bzrdir.root_transport.base,
179
177
       branch1.bzrdir.root_transport.base,
180
178
       bound_tree._format.get_format_description(),      
 
179
       branch3._format.get_format_description(),
181
180
       branch3.repository._format.get_format_description(),
182
181
       datestring_first, datestring_first,
183
182
       # poking at _revision_store isn't all that clean, but neither is
188
187
        self.assertEqual('', err)
189
188
 
190
189
        # Checkout standalone (same as above, but does not have parent set)
191
 
        old_format = bzrlib.bzrdir.BzrDirFormat.get_default_format()
192
 
        bzrlib.bzrdir.BzrDirFormat.set_default_format(knit1_format)
193
 
        branch4 = bzrlib.bzrdir.BzrDir.create_branch_convenience('checkout')
194
 
        bzrlib.bzrdir.BzrDirFormat.set_default_format(old_format)
 
190
        branch4 = bzrlib.bzrdir.BzrDir.create_branch_convenience('checkout',
 
191
            format=knit1_format)
195
192
        branch4.bind(branch1)
196
193
        branch4.bzrdir.open_workingtree().update()
197
194
        out, err = self.runbzr('info checkout --verbose')
223
220
   first revision: %s
224
221
  latest revision: %s
225
222
 
226
 
Revision store:
 
223
Repository:
227
224
         1 revision
228
225
         %d KiB
229
226
""" % (branch4.bzrdir.root_transport.base,
238
235
        self.assertEqual('', err)
239
236
 
240
237
        # Lightweight checkout (same as above, different branch and repository)
241
 
        old_format = bzrlib.bzrdir.BzrDirFormat.get_default_format()
242
 
        bzrlib.bzrdir.BzrDirFormat.set_default_format(bzrlib.bzrdir.BzrDirMetaFormat1())
243
 
        transport.mkdir('lightcheckout')
244
 
        dir5 = bzrlib.bzrdir.BzrDirMetaFormat1().initialize('lightcheckout')
245
 
        bzrlib.branch.BranchReferenceFormat().initialize(dir5, branch1)
246
 
        dir5.create_workingtree()
247
 
        tree5 = dir5.open_workingtree()
248
 
        bzrlib.bzrdir.BzrDirFormat.set_default_format(old_format)
 
238
        tree5 = branch1.create_checkout('lightcheckout', lightweight=True)
249
239
        branch5 = tree5.branch
250
240
        out, err = self.runbzr('info lightcheckout')
251
241
        self.assertEqualDiff(
255
245
 
256
246
Format:
257
247
       control: Meta directory format 1
258
 
  working tree: Working tree format 3
 
248
  working tree: Working tree format 4
259
249
        branch: Branch format 4
260
250
    repository: Weave repository format 6
261
251
 
275
265
   first revision: %s
276
266
  latest revision: %s
277
267
 
278
 
Revision store:
 
268
Repository:
279
269
         1 revision
280
270
         0 KiB
281
271
""" % (tree5.bzrdir.root_transport.base,
323
313
   first revision: %s
324
314
  latest revision: %s
325
315
 
326
 
Revision store:
 
316
Repository:
327
317
         1 revision
328
318
         0 KiB
329
319
""" % (branch2.bzrdir.root_transport.base,
367
357
   first revision: %s
368
358
  latest revision: %s
369
359
 
370
 
Revision store:
 
360
Repository:
371
361
         1 revision
372
362
         %d KiB
373
363
""" % (branch3.bzrdir.root_transport.base,
413
403
   first revision: %s
414
404
  latest revision: %s
415
405
 
416
 
Revision store:
 
406
Repository:
417
407
         1 revision
418
408
         %d KiB
419
409
""" % (branch4.bzrdir.root_transport.base,
436
426
 
437
427
Format:
438
428
       control: Meta directory format 1
439
 
  working tree: Working tree format 3
 
429
  working tree: Working tree format 4
440
430
        branch: Branch format 4
441
431
    repository: Weave repository format 6
442
432
 
459
449
   first revision: %s
460
450
  latest revision: %s
461
451
 
462
 
Revision store:
 
452
Repository:
463
453
         2 revisions
464
454
         0 KiB
465
455
""" % (tree5.bzrdir.root_transport.base,
470
460
 
471
461
    def test_info_standalone_no_tree(self):
472
462
        # create standalone branch without a working tree
 
463
        format = bzrdir.format_registry.make_bzrdir('default')
473
464
        branch = self.make_branch('branch')
474
465
        repo = branch.repository
475
466
        out, err = self.runbzr('info branch')
479
470
 
480
471
Format:
481
472
       control: Meta directory format 1
482
 
        branch: Branch format 5
 
473
        branch: %s
483
474
    repository: %s
484
475
 
485
476
Branch history:
486
477
         0 revisions
487
478
 
488
 
Revision store:
 
479
Repository:
489
480
         0 revisions
490
481
         0 KiB
491
482
""" % (branch.bzrdir.root_transport.base,
492
 
       repo._format.get_format_description(),
 
483
       format.get_branch_format().get_format_description(),
 
484
       format.repository_format.get_format_description(),
493
485
       ), out)
494
486
        self.assertEqual('', err)
495
487
 
496
488
    def test_info_shared_repository(self):
497
 
        old_format = bzrlib.bzrdir.BzrDirFormat.get_default_format()
498
 
        bzrlib.bzrdir.BzrDirFormat.set_default_format(bzrlib.bzrdir.BzrDirMetaFormat1())
 
489
        format = bzrdir.format_registry.make_bzrdir('knit')
499
490
        transport = self.get_transport()
500
491
 
501
492
        # Create shared repository
502
 
        repo = self.make_repository('repo', shared=True)
 
493
        repo = self.make_repository('repo', shared=True, format=format)
503
494
        repo.set_make_working_trees(False)
504
495
        out, err = self.runbzr('info repo')
505
496
        self.assertEqualDiff(
510
501
       control: Meta directory format 1
511
502
    repository: %s
512
503
 
513
 
Revision store:
 
504
Repository:
514
505
         0 revisions
515
506
         0 KiB
516
507
""" % (repo.bzrdir.root_transport.base,
517
 
       repo._format.get_format_description(),
 
508
       format.repository_format.get_format_description(),
518
509
       ), out)
519
510
        self.assertEqual('', err)
520
511
 
521
512
        # Create branch inside shared repository
522
513
        repo.bzrdir.root_transport.mkdir('branch')
523
 
        branch1 = repo.bzrdir.create_branch_convenience('repo/branch')
 
514
        branch1 = repo.bzrdir.create_branch_convenience('repo/branch',
 
515
            format=format)
524
516
        out, err = self.runbzr('info repo/branch')
525
517
        self.assertEqualDiff(
526
518
"""Location:
529
521
 
530
522
Format:
531
523
       control: Meta directory format 1
532
 
        branch: Branch format 5
 
524
        branch: %s
533
525
    repository: %s
534
526
 
535
527
Branch history:
536
528
         0 revisions
537
529
 
538
 
Revision store:
 
530
Repository:
539
531
         0 revisions
540
532
         0 KiB
541
533
""" % (repo.bzrdir.root_transport.base,
542
 
       repo._format.get_format_description(),
 
534
       format.get_branch_format().get_format_description(),
 
535
       format.repository_format.get_format_description(),
543
536
       ), out)
544
537
        self.assertEqual('', err)
545
538
 
546
539
        # Create lightweight checkout
547
540
        transport.mkdir('tree')
548
541
        transport.mkdir('tree/lightcheckout')
549
 
        dir2 = bzrlib.bzrdir.BzrDirMetaFormat1().initialize('tree/lightcheckout')
550
 
        bzrlib.branch.BranchReferenceFormat().initialize(dir2, branch1)
551
 
        dir2.create_workingtree()
552
 
        tree2 = dir2.open_workingtree()
 
542
        tree2 = branch1.create_checkout('tree/lightcheckout', 
 
543
            lightweight=True)
553
544
        branch2 = tree2.branch
554
 
        self.assertCheckoutStatusOutput('tree/lightcheckout', tree2, shared_repo=repo)
 
545
        self.assertCheckoutStatusOutput('tree/lightcheckout', tree2, 
 
546
                   shared_repo=repo)
555
547
 
556
548
        # Create normal checkout
557
549
        tree3 = branch1.create_checkout('tree/checkout')
573
565
 
574
566
Format:
575
567
       control: Meta directory format 1
576
 
  working tree: Working tree format 3
577
 
        branch: Branch format 5
 
568
  working tree: Working tree format 4
 
569
        branch: %s
578
570
    repository: %s
579
571
 
580
572
In the working tree:
594
586
   first revision: %s
595
587
  latest revision: %s
596
588
 
597
 
Revision store:
 
589
Repository:
598
590
         1 revision
599
591
         %d KiB
600
592
""" % (tree2.bzrdir.root_transport.base,
601
593
       repo.bzrdir.root_transport.base,
602
 
       repo._format.get_format_description(),
 
594
       format.get_branch_format().get_format_description(),
 
595
       format.repository_format.get_format_description(),
603
596
       datestring_first, datestring_first,
604
597
       # poking at _revision_store isn't all that clean, but neither is
605
598
       # having the ui test dependent on the exact overhead of a given store.
616
609
 
617
610
Format:
618
611
       control: Meta directory format 1
619
 
  working tree: Working tree format 3
620
 
        branch: Branch format 5
 
612
  working tree: Working tree format 4
 
613
        branch: %s
621
614
    repository: %s
622
615
 
623
616
Branch is out of date: missing 1 revision.
635
628
Branch history:
636
629
         0 revisions
637
630
 
638
 
Revision store:
 
631
Repository:
639
632
         0 revisions
640
633
         0 KiB
641
634
""" % (tree3.bzrdir.root_transport.base,
642
635
       branch1.bzrdir.root_transport.base,
643
 
       repo._format.get_format_description(),
 
636
       format.get_branch_format().get_format_description(),
 
637
       format.repository_format.get_format_description(),
644
638
       ), out)
645
639
        self.assertEqual('', err)
646
640
 
656
650
 
657
651
Format:
658
652
       control: Meta directory format 1
659
 
  working tree: Working tree format 3
660
 
        branch: Branch format 5
 
653
  working tree: Working tree format 4
 
654
        branch: %s
661
655
    repository: %s
662
656
 
663
657
In the working tree:
677
671
   first revision: %s
678
672
  latest revision: %s
679
673
 
680
 
Revision store:
 
674
Repository:
681
675
         1 revision
682
676
         %d KiB
683
677
""" % (tree3.bzrdir.root_transport.base, branch1.bzrdir.root_transport.base,
684
 
       repo._format.get_format_description(),
 
678
       format.get_branch_format().get_format_description(),
 
679
       format.repository_format.get_format_description(),
685
680
       datestring_first, datestring_first,
686
681
       # poking at _revision_store isn't all that clean, but neither is
687
682
       # having the ui test dependent on the exact overhead of a given store.
702
697
 
703
698
Format:
704
699
       control: Meta directory format 1
705
 
  working tree: Working tree format 3
706
 
        branch: Branch format 5
 
700
  working tree: Working tree format 4
 
701
        branch: %s
707
702
    repository: %s
708
703
 
709
704
Working tree is out of date: missing 1 revision.
725
720
   first revision: %s
726
721
  latest revision: %s
727
722
 
728
 
Revision store:
 
723
Repository:
729
724
         2 revisions
730
725
         %d KiB
731
726
""" % (tree2.bzrdir.root_transport.base,
732
727
       repo.bzrdir.root_transport.base,
733
 
       repo._format.get_format_description(),
 
728
       format.get_branch_format().get_format_description(),
 
729
       format.repository_format.get_format_description(),
734
730
       datestring_first, datestring_last,
735
731
       # poking at _revision_store isn't all that clean, but neither is
736
732
       # having the ui test dependent on the exact overhead of a given store.
747
743
 
748
744
Format:
749
745
       control: Meta directory format 1
750
 
        branch: Branch format 5
 
746
        branch: %s
751
747
    repository: %s
752
748
 
753
749
Branch history:
757
753
   first revision: %s
758
754
  latest revision: %s
759
755
 
760
 
Revision store:
 
756
Repository:
761
757
         2 revisions
762
758
         %d KiB
763
759
""" % (repo.bzrdir.root_transport.base,
764
 
       repo._format.get_format_description(),
 
760
       format.get_branch_format().get_format_description(),
 
761
       format.repository_format.get_format_description(),
765
762
       datestring_first, datestring_last,
766
763
       # poking at _revision_store isn't all that clean, but neither is
767
764
       # having the ui test dependent on the exact overhead of a given store.
779
776
       control: Meta directory format 1
780
777
    repository: %s
781
778
 
782
 
Revision store:
 
779
Repository:
783
780
         2 revisions
784
781
         %d KiB
785
782
""" % (repo.bzrdir.root_transport.base,
786
 
       repo._format.get_format_description(),
 
783
       format.repository_format.get_format_description(),
787
784
       # poking at _revision_store isn't all that clean, but neither is
788
785
       # having the ui test dependent on the exact overhead of a given store.
789
786
       repo._revision_store.total_size(repo.get_transaction())[1] / 1024,
790
787
       ), out)
791
788
        self.assertEqual('', err)
792
789
 
793
 
        bzrlib.bzrdir.BzrDirFormat.set_default_format(old_format)
794
 
 
795
790
    def test_info_shared_repository_with_trees(self):
796
 
        old_format = bzrlib.bzrdir.BzrDirFormat.get_default_format()
797
 
        bzrlib.bzrdir.BzrDirFormat.set_default_format(bzrlib.bzrdir.BzrDirMetaFormat1())
 
791
        format = bzrdir.format_registry.make_bzrdir('knit')
798
792
        transport = self.get_transport()
799
793
 
800
794
        # Create shared repository with working trees
801
 
        repo = self.make_repository('repo', shared=True)
 
795
        repo = self.make_repository('repo', shared=True, format=format)
802
796
        repo.set_make_working_trees(True)
803
797
        out, err = self.runbzr('info repo')
804
798
        self.assertEqualDiff(
811
805
 
812
806
Create working tree for new branches inside the repository.
813
807
 
814
 
Revision store:
 
808
Repository:
815
809
         0 revisions
816
810
         0 KiB
817
811
""" % (repo.bzrdir.root_transport.base,
818
 
       repo._format.get_format_description(),
 
812
       format.repository_format.get_format_description(),
819
813
       ), out)
820
814
        self.assertEqual('', err)
821
815
 
822
816
        # Create two branches
823
817
        repo.bzrdir.root_transport.mkdir('branch1')
824
 
        branch1 = repo.bzrdir.create_branch_convenience('repo/branch1')
 
818
        branch1 = repo.bzrdir.create_branch_convenience('repo/branch1',
 
819
            format=format)
825
820
        branch2 = branch1.bzrdir.sprout('repo/branch2').open_branch()
826
821
 
827
822
        # Empty first branch
834
829
Format:
835
830
       control: Meta directory format 1
836
831
  working tree: Working tree format 3
837
 
        branch: Branch format 5
 
832
        branch: %s
838
833
    repository: %s
839
834
 
840
835
In the working tree:
851
846
         0 revisions
852
847
         0 committers
853
848
 
854
 
Revision store:
 
849
Repository:
855
850
         0 revisions
856
851
         0 KiB
857
852
""" % (repo.bzrdir.root_transport.base,
858
 
       repo._format.get_format_description(),
 
853
       format.get_branch_format().get_format_description(),
 
854
       format.repository_format.get_format_description(),
859
855
       ), out)
860
856
        self.assertEqual('', err)
861
857
 
875
871
Format:
876
872
       control: Meta directory format 1
877
873
  working tree: Working tree format 3
878
 
        branch: Branch format 5
 
874
        branch: %s
879
875
    repository: %s
880
876
 
881
877
In the working tree:
894
890
   first revision: %s
895
891
  latest revision: %s
896
892
 
897
 
Revision store:
 
893
Repository:
898
894
         1 revision
899
895
         %d KiB
900
896
""" % (repo.bzrdir.root_transport.base,
901
 
       repo._format.get_format_description(),
 
897
       format.get_branch_format().get_format_description(),
 
898
       format.repository_format.get_format_description(),
902
899
       datestring_first, datestring_first,
903
900
       # poking at _revision_store isn't all that clean, but neither is
904
901
       # having the ui test dependent on the exact overhead of a given store.
919
916
Format:
920
917
       control: Meta directory format 1
921
918
  working tree: Working tree format 3
922
 
        branch: Branch format 5
 
919
        branch: %s
923
920
    repository: %s
924
921
 
925
922
In the working tree:
936
933
         0 revisions
937
934
         0 committers
938
935
 
939
 
Revision store:
 
936
Repository:
940
937
         1 revision
941
938
         %d KiB
942
939
""" % (repo.bzrdir.root_transport.base,
943
940
       branch1.bzrdir.root_transport.base,
944
 
       repo._format.get_format_description(),
 
941
       format.get_branch_format().get_format_description(),
 
942
       format.repository_format.get_format_description(),
945
943
       # poking at _revision_store isn't all that clean, but neither is
946
944
       # having the ui test dependent on the exact overhead of a given store.
947
945
       repo._revision_store.total_size(repo.get_transaction())[1] / 1024,
963
961
Format:
964
962
       control: Meta directory format 1
965
963
  working tree: Working tree format 3
966
 
        branch: Branch format 5
 
964
        branch: %s
967
965
    repository: %s
968
966
 
969
967
In the working tree:
982
980
   first revision: %s
983
981
  latest revision: %s
984
982
 
985
 
Revision store:
 
983
Repository:
986
984
         1 revision
987
985
         %d KiB
988
986
""" % (repo.bzrdir.root_transport.base,
989
987
       branch1.bzrdir.root_transport.base,
990
 
       repo._format.get_format_description(),
 
988
       format.get_branch_format().get_format_description(),
 
989
       format.repository_format.get_format_description(),
991
990
       datestring_first, datestring_first,
992
991
       # poking at _revision_store isn't all that clean, but neither is
993
992
       # having the ui test dependent on the exact overhead of a given store.
1007
1006
 
1008
1007
Create working tree for new branches inside the repository.
1009
1008
 
1010
 
Revision store:
 
1009
Repository:
1011
1010
         1 revision
1012
1011
         %d KiB
1013
1012
""" % (repo.bzrdir.root_transport.base,
1014
 
       repo._format.get_format_description(),
 
1013
       format.repository_format.get_format_description(),
1015
1014
       # poking at _revision_store isn't all that clean, but neither is
1016
1015
       # having the ui test dependent on the exact overhead of a given store.
1017
1016
       repo._revision_store.total_size(repo.get_transaction())[1] / 1024,
1018
1017
       ),
1019
1018
       out)
1020
1019
        self.assertEqual('', err)
1021
 
 
1022
 
        bzrlib.bzrdir.BzrDirFormat.set_default_format(old_format)
1023
1020
    
1024
1021
    def test_info_shared_repository_with_tree_in_root(self):
1025
 
        old_format = bzrlib.bzrdir.BzrDirFormat.get_default_format()
1026
 
        bzrlib.bzrdir.BzrDirFormat.set_default_format(bzrlib.bzrdir.BzrDirMetaFormat1())
 
1022
        format = bzrdir.format_registry.make_bzrdir('knit')
1027
1023
        transport = self.get_transport()
1028
1024
 
1029
1025
        # Create shared repository with working trees
1030
 
        repo = self.make_repository('repo', shared=True)
 
1026
        repo = self.make_repository('repo', shared=True, format=format)
1031
1027
        repo.set_make_working_trees(True)
1032
1028
        out, err = self.runbzr('info repo')
1033
1029
        self.assertEqualDiff(
1040
1036
 
1041
1037
Create working tree for new branches inside the repository.
1042
1038
 
1043
 
Revision store:
 
1039
Repository:
1044
1040
         0 revisions
1045
1041
         0 KiB
1046
1042
""" % (repo.bzrdir.root_transport.base,
1047
 
       repo._format.get_format_description(),
 
1043
       format.repository_format.get_format_description(),
1048
1044
       ), out)
1049
1045
        self.assertEqual('', err)
1050
1046
 
1061
1057
Format:
1062
1058
       control: Meta directory format 1
1063
1059
  working tree: Working tree format 3
1064
 
        branch: Branch format 5
 
1060
        branch: %s
1065
1061
    repository: %s
1066
1062
 
1067
1063
In the working tree:
1077
1073
Branch history:
1078
1074
         0 revisions
1079
1075
 
1080
 
Revision store:
 
1076
Repository:
1081
1077
         0 revisions
1082
1078
         0 KiB
1083
1079
""" % (repo.bzrdir.root_transport.base,
1084
 
       repo._format.get_format_description(),
 
1080
       format.get_branch_format().get_format_description(),
 
1081
       format.repository_format.get_format_description(),
1085
1082
       ), out)
1086
1083
        self.assertEqual('', err)
1087
1084
 
1088
 
        bzrlib.bzrdir.BzrDirFormat.set_default_format(old_format)
1089
 
 
1090
1085
    def assertCheckoutStatusOutput(self, 
1091
1086
        command_string, lco_tree, shared_repo=None,
1092
1087
        repo_branch=None,
1113
1108
        :param repo_locked: If true, expect the repository to be locked.
1114
1109
        :param verbose: If true, expect verbose output
1115
1110
        """
 
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).
 
1114
            # This should be removed when the locking errors are fixed.
 
1115
            args = command_string.split(' ')
 
1116
            self.run_bzr_error([], 'info', *args)
 
1117
            return
1116
1118
        out, err = self.runbzr('info %s' % command_string)
1117
1119
        if repo_locked or branch_locked or tree_locked:
1118
1120
            def locked_message(a_bool):
1162
1164
Format:
1163
1165
       control: Meta directory format 1
1164
1166
  working tree: %s
1165
 
        branch: Branch format 5
 
1167
        branch: %s
1166
1168
    repository: %s
1167
1169
%s
1168
1170
In the working tree:
1178
1180
Branch history:
1179
1181
         0 revisions
1180
1182
%s
1181
 
Revision store:
 
1183
Repository:
1182
1184
         0 revisions
1183
1185
         0 KiB
1184
1186
""" %  (tree_data,
1185
1187
        branch_data,
1186
1188
        lco_tree._format.get_format_description(),
 
1189
        lco_tree.branch._format.get_format_description(),
1187
1190
        lco_tree.branch.repository._format.get_format_description(),
1188
1191
        expected_lock_output,
1189
1192
        verbose_info,
1289
1292
            lco_tree.branch.repository.lock_write()
1290
1293
            lco_tree.branch.unlock()
1291
1294
 
 
1295
        if sys.platform == 'win32':
 
1296
            self.knownFailure('Win32 cannot run "bzr info"'
 
1297
                              ' when the tree is locked.')
 
1298
 
1292
1299
    def test_info_locking_oslocks(self):
1293
1300
        if sys.platform == "win32":
1294
1301
            raise TestSkipped("don't use oslocks on win32 in unix manner")
1327
1334
Branch history:
1328
1335
         0 revisions
1329
1336
 
1330
 
Revision store:
 
1337
Repository:
1331
1338
         0 revisions
1332
1339
         0 KiB
1333
1340
""" % (tree.bzrdir.root_transport.base,
1360
1367
Branch history:
1361
1368
         0 revisions
1362
1369
 
1363
 
Revision store:
 
1370
Repository:
1364
1371
         0 revisions
1365
1372
         0 KiB
1366
1373
""" % (tree.bzrdir.root_transport.base,