Rev 4606: Update blackbox.test_shared_repository for 2a as default. in http://bazaar.launchpad.net/~lifeless/bzr/bug-398668

Robert Collins robertc at robertcollins.net
Thu Aug 13 00:51:24 BST 2009


At http://bazaar.launchpad.net/~lifeless/bzr/bug-398668

------------------------------------------------------------
revno: 4606 [merge]
revision-id: robertc at robertcollins.net-20090812235121-4gz3c5kzfdlywi2x
parent: robertc at robertcollins.net-20090812230030-lurd2d6o0gloy7vv
parent: robertc at robertcollins.net-20090812234754-xhpjtgiqyzz4rezf
committer: Robert Collins <robertc at robertcollins.net>
branch nick: bug-398668
timestamp: Thu 2009-08-13 09:51:21 +1000
message:
  Update blackbox.test_shared_repository for 2a as default.
modified:
  bzrlib/tests/blackbox/test_info.py test_info.py-20060215045507-bbdd2d34efab9e0a
  bzrlib/tests/blackbox/test_shared_repository.py test_shared_repository.py-20060317053531-ed30c0d79325e483
=== modified file 'bzrlib/tests/blackbox/test_info.py'
--- a/bzrlib/tests/blackbox/test_info.py	2009-05-01 14:29:06 +0000
+++ b/bzrlib/tests/blackbox/test_info.py	2009-08-12 23:51:21 +0000
@@ -35,6 +35,10 @@
 
 class TestInfo(ExternalBase):
 
+    def setUp(self):
+        ExternalBase.setUp(self)
+        self._repo_strings = "2a or development-subtree"
+
     def test_info_non_existing(self):
         if sys.platform == "win32":
             location = "C:/i/do/not/exist/"
@@ -276,17 +280,14 @@
         branch5 = tree5.branch
         out, err = self.run_bzr('info -v lightcheckout')
         self.assertEqualDiff(
-"""Lightweight checkout (format: 1.6 or 1.6.1-rich-root \
-or 1.9 or 1.9-rich-root \
-or dirstate or dirstate-tags or \
-pack-0.92 or rich-root or rich-root-pack)
+"""Lightweight checkout (format: %s)
 Location:
   light checkout root: lightcheckout
    checkout of branch: standalone
 
 Format:
        control: Meta directory format 1
-  working tree: Working tree format 4
+  working tree: Working tree format 6
         branch: Branch format 4
     repository: Weave repository format 6
 
@@ -308,7 +309,7 @@
 
 Repository:
          1 revision
-""" % (datestring_first, datestring_first,), out)
+""" % (self._repo_strings, datestring_first, datestring_first,), out)
         self.assertEqual('', err)
 
         # Update initial standalone branch
@@ -441,17 +442,14 @@
         # Out of date lightweight checkout
         out, err = self.run_bzr('info lightcheckout --verbose')
         self.assertEqualDiff(
-"""Lightweight checkout (format: 1.6 or 1.6.1-rich-root or \
-1.9 or 1.9-rich-root or \
-dirstate or dirstate-tags or \
-pack-0.92 or rich-root or rich-root-pack)
+"""Lightweight checkout (format: %s)
 Location:
   light checkout root: lightcheckout
    checkout of branch: standalone
 
 Format:
        control: Meta directory format 1
-  working tree: Working tree format 4
+  working tree: Working tree format 6
         branch: Branch format 4
     repository: Weave repository format 6
 
@@ -475,7 +473,7 @@
 
 Repository:
          2 revisions
-""" % (datestring_first, datestring_last,), out)
+""" % (self._repo_strings, datestring_first, datestring_last,), out)
         self.assertEqual('', err)
 
     def test_info_standalone_no_tree(self):
