~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Matt Nordhoff
  • Date: 2009-04-04 02:50:01 UTC
  • mfrom: (4253 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4256.
  • Revision ID: mnordhoff@mattnordhoff.com-20090404025001-z1403k0tatmc8l91
Merge bzr.dev, fixing conflicts.

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
#
13
13
# You should have received a copy of the GNU General Public License
14
14
# along with this program; if not, write to the Free Software
15
 
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
17
 
18
18
"""Tests for the info command of bzr."""
61
61
""", out)
62
62
        self.assertEqual('', err)
63
63
 
 
64
        # Standalone branch - verbose mode
64
65
        out, err = self.run_bzr('info standalone -v')
65
66
        self.assertEqualDiff(
66
67
"""Standalone tree (format: weave)
85
86
 
86
87
Branch history:
87
88
         0 revisions
 
89
 
 
90
Repository:
 
91
         0 revisions
 
92
""", out)
 
93
        self.assertEqual('', err)
 
94
 
 
95
        # Standalone branch - really verbose mode
 
96
        out, err = self.run_bzr('info standalone -vv')
 
97
        self.assertEqualDiff(
 
98
"""Standalone tree (format: weave)
 
99
Location:
 
100
  branch root: standalone
 
101
 
 
102
Format:
 
103
       control: All-in-one format 6
 
104
  working tree: Working tree format 2
 
105
        branch: Branch format 4
 
106
    repository: Weave repository format 6
 
107
 
 
108
In the working tree:
 
109
         0 unchanged
 
110
         0 modified
 
111
         1 added
 
112
         0 removed
 
113
         0 renamed
 
114
         0 unknown
 
115
         0 ignored
 
116
         0 versioned subdirectories
 
117
 
 
118
Branch history:
 
119
         0 revisions
88
120
         0 committers
89
121
 
90
122
Repository:
139
171
 
140
172
Branch history:
141
173
         1 revision
142
 
         1 committer
143
174
         0 days old
144
175
   first revision: %s
145
176
  latest revision: %s
186
217
 
187
218
Branch history:
188
219
         1 revision
189
 
         1 committer
190
220
         0 days old
191
221
   first revision: %s
192
222
  latest revision: %s
230
260
 
231
261
Branch history:
232
262
         1 revision
233
 
         1 committer
234
263
         0 days old
235
264
   first revision: %s
236
265
  latest revision: %s
273
302
 
274
303
Branch history:
275
304
         1 revision
276
 
         1 committer
277
305
         0 days old
278
306
   first revision: %s
279
307
  latest revision: %s
319
347
 
320
348
Branch history:
321
349
         1 revision
322
 
         1 committer
323
350
         0 days old
324
351
   first revision: %s
325
352
  latest revision: %s
361
388
 
362
389
Branch history:
363
390
         1 revision
364
 
         1 committer
365
391
         0 days old
366
392
   first revision: %s
367
393
  latest revision: %s
401
427
 
402
428
Branch history:
403
429
         1 revision
404
 
         1 committer
405
430
         0 days old
406
431
   first revision: %s
407
432
  latest revision: %s
444
469
 
445
470
Branch history:
446
471
         2 revisions
447
 
         1 committer
448
472
         0 days old
449
473
   first revision: %s
450
474
  latest revision: %s
472
496
 
473
497
Branch history:
474
498
         0 revisions
475
 
         0 committers
476
499
 
477
500
Repository:
478
501
         0 revisions
523
546
 
524
547
Branch history:
525
548
         0 revisions
526
 
         0 committers
527
549
 
528
550
Repository:
529
551
         0 revisions
535
557
        # Create lightweight checkout
536
558
        transport.mkdir('tree')
537
559
        transport.mkdir('tree/lightcheckout')
538
 
        tree2 = branch1.create_checkout('tree/lightcheckout', 
 
560
        tree2 = branch1.create_checkout('tree/lightcheckout',
539
561
            lightweight=True)
540
562
        branch2 = tree2.branch
541
563
        self.assertCheckoutStatusOutput('-v tree/lightcheckout', tree2,
581
603
 
582
604
Branch history:
583
605
         1 revision
584
 
         1 committer
585
606
         0 days old
586
607
   first revision: %s
587
608
  latest revision: %s
622
643
 
623
644
Branch history:
624
645
         0 revisions
625
 
         0 committers
626
646
 
627
647
Repository:
628
648
         0 revisions
660
680
 
661
681
Branch history:
662
682
         1 revision
663
 
         1 committer
664
683
         0 days old
665
684
   first revision: %s
666
685
  latest revision: %s
708
727
 
709
728
Branch history:
710
729
         2 revisions
711
 
         1 committer
712
730
         0 days old
713
731
   first revision: %s
714
732
  latest revision: %s
736
754
 
737
755
Branch history:
738
756
         2 revisions
739
 
         1 committer
740
757
         0 days old
741
758
   first revision: %s
742
759
  latest revision: %s
823
840
 
824
841
Branch history:
825
842
         0 revisions
826
 
         0 committers
827
843
 
828
844
Repository:
829
845
         0 revisions
864
880
 
865
881
Branch history:
866
882
         1 revision
867
 
         1 committer
868
883
         0 days old
869
884
   first revision: %s
870
885
  latest revision: %s
906
921
 
907
922
Branch history:
908
923
         0 revisions
909
 
         0 committers
910
924
 
911
925
Repository:
912
926
         1 revision
946
960
 
947
961
Branch history:
948
962
         1 revision
949
 
         1 committer
950
963
         0 days old
951
964
   first revision: %s
952
965
  latest revision: %s
978
991
       ),
979
992
       out)
980
993
        self.assertEqual('', err)
981
 
    
 
994
 
982
995
    def test_info_shared_repository_with_tree_in_root(self):
983
996
        format = bzrdir.format_registry.make_bzrdir('knit')
984
997
        transport = self.get_transport()
1033
1046
 
1034
1047
Branch history:
1035
1048
         0 revisions
1036
 
         0 committers
1037
1049
 
1038
1050
Repository:
1039
1051
         0 revisions
1057
1069
        allow us, the test writers, to document what *should* be present in
1058
1070
        the output. Removing this separation would remove the value of the
1059
1071
        tests.
1060
 
        
 
1072
 
1061
1073
        :param path: the path to the light checkout.
1062
1074
        :param lco_tree: the tree object for the light checkout.
1063
1075
        :param shared_repo: A shared repository is in use, expect that in
1071
1083
            actually locked then this parameter is overridden. This is because
1072
1084
            pack repositories do not have any public API for obtaining an
1073
1085
            exclusive repository wide lock.
1074
 
        :param verbose: If true, expect verbose output
 
1086
        :param verbose: verbosity level: 2 or higher to show committers
1075
1087
        """
1076
1088
        def friendly_location(url):
1077
1089
            path = urlutils.unescape_for_display(url, 'ascii')
1143
1155
        else:
1144
1156
            branch_data = ("   checkout of branch: %s\n" %
1145
1157
                lco_tree.branch.bzrdir.root_transport.base)
1146
 
        
1147
 
        if verbose:
 
1158
 
 
1159
        if verbose >= 2:
1148
1160
            verbose_info = '         0 committers\n'
1149
1161
        else:
1150
1162
            verbose_info = ''
1151
 
            
 
1163
 
1152
1164
        self.assertEqualDiff(
1153
1165
"""%s (format: %s)
1154
1166
Location:
1336
1348
 
1337
1349
Branch history:
1338
1350
         0 revisions
1339
 
         0 committers
1340
1351
 
1341
1352
Repository:
1342
1353
         0 revisions
1369
1380
 
1370
1381
Branch history:
1371
1382
         0 revisions
1372
 
         0 committers
1373
1383
 
1374
1384
Repository:
1375
1385
         0 revisions