~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

(gz) Create working tree at specified revision when doing a local push
 (Martin Packman)

Show diffs side-by-side

added added

removed removed

Lines of Context:
452
452
        self.assertTrue(repo_to.has_revision('from-1'))
453
453
        self.assertFalse(repo_to.has_revision('from-2'))
454
454
        self.assertEqual(tree_to.branch.last_revision_info()[1], 'from-1')
 
455
        self.assertFalse(
 
456
            tree_to.changes_from(tree_to.basis_tree()).has_changed())
455
457
 
456
458
        self.run_bzr_error(
457
459
            ['bzr: ERROR: bzr push --revision '
917
919
            2>All changes applied successfully.
918
920
            2>Pushed up to revision 1.
919
921
            """)
 
922
 
 
923
    def test_push_with_revspec(self):
 
924
        self.run_script("""
 
925
            $ bzr init-repo .
 
926
            Shared repository with trees (format: 2a)
 
927
            Location:
 
928
              shared repository: .
 
929
            $ bzr init trunk
 
930
            Created a repository tree (format: 2a)
 
931
            Using shared repository...
 
932
            $ cd trunk
 
933
            $ bzr commit -m 'first rev' --unchanged
 
934
            2>Committing to:...trunk/
 
935
            2>Committed revision 1.
 
936
            $ echo foo > file
 
937
            $ bzr add
 
938
            adding file
 
939
            $ bzr commit -m 'we need some foo'
 
940
            2>Committing to:...trunk/
 
941
            2>added file
 
942
            2>Committed revision 2.
 
943
            $ bzr push -r 1 ../other
 
944
            2>Created new branch.
 
945
            $ bzr st ../other # checking that file is not created (#484516)
 
946
            """)