/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

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

  • Committer: Vincent Ladeuil
  • Date: 2008-09-11 19:36:38 UTC
  • mfrom: (3703 +trunk)
  • mto: (3705.1.1 trunk2)
  • mto: This revision was merged to the branch mainline in revision 3708.
  • Revision ID: v.ladeuil+lp@free.fr-20080911193638-wtjyc1kcmacc6t1f
merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
97
97
        target_stat = os.stat('target/file1')
98
98
        self.assertEqual(source_stat, target_stat)
99
99
 
 
100
 
100
101
class TestBranchStacked(ExternalBase):
101
102
    """Tests for branch --stacked"""
102
103
 
103
104
    def check_shallow_branch(self, branch_revid, stacked_on):
104
105
        """Assert that the branch 'newbranch' has been published correctly.
105
 
        
 
106
 
106
107
        :param stacked_on: url of a branch this one is stacked upon.
107
 
        :param branch_revid: a revision id that should be the only 
 
108
        :param branch_revid: a revision id that should be the only
108
109
            revision present in the stacked branch, and it should not be in
109
110
            the reference branch.
110
111
        """
218
219
        trunk = self.make_branch('trunk', format='pack-0.92')
219
220
        out, err = self.run_bzr(
220
221
            ['branch', '--stacked', 'trunk', 'shallow'])
 
222
        # We should notify the user that we upgraded their format
 
223
        self.assertEqualDiff(
 
224
            'Source format does not support stacking, using format: \'1.6\'\n'
 
225
            '  Packs 5 (adds stacking support, requires bzr 1.6)\n'
 
226
            '\n'
 
227
            'Created new stacked branch referring to %s.\n' % (trunk.base,),
 
228
            err)
 
229
 
 
230
    def test_branch_stacked_from_rich_root_non_stackable(self):
 
231
        trunk = self.make_branch('trunk', format='rich-root-pack')
 
232
        out, err = self.run_bzr(
 
233
            ['branch', '--stacked', 'trunk', 'shallow'])
 
234
        # We should notify the user that we upgraded their format
 
235
        self.assertEqualDiff(
 
236
            'Source format does not support stacking, using format:'
 
237
            ' \'1.6.1-rich-root\'\n'
 
238
            '  Packs 5 rich-root (adds stacking support, requires bzr 1.6.1)\n'
 
239
            '\n'
 
240
            'Created new stacked branch referring to %s.\n' % (trunk.base,),
 
241
            err)
 
242
 
221
243
 
222
244
 
223
245
class TestRemoteBranch(TestCaseWithSFTPServer):