~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: John Ferlito
  • Date: 2009-05-25 10:59:42 UTC
  • mto: (4665.4.1 ppa-doc)
  • mto: This revision was merged to the branch mainline in revision 4693.
  • Revision ID: johnf@inodes.org-20090525105942-5xkcbe37m1u5lp5z
Update packaging scripts to make deployment a bit easier
Update documentation for deploying to PPA

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
    urlutils,
30
30
    )
31
31
from bzrlib.osutils import format_date
32
 
from bzrlib.tests import TestSkipped, MemoryServer
 
32
from bzrlib.tests import TestSkipped
33
33
from bzrlib.tests.blackbox import ExternalBase
34
34
 
35
35
 
36
36
class TestInfo(ExternalBase):
37
37
 
38
 
    def setUp(self):
39
 
        ExternalBase.setUp(self)
40
 
        self._repo_strings = "2a"
41
 
 
42
38
    def test_info_non_existing(self):
43
 
        self.vfs_transport_factory = MemoryServer
44
 
        location = self.get_url()
 
39
        if sys.platform == "win32":
 
40
            location = "C:/i/do/not/exist/"
 
41
        else:
 
42
            location = "/i/do/not/exist/"
45
43
        out, err = self.run_bzr('info '+location, retcode=3)
46
44
        self.assertEqual(out, '')
47
45
        self.assertEqual(err, 'bzr: ERROR: Not a branch: "%s".\n' % location)
278
276
        branch5 = tree5.branch
279
277
        out, err = self.run_bzr('info -v lightcheckout')
280
278
        self.assertEqualDiff(
281
 
"""Lightweight checkout (format: %s)
 
279
"""Lightweight checkout (format: 1.6 or 1.6.1-rich-root \
 
280
or 1.9 or 1.9-rich-root \
 
281
or dirstate or dirstate-tags or \
 
282
pack-0.92 or rich-root or rich-root-pack)
282
283
Location:
283
284
  light checkout root: lightcheckout
284
285
   checkout of branch: standalone
285
286
 
286
287
Format:
287
288
       control: Meta directory format 1
288
 
  working tree: Working tree format 6
 
289
  working tree: Working tree format 4
289
290
        branch: Branch format 4
290
291
    repository: Weave repository format 6
291
292
 
307
308
 
308
309
Repository:
309
310
         1 revision
310
 
""" % (self._repo_strings, datestring_first, datestring_first,), out)
 
311
""" % (datestring_first, datestring_first,), out)
311
312
        self.assertEqual('', err)
312
313
 
313
314
        # Update initial standalone branch
440
441
        # Out of date lightweight checkout
441
442
        out, err = self.run_bzr('info lightcheckout --verbose')
442
443
        self.assertEqualDiff(
443
 
"""Lightweight checkout (format: %s)
 
444
"""Lightweight checkout (format: 1.6 or 1.6.1-rich-root or \
 
445
1.9 or 1.9-rich-root or \
 
446
dirstate or dirstate-tags or \
 
447
pack-0.92 or rich-root or rich-root-pack)
444
448
Location:
445
449
  light checkout root: lightcheckout
446
450
   checkout of branch: standalone
447
451
 
448
452
Format:
449
453
       control: Meta directory format 1
450
 
  working tree: Working tree format 6
 
454
  working tree: Working tree format 4
451
455
        branch: Branch format 4
452
456
    repository: Weave repository format 6
453
457
 
471
475
 
472
476
Repository:
473
477
         2 revisions
474
 
""" % (self._repo_strings, datestring_first, datestring_last,), out)
 
478
""" % (datestring_first, datestring_last,), out)
475
479
        self.assertEqual('', err)
476
480
 
477
481
    def test_info_standalone_no_tree(self):
572
576
        datestring_first = format_date(rev.timestamp, rev.timezone)
573
577
        out, err = self.run_bzr('info tree/lightcheckout --verbose')
574
578
        self.assertEqualDiff(
575
 
"""Lightweight checkout (format: %s)
 
579
"""Lightweight checkout (format: 1.6 or 1.6.1-rich-root or \
 
580
1.9 or 1.9-rich-root or \
 
581
dirstate or dirstate-tags or \
 
582
pack-0.92 or rich-root or rich-root-pack)
576
583
Location:
577
584
  light checkout root: tree/lightcheckout
578
585
   checkout of branch: repo/branch
580
587
 
581
588
Format:
582
589
       control: Meta directory format 1
583
 
  working tree: Working tree format 6
 
590
  working tree: Working tree format 4
584
591
        branch: %s
585
592
    repository: %s
586
593
 
602
609
 
603
610
Repository:
604
611
         1 revision
605
 
""" % (self._repo_strings, format.get_branch_format().get_format_description(),
 
612
""" % (format.get_branch_format().get_format_description(),
606
613
       format.repository_format.get_format_description(),
607
614
       datestring_first, datestring_first,
608
615
       ), out)
611
618
        # Out of date checkout
612
619
        out, err = self.run_bzr('info -v tree/checkout')
613
620
        self.assertEqualDiff(
614
 
"""Checkout (format: unnamed)
 
621
"""Checkout (format: dirstate)
615
622
Location:
616
623
       checkout root: tree/checkout
617
624
  checkout of branch: repo/branch
618
625
 
619
626
Format:
620
627
       control: Meta directory format 1
621
 
  working tree: Working tree format 6
 
628
  working tree: Working tree format 4
622
629
        branch: %s
623
630
    repository: %s
624
631
 
650
657
        tree3.add('b')
651
658
        out, err = self.run_bzr('info tree/checkout --verbose')
652
659
        self.assertEqualDiff(
653
 
"""Checkout (format: unnamed)
 
660
"""Checkout (format: dirstate)
654
661
Location:
655
662
       checkout root: tree/checkout
656
663
  checkout of branch: repo/branch
657
664
 
658
665
Format:
659
666
       control: Meta directory format 1
660
 
  working tree: Working tree format 6
 
667
  working tree: Working tree format 4
661
668
        branch: %s
662
669
    repository: %s
663
670
 
691
698
        datestring_last = format_date(rev.timestamp, rev.timezone)
692
699
        out, err = self.run_bzr('info tree/lightcheckout --verbose')
693
700
        self.assertEqualDiff(
694
 
"""Lightweight checkout (format: %s)
 
701
"""Lightweight checkout (format: 1.6 or 1.6.1-rich-root or \
 
702
1.9 or 1.9-rich-root or \
 
703
dirstate or dirstate-tags or \
 
704
pack-0.92 or rich-root or rich-root-pack)
695
705
Location:
696
706
  light checkout root: tree/lightcheckout
697
707
   checkout of branch: repo/branch
699
709
 
700
710
Format:
701
711
       control: Meta directory format 1
702
 
  working tree: Working tree format 6
 
712
  working tree: Working tree format 4
703
713
        branch: %s
704
714
    repository: %s
705
715
 
723
733
 
724
734
Repository:
725
735
         2 revisions
726
 
""" % (self._repo_strings, format.get_branch_format().get_format_description(),
 
736
""" % (format.get_branch_format().get_format_description(),
727
737
       format.repository_format.get_format_description(),
728
738
       datestring_first, datestring_last,
729
739
       ), out)
1124
1134
            (False, True): 'Lightweight checkout',
1125
1135
            (False, False): 'Checkout',
1126
1136
            }[(shared_repo is not None, light_checkout)]
1127
 
        format = {True: self._repo_strings,
1128
 
                  False: 'unnamed'}[light_checkout]
 
1137
        format = {True: '1.6 or 1.6.1-rich-root'
 
1138
                        ' or 1.9 or 1.9-rich-root'
 
1139
                        ' or dirstate or dirstate-tags or pack-0.92'
 
1140
                        ' or rich-root or rich-root-pack',
 
1141
                  False: 'dirstate'}[light_checkout]
1129
1142
        if repo_locked:
1130
1143
            repo_locked = lco_tree.branch.repository.get_physical_lock_status()
1131
1144
        if repo_locked or branch_locked or tree_locked:
1326
1339
    def test_info_locking_oslocks(self):
1327
1340
        if sys.platform == "win32":
1328
1341
            raise TestSkipped("don't use oslocks on win32 in unix manner")
1329
 
        # This test tests old (all-in-one, OS lock using) behaviour which
1330
 
        # simply cannot work on windows (and is indeed why we changed our
1331
 
        # design. As such, don't try to remove the thisFailsStrictLockCheck
1332
 
        # call here.
1333
 
        self.thisFailsStrictLockCheck()
1334
1342
 
1335
1343
        tree = self.make_branch_and_tree('branch',
1336
1344
                                         format=bzrdir.BzrDirFormat6())