/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_push.py

  • Committer: Robert Collins
  • Date: 2008-04-04 00:43:07 UTC
  • mfrom: (3331 +trunk)
  • mto: This revision was merged to the branch mainline in revision 3333.
  • Revision ID: robertc@robertcollins.net-20080404004307-0whomfhm3yal2rvw
Resolve conflicts.

Show diffs side-by-side

added added

removed removed

Lines of Context:
248
248
                'push ../dir',
249
249
                working_dir='tree')
250
250
 
 
251
    def test_push_with_revisionspec(self):
 
252
        """We should be able to push a revision older than the tip."""
 
253
        tree_from = self.make_branch_and_tree('from')
 
254
        tree_from.commit("One.", rev_id="from-1")
 
255
        tree_from.commit("Two.", rev_id="from-2")
 
256
 
 
257
        self.run_bzr('push -r1 ../to', working_dir='from')
 
258
 
 
259
        tree_to = WorkingTree.open('to')
 
260
        repo_to = tree_to.branch.repository
 
261
        self.assertTrue(repo_to.has_revision('from-1'))
 
262
        self.assertFalse(repo_to.has_revision('from-2'))
 
263
        self.assertEqual(tree_to.branch.last_revision_info()[1], 'from-1')
 
264
 
 
265
        self.run_bzr_error(
 
266
            "bzr: ERROR: bzr push --revision takes one value.\n",
 
267
            'push -r0..2 ../to', working_dir='from')
 
268
 
251
269
 
252
270
class RedirectingMemoryTransport(MemoryTransport):
253
271