~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Alexander Belchenko
  • Date: 2006-07-30 16:43:12 UTC
  • mto: (1711.2.111 jam-integration)
  • mto: This revision was merged to the branch mainline in revision 1906.
  • Revision ID: bialix@ukr.net-20060730164312-b025fd3ff0cee59e
rename  gpl.txt => COPYING.txt

Show diffs side-by-side

added added

removed removed

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