Rev 3670: Test that we alert the user to the upgrade. in http://bzr.arbash-meinel.com/branches/bzr/jam-integration

John Arbash Meinel john at arbash-meinel.com
Tue Sep 2 22:28:01 BST 2008


At http://bzr.arbash-meinel.com/branches/bzr/jam-integration

------------------------------------------------------------
revno: 3670
revision-id: john at arbash-meinel.com-20080902212759-pz26098ijspuknnl
parent: john at arbash-meinel.com-20080902202633-l8y2dqsd1no2jegx
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: jam-integration
timestamp: Tue 2008-09-02 16:27:59 -0500
message:
  Test that we alert the user to the upgrade.
-------------- next part --------------
=== modified file 'bzrlib/tests/blackbox/test_branch.py'
--- a/bzrlib/tests/blackbox/test_branch.py	2008-07-25 05:32:45 +0000
+++ b/bzrlib/tests/blackbox/test_branch.py	2008-09-02 21:27:59 +0000
@@ -97,14 +97,15 @@
         target_stat = os.stat('target/file1')
         self.assertEqual(source_stat, target_stat)
 
+
 class TestBranchStacked(ExternalBase):
     """Tests for branch --stacked"""
 
     def check_shallow_branch(self, branch_revid, stacked_on):
         """Assert that the branch 'newbranch' has been published correctly.
-        
+
         :param stacked_on: url of a branch this one is stacked upon.
-        :param branch_revid: a revision id that should be the only 
+        :param branch_revid: a revision id that should be the only
             revision present in the stacked branch, and it should not be in
             the reference branch.
         """
@@ -218,6 +219,11 @@
         trunk = self.make_branch('trunk', format='pack-0.92')
         out, err = self.run_bzr(
             ['branch', '--stacked', 'trunk', 'shallow'])
+        # We should notify the user that we upgraded their format
+        self.assertContainsRe(err, 'Stacking requires repository format:')
+        self.assertContainsRe(err, r'Packs 5 \(adds stacking support,'
+                                   r' requires bzr 1\.6\)')
+        self.assertContainsRe(err, r'Not preserving source format\.')
 
 
 class TestRemoteBranch(TestCaseWithSFTPServer):



More information about the bazaar-commits mailing list