~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: John Arbash Meinel
  • Date: 2007-06-28 23:18:09 UTC
  • mfrom: (2562 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2566.
  • Revision ID: john@arbash-meinel.com-20070628231809-pqbt7puoqj8bl07b
[merge] bzr.dev 2562

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 
20
20
 
21
21
class TestFindMergeBase(ExternalBase):
 
22
 
22
23
    def test_find_merge_base(self):
23
24
        os.mkdir('a')
24
25
        os.chdir('a')
25
 
        self.runbzr('init')
26
 
        self.runbzr('commit -m foo --unchanged')
27
 
        self.runbzr('branch . ../b')
28
 
        q = self.run_bzr('find-merge-base', '.', '../b', backtick=True)
29
 
        self.runbzr('commit -m bar --unchanged')
 
26
        self.run_bzr('init')
 
27
        self.run_bzr('commit -m foo --unchanged')
 
28
        self.run_bzr('branch . ../b')
 
29
        q = self.run_bzr(['find-merge-base', '.', '../b'])[0]
 
30
        self.run_bzr('commit -m bar --unchanged')
30
31
        os.chdir('../b')
31
 
        self.runbzr('commit -m baz --unchanged')
32
 
        r = self.run_bzr('find-merge-base', '.', '../a', backtick=True)
 
32
        self.run_bzr('commit -m baz --unchanged')
 
33
        r = self.run_bzr(['find-merge-base', '.', '../a'])[0]
33
34
        self.assertEqual(q, r)
34
35
        
 
36
    def test_find_null_merge_base(self):
 
37
        tree = self.make_branch_and_tree('foo')
 
38
        tree.commit('message')
 
39
        tree2 = self.make_branch_and_tree('bar')
 
40
        r = self.run_bzr('find-merge-base', 'foo', 'bar')[0]
 
41
        self.assertEqual('merge base is revision null:\n', r)