~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/branch_implementations/test_push.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2008-05-24 11:41:24 UTC
  • mfrom: (3449.1.2 unbreak-push-overwrite)
  • Revision ID: pqm@pqm.ubuntu.com-20080524114124-ubdyd5iqf7zxl2pn
Fix "bzr push --overwrite -r NNN". (Andrew Bennetts)

Show diffs side-by-side

added added

removed removed

Lines of Context:
153
153
        self.assertEqual(tree.branch.last_revision(),
154
154
                         to_branch.last_revision())
155
155
 
 
156
    def test_push_overwrite_of_non_tip_with_stop_revision(self):
 
157
        """Combining the stop_revision and overwrite options works.
 
158
        
 
159
        This was <https://bugs.launchpad.net/bzr/+bug/234229>.
 
160
        """
 
161
        source = self.make_branch_and_tree('source')
 
162
        target = self.make_branch('target')
 
163
 
 
164
        source.commit('1st commit')
 
165
        source.branch.push(target)
 
166
        source.commit('2nd commit', rev_id='rev-2')
 
167
        source.commit('3rd commit')
 
168
 
 
169
        source.branch.push(target, stop_revision='rev-2', overwrite=True)
 
170
        self.assertEqual('rev-2', target.last_revision())
 
171
 
156
172
 
157
173
class TestPushHook(TestCaseWithBranch):
158
174