/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 tests/test_branch.py

Merge foreign branch utility code.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
"""Tests for interfacing with a Git Branch"""
18
18
 
 
19
import git
 
20
 
19
21
from bzrlib import revision
20
22
from bzrlib.branch import Branch
21
23
 
24
26
    tests,
25
27
    )
26
28
from bzrlib.plugins.git.mapping import default_mapping
27
 
from bzrlib.plugins.git import git
28
 
 
29
29
 
30
30
 
31
31
class TestGitBranch(tests.TestCaseInTempDir):
57
57
        head = tests.run_git('rev-parse', 'HEAD').strip()
58
58
 
59
59
        thebranch = Branch.open('.')
60
 
        self.assertEqual(default_mapping.revision_id_foreign_to_bzr(head),
 
60
        self.assertEqual(default_mapping.convert_revision_id_git_to_bzr(head),
61
61
                         thebranch.last_revision())
62
62
 
63
63
    def test_revision_history(self):
69
69
        revb = tests.run_git('rev-parse', 'HEAD').strip()
70
70
 
71
71
        thebranch = Branch.open('.')
72
 
        self.assertEqual([default_mapping.revision_id_foreign_to_bzr(r) for r in (reva, revb)],
 
72
        self.assertEqual([default_mapping.convert_revision_id_git_to_bzr(r) for r in (reva, revb)],
73
73
                         thebranch.revision_history())
74
74
 
75
75
    def test_tags(self):
81
81
        newid = open('.git/refs/tags/foo').read().rstrip()
82
82
 
83
83
        thebranch = Branch.open('.')
84
 
        self.assertEquals({"foo": default_mapping.revision_id_foreign_to_bzr(newid)},
 
84
        self.assertEquals({"foo": default_mapping.convert_revision_id_git_to_bzr(newid)},
85
85
                          thebranch.tags.get_tag_dict())
86
86
        
87
87