~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Marius Kruger
  • Date: 2007-06-27 18:48:10 UTC
  • mfrom: (2557 +trunk)
  • mto: (2605.1.1 rm-renamed)
  • mto: This revision was merged to the branch mainline in revision 2609.
  • Revision ID: marius.kruger@enerweb.co.za-20070627184810-4jq1y5f20xafow9w
Merge with bzr.dev

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 -v')
 
51
        out, err = self.run_bzr('info standalone -v')
52
52
        self.assertEqualDiff(
53
53
"""Standalone tree (format: weave)
54
54
Location:
86
86
        # Branch standalone with push location
87
87
        branch2 = branch1.bzrdir.sprout('branch').open_branch()
88
88
        branch2.set_push_location(branch1.bzrdir.root_transport.base)
89
 
        out, err = self.runbzr('info branch --verbose')
 
89
        out, err = self.run_bzr('info branch --verbose')
90
90
        self.assertEqualDiff(
91
91
"""Standalone tree (format: weave)
92
92
Location:
141
141
        branch3 = bzrlib.bzrdir.BzrDir.open('bound').open_branch()
142
142
        branch3.bind(branch1)
143
143
        bound_tree = branch3.bzrdir.open_workingtree()
144
 
        out, err = self.runbzr('info -v bound')
 
144
        out, err = self.run_bzr('info -v bound')
145
145
        self.assertEqualDiff(
146
146
"""Checkout (format: knit)
147
147
Location:
196
196
            format=knit1_format)
197
197
        branch4.bind(branch1)
198
198
        branch4.bzrdir.open_workingtree().update()
199
 
        out, err = self.runbzr('info checkout --verbose')
 
199
        out, err = self.run_bzr('info checkout --verbose')
200
200
        self.assertEqualDiff(
201
201
"""Checkout (format: knit)
202
202
Location:
243
243
        # Lightweight checkout (same as above, different branch and repository)
244
244
        tree5 = branch1.create_checkout('lightcheckout', lightweight=True)
245
245
        branch5 = tree5.branch
246
 
        out, err = self.runbzr('info -v lightcheckout')
 
246
        out, err = self.run_bzr('info -v lightcheckout')
247
247
        self.assertEqualDiff(
248
248
"""Lightweight checkout (format: dirstate or dirstate-tags)
249
249
Location:
290
290
        datestring_last = format_date(rev.timestamp, rev.timezone)
291
291
 
292
292
        # Out of date branched standalone branch will not be detected
293
 
        out, err = self.runbzr('info -v branch')
 
293
        out, err = self.run_bzr('info -v branch')
294
294
        self.assertEqualDiff(
295
295
"""Standalone tree (format: weave)
296
296
Location:
334
334
        self.assertEqual('', err)
335
335
 
336
336
        # Out of date bound branch
337
 
        out, err = self.runbzr('info -v bound')
 
337
        out, err = self.run_bzr('info -v bound')
338
338
        self.assertEqualDiff(
339
339
"""Checkout (format: knit)
340
340
Location:
385
385
        self.assertEqual('', err)
386
386
 
387
387
        # Out of date checkout
388
 
        out, err = self.runbzr('info -v checkout')
 
388
        out, err = self.run_bzr('info -v checkout')
389
389
        self.assertEqualDiff(
390
390
"""Checkout (format: knit)
391
391
Location:
432
432
        self.assertEqual('', err)
433
433
 
434
434
        # Out of date lightweight checkout
435
 
        out, err = self.runbzr('info lightcheckout --verbose')
 
435
        out, err = self.run_bzr('info lightcheckout --verbose')
436
436
        self.assertEqualDiff(
437
437
"""Lightweight checkout (format: dirstate or dirstate-tags)
438
438
Location:
478
478
        format = bzrdir.format_registry.make_bzrdir('default')
479
479
        branch = self.make_branch('branch')
480
480
        repo = branch.repository
481
 
        out, err = self.runbzr('info branch -v')
 
481
        out, err = self.run_bzr('info branch -v')
482
482
        self.assertEqualDiff(
483
483
"""Standalone branch (format: dirstate or knit)
484
484
Location:
509
509
        # Create shared repository
510
510
        repo = self.make_repository('repo', shared=True, format=format)
511
511
        repo.set_make_working_trees(False)
512
 
        out, err = self.runbzr('info -v repo')
 
512
        out, err = self.run_bzr('info -v repo')
513
513
        self.assertEqualDiff(
514
514
"""Shared repository (format: dirstate or dirstate-tags or knit)
515
515
Location:
531
531
        repo.bzrdir.root_transport.mkdir('branch')
532
532
        branch1 = repo.bzrdir.create_branch_convenience('repo/branch',
533
533
            format=format)
534
 
        out, err = self.runbzr('info -v repo/branch')
 
534
        out, err = self.run_bzr('info -v repo/branch')
535
535
        self.assertEqualDiff(
536
536
"""Repository branch (format: dirstate or knit)
537
537
Location:
576
576
        tree2.commit('commit one')
577
577
        rev = repo.get_revision(branch2.revision_history()[0])
578
578
        datestring_first = format_date(rev.timestamp, rev.timezone)
579
 
        out, err = self.runbzr('info tree/lightcheckout --verbose')
 
579
        out, err = self.run_bzr('info tree/lightcheckout --verbose')
580
580
        self.assertEqualDiff(
581
581
"""Lightweight checkout (format: dirstate or dirstate-tags)
582
582
Location:
623
623
        self.assertEqual('', err)
624
624
 
625
625
        # Out of date checkout
626
 
        out, err = self.runbzr('info -v tree/checkout')
 
626
        out, err = self.run_bzr('info -v tree/checkout')
627
627
        self.assertEqualDiff(
628
628
"""Checkout (format: dirstate)
629
629
Location:
666
666
        tree3.update()
667
667
        self.build_tree(['tree/checkout/b'])
668
668
        tree3.add('b')
669
 
        out, err = self.runbzr('info tree/checkout --verbose')
 
669
        out, err = self.run_bzr('info tree/checkout --verbose')
670
670
        self.assertEqualDiff(
671
671
"""Checkout (format: dirstate)
672
672
Location:
713
713
        # Out of date lightweight checkout
714
714
        rev = repo.get_revision(branch1.revision_history()[-1])
715
715
        datestring_last = format_date(rev.timestamp, rev.timezone)
716
 
        out, err = self.runbzr('info tree/lightcheckout --verbose')
 
716
        out, err = self.run_bzr('info tree/lightcheckout --verbose')
717
717
        self.assertEqualDiff(
718
718
"""Lightweight checkout (format: dirstate or dirstate-tags)
719
719
Location:
762
762
        self.assertEqual('', err)
763
763
 
764
764
        # Show info about shared branch
765
 
        out, err = self.runbzr('info repo/branch --verbose')
 
765
        out, err = self.run_bzr('info repo/branch --verbose')
766
766
        self.assertEqualDiff(
767
767
"""Repository branch (format: dirstate or knit)
768
768
Location:
795
795
        self.assertEqual('', err)
796
796
 
797
797
        # Show info about repository with revisions
798
 
        out, err = self.runbzr('info -v repo')
 
798
        out, err = self.run_bzr('info -v repo')
799
799
        self.assertEqualDiff(
800
800
"""Shared repository (format: dirstate or dirstate-tags or knit)
801
801
Location:
823
823
        # Create shared repository with working trees
824
824
        repo = self.make_repository('repo', shared=True, format=format)
825
825
        repo.set_make_working_trees(True)
826
 
        out, err = self.runbzr('info -v repo')
 
826
        out, err = self.run_bzr('info -v repo')
827
827
        self.assertEqualDiff(
828
828
"""Shared repository with trees (format: dirstate or dirstate-tags or knit)
829
829
Location:
850
850
        branch2 = branch1.bzrdir.sprout('repo/branch2').open_branch()
851
851
 
852
852
        # Empty first branch
853
 
        out, err = self.runbzr('info repo/branch1 --verbose')
 
853
        out, err = self.run_bzr('info repo/branch1 --verbose')
854
854
        self.assertEqualDiff(
855
855
"""Repository tree (format: knit)
856
856
Location:
893
893
        tree1.commit('commit one')
894
894
        rev = repo.get_revision(branch1.revision_history()[0])
895
895
        datestring_first = format_date(rev.timestamp, rev.timezone)
896
 
        out, err = self.runbzr('info -v repo/branch1')
 
896
        out, err = self.run_bzr('info -v repo/branch1')
897
897
        self.assertEqualDiff(
898
898
"""Repository tree (format: knit)
899
899
Location:
937
937
        self.assertEqual('', err)
938
938
 
939
939
        # Out of date second branch
940
 
        out, err = self.runbzr('info repo/branch2 --verbose')
 
940
        out, err = self.run_bzr('info repo/branch2 --verbose')
941
941
        self.assertEqualDiff(
942
942
"""Repository tree (format: knit)
943
943
Location:
983
983
        # Update second branch
984
984
        tree2 = branch2.bzrdir.open_workingtree()
985
985
        tree2.pull(branch1)
986
 
        out, err = self.runbzr('info -v repo/branch2')
 
986
        out, err = self.run_bzr('info -v repo/branch2')
987
987
        self.assertEqualDiff(
988
988
"""Repository tree (format: knit)
989
989
Location:
1031
1031
        self.assertEqual('', err)
1032
1032
 
1033
1033
        # Show info about repository with revisions
1034
 
        out, err = self.runbzr('info -v repo')
 
1034
        out, err = self.run_bzr('info -v repo')
1035
1035
        self.assertEqualDiff(
1036
1036
"""Shared repository with trees (format: dirstate or dirstate-tags or knit)
1037
1037
Location:
1062
1062
        # Create shared repository with working trees
1063
1063
        repo = self.make_repository('repo', shared=True, format=format)
1064
1064
        repo.set_make_working_trees(True)
1065
 
        out, err = self.runbzr('info -v repo')
 
1065
        out, err = self.run_bzr('info -v repo')
1066
1066
        self.assertEqualDiff(
1067
1067
"""Shared repository with trees (format: dirstate or dirstate-tags or knit)
1068
1068
Location:
1086
1086
        control = repo.bzrdir
1087
1087
        branch = control.create_branch()
1088
1088
        control.create_workingtree()
1089
 
        out, err = self.runbzr('info -v repo')
 
1089
        out, err = self.run_bzr('info -v repo')
1090
1090
        self.assertEqualDiff(
1091
1091
"""Repository tree (format: knit)
1092
1092
Location:
1156
1156
            args = command_string.split(' ')
1157
1157
            self.run_bzr_error([], 'info', *args)
1158
1158
            return
1159
 
        out, err = self.runbzr('info %s' % command_string)
 
1159
        out, err = self.run_bzr('info %s' % command_string)
1160
1160
        description = {
1161
1161
            (True, True): 'Lightweight checkout',
1162
1162
            (True, False): 'Repository checkout',
1375
1375
        # W B R
1376
1376
 
1377
1377
        # U U U
1378
 
        out, err = self.runbzr('info -v branch')
 
1378
        out, err = self.run_bzr('info -v branch')
1379
1379
        self.assertEqualDiff(
1380
1380
"""Standalone tree (format: weave)
1381
1381
Location:
1410
1410
        self.assertEqual('', err)
1411
1411
        # L L L
1412
1412
        tree.lock_write()
1413
 
        out, err = self.runbzr('info -v branch')
 
1413
        out, err = self.run_bzr('info -v branch')
1414
1414
        self.assertEqualDiff(
1415
1415
"""Standalone tree (format: weave)
1416
1416
Location: