/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

  • Committer: Jelmer Vernooij
  • Date: 2010-02-12 00:17:50 UTC
  • mto: (0.200.718 trunk)
  • mto: This revision was merged to the branch mainline in revision 6960.
  • Revision ID: jelmer@samba.org-20100212001750-5bcl5y33fuiag5j9
more work on transportgit.

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
import os
27
27
 
28
28
from bzrlib import (
 
29
    errors,
29
30
    revision,
30
31
    )
31
32
from bzrlib.branch import (
39
40
    )
40
41
 
41
42
from bzrlib.plugins.git import (
 
43
    LocalGitBzrDirFormat,
42
44
    branch,
43
45
    tests,
44
46
    )
45
 
from bzrlib.plugins.git.mapping import default_mapping
 
47
from bzrlib.plugins.git.mapping import (
 
48
    default_mapping,
 
49
    )
46
50
 
47
51
 
48
52
class TestGitBranch(tests.TestCaseInTempDir):
123
127
        self.assertIs(None, self.git_branch.get_parent())
124
128
 
125
129
    def test_get_stacked_on_url(self):
126
 
        self.assertIs(None, self.git_branch.get_stacked_on_url())
 
130
        self.assertRaises(errors.UnstackableBranchFormat, 
 
131
            self.git_branch.get_stacked_on_url)
127
132
 
128
133
    def test_get_physical_lock_status(self):
129
134
        self.assertFalse(self.git_branch.get_physical_lock_status())
175
180
        newbranch = self.clone_git_branch(path, "f")
176
181
        self.assertEquals({"lala": revid}, newbranch.tags.get_tag_dict())
177
182
        self.assertEquals([revid], newbranch.repository.all_revision_ids())
 
183
 
 
184
 
 
185
class ForeignTestsBranchFactory(object):
 
186
 
 
187
    def make_empty_branch(self, transport):
 
188
        return LocalGitBzrDirFormat().initialize_on_transport(transport).open_branch()
 
189
 
 
190
    make_branch = make_empty_branch