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

  • Committer: Erik Bågfors
  • Date: 2005-12-23 23:55:48 UTC
  • mto: (1185.50.72 bzr-jam-integration)
  • mto: This revision was merged to the branch mainline in revision 1554.
  • Revision ID: erik@bagfors.nu-20051223235548-57d23cf4d5d15ec3
test for pull --revision

Show diffs side-by-side

added added

removed removed

Lines of Context:
91
91
        self.runbzr('pull ../b')
92
92
        self.runbzr('pull ../b')
93
93
 
 
94
    def test_pull_revision(self):
 
95
        """Pull some changes from one branch to another."""
 
96
        os.mkdir('a')
 
97
        os.chdir('a')
 
98
 
 
99
        self.example_branch()
 
100
        file('hello2', 'wt').write('foo')
 
101
        self.runbzr('add hello2')
 
102
        self.runbzr('commit -m setup hello2')
 
103
        file('goodbye2', 'wt').write('baz')
 
104
        self.runbzr('add goodbye2')
 
105
        self.runbzr('commit -m setup goodbye2')
 
106
 
 
107
        os.chdir('..')
 
108
        self.runbzr('branch -r 1 a b')
 
109
        os.chdir('b')
 
110
        self.runbzr('pull -r 2')
 
111
        a = Branch.open('../a')
 
112
        b = Branch.open('.')
 
113
        self.assertEquals(a.revno(),4)
 
114
        self.assertEquals(b.revno(),2)
 
115
        self.runbzr('pull -r 3')
 
116
        self.assertEquals(b.revno(),3)
 
117
        self.runbzr('pull -r 4')
 
118
        self.assertEquals(a.revision_history(), b.revision_history())
 
119
 
 
120
 
94
121
    def test_overwrite_uptodate(self):
95
122
        # Make sure pull --overwrite overwrites
96
123
        # even if the target branch has merged