/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/branch_implementations/test_push.py

  • Committer: Andrew Bennetts
  • Date: 2008-12-16 02:15:06 UTC
  • mto: This revision was merged to the branch mainline in revision 3910.
  • Revision ID: andrew.bennetts@canonical.com-20081216021506-mj4a4qi6mpk3b3x5
First cut of a branch_implementations test.  It fails.

Show diffs side-by-side

added added

removed removed

Lines of Context:
177
177
        source.branch.push(target, stop_revision='rev-2', overwrite=True)
178
178
        self.assertEqual('rev-2', target.last_revision())
179
179
 
 
180
    def test_push_doesnt_create_broken_branch(self):
 
181
        self.make_repository('repo', shared=True, format='1.6')
 
182
        builder = self.make_branch_builder('repo/local')#, format='pack-0.92')
 
183
        builder.start_series()
 
184
        builder.build_snapshot('rev-1', None, [
 
185
            ('add', ('', 'root-id', 'directory', '')),
 
186
            ('add', ('filename', 'f-id', 'file', 'content\n'))])
 
187
        builder.build_snapshot('rev-2', ['rev-1'], [])
 
188
        builder.build_snapshot('rev-3', ['rev-2'],
 
189
            [('modify', ('f-id', 'new-content\n'))])
 
190
        builder.finish_series()
 
191
        branch = builder.get_branch()
 
192
        branch.bzrdir.sprout(self.get_url('trunk'), revision_id='rev-1')
 
193
        #self.run_bzr('push -d repo/local trunk -r 1')
 
194
        self.make_bzrdir('.').get_config().set_default_stack_on('trunk')
 
195
        #out, err = self.run_bzr('push -d repo/local remote -r 2')
 
196
        remote = branch.bzrdir.sprout(
 
197
            self.get_url('remote'), revision_id='rev-2')
 
198
        remote_branch = remote.open_branch()
 
199
#        self.assertContainsRe(
 
200
#            err, 'Using default stacking branch trunk at .*')
 
201
        branch.push(remote_branch)
 
202
        #out, err = self.run_bzr('push -d repo/local remote -r 3')
 
203
 
180
204
 
181
205
class TestPushHook(TestCaseWithBranch):
182
206