@@ -576,10 +574,7 @@
         datestring_first = format_date(rev.timestamp, rev.timezone)
         out, err = self.run_bzr('info tree/lightcheckout --verbose')
         self.assertEqualDiff(
-"""Lightweight checkout (format: 1.6 or 1.6.1-rich-root or \
-1.9 or 1.9-rich-root or \
-dirstate or dirstate-tags or \
-pack-0.92 or rich-root or rich-root-pack)
+"""Lightweight checkout (format: %s)
 Location:
   light checkout root: tree/lightcheckout
    checkout of branch: repo/branch
@@ -587,7 +582,7 @@
 
 Format:
        control: Meta directory format 1
-  working tree: Working tree format 4
+  working tree: Working tree format 6
         branch: %s
     repository: %s
 
@@ -609,7 +604,7 @@
 
 Repository:
          1 revision
-""" % (format.get_branch_format().get_format_description(),
+""" % (self._repo_strings, format.get_branch_format().get_format_description(),
        format.repository_format.get_format_description(),
        datestring_first, datestring_first,
        ), out)
@@ -618,14 +613,14 @@
         # Out of date checkout
         out, err = self.run_bzr('info -v tree/checkout')
         self.assertEqualDiff(
-"""Checkout (format: dirstate)
+"""Checkout (format: unnamed)
 Location:
        checkout root: tree/checkout
   checkout of branch: repo/branch
 
 Format:
        control: Meta directory format 1
-  working tree: Working tree format 4
+  working tree: Working tree format 6
         branch: %s
     repository: %s
 
@@ -657,14 +652,14 @@
         tree3.add('b')
         out, err = self.run_bzr('info tree/checkout --verbose')
         self.assertEqualDiff(
-"""Checkout (format: dirstate)
+"""Checkout (format: unnamed)
 Location:
        checkout root: tree/checkout
   checkout of branch: repo/branch
 
 Format:
        control: Meta directory format 1
-  working tree: Working tree format 4
+  working tree: Working tree format 6
         branch: %s
     repository: %s
 
@@ -698,10 +693,7 @@
         datestring_last = format_date(rev.timestamp, rev.timezone)
         out, err = self.run_bzr('info tree/lightcheckout --verbose')
         self.assertEqualDiff(
-"""Lightweight checkout (format: 1.6 or 1.6.1-rich-root or \
-1.9 or 1.9-rich-root or \
-dirstate or dirstate-tags or \
-pack-0.92 or rich-root or rich-root-pack)
+"""Lightweight checkout (format: %s)
 Location:
   light checkout root: tree/lightcheckout
    checkout of branch: repo/branch
@@ -709,7 +701,7 @@
 
 Format:
        control: Meta directory format 1
-  working tree: Working tree format 4
+  working tree: Working tree format 6
         branch: %s
     repository: %s
 
@@ -733,7 +725,7 @@
 
 Repository:
          2 revisions
-""" % (format.get_branch_format().get_format_description(),
+""" % (self._repo_strings, format.get_branch_format().get_format_description(),
        format.repository_format.get_format_description(),
        datestring_first, datestring_last,
        ), out)
@@ -1134,11 +1126,8 @@
             (False, True): 'Lightweight checkout',
             (False, False): 'Checkout',
             }[(shared_repo is not None, light_checkout)]
-        format = {True: '1.6 or 1.6.1-rich-root'
-                        ' or 1.9 or 1.9-rich-root'
-                        ' or dirstate or dirstate-tags or pack-0.92'
-                        ' or rich-root or rich-root-pack',
-                  False: 'dirstate'}[light_checkout]
+        format = {True: self._repo_strings,
+                  False: 'unnamed'}[light_checkout]
         if repo_locked:
             repo_locked = lco_tree.branch.repository.get_physical_lock_status()
         if repo_locked or branch_locked or tree_locked:

=== modified file 'bzrlib/tests/blackbox/test_shared_repository.py'
--- a/bzrlib/tests/blackbox/test_shared_repository.py	2009-03-23 14:59:43 +0000
+++ b/bzrlib/tests/blackbox/test_shared_repository.py	2009-08-12 23:51:21 +0000
@@ -27,7 +27,7 @@
     def test_make_repository(self):
         out, err = self.run_bzr("init-repository a")
         self.assertEqual(out,
-"""Shared repository with trees (format: pack-0.92)
+"""Shared repository with trees (format: 2a)
 Location:
   shared repository: a
 """)




More information about the bazaar-commits mailing list