~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Martin Pool
  • Date: 2006-02-22 04:29:54 UTC
  • mfrom: (1566 +trunk)
  • mto: This revision was merged to the branch mainline in revision 1569.
  • Revision ID: mbp@sourcefrog.net-20060222042954-60333f08dd56a646
[merge] from bzr.dev before integration
Fix undefined ordering in sign_my_revisions breaking tests

Show diffs side-by-side

added added

removed removed

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