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

  • Committer: Jelmer Vernooij
  • Date: 2018-11-16 19:47:19 UTC
  • mfrom: (7178 work)
  • mto: This revision was merged to the branch mainline in revision 7179.
  • Revision ID: jelmer@jelmer.uk-20181116194719-m5ut2wfuze5x9s1p
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
    )
31
31
 
32
32
import os
33
 
import urllib
34
33
 
35
34
from ... import (
36
 
    errors,
37
35
    revision,
38
36
    urlutils,
39
37
    )
117
115
        revb = r.do_commit(b"b", committer=b"Somebody <foo@example.com>")
118
116
 
119
117
        thebranch = Branch.open('.')
120
 
        self.assertEqual((2, default_mapping.revision_id_foreign_to_bzr(revb)), thebranch.last_revision_info())
 
118
        self.assertEqual((2, default_mapping.revision_id_foreign_to_bzr(
 
119
            revb)), thebranch.last_revision_info())
121
120
 
122
121
    def test_tag_annotated(self):
123
122
        reva = self.simple_commit_a()
133
132
        r[b'refs/tags/foo'] = o.id
134
133
        thebranch = Branch.open('.')
135
134
        self.assertEqual({"foo": default_mapping.revision_id_foreign_to_bzr(reva)},
136
 
                          thebranch.tags.get_tag_dict())
 
135
                         thebranch.tags.get_tag_dict())
137
136
 
138
137
    def test_tag(self):
139
138
        reva = self.simple_commit_a()
141
140
        r.refs[b"refs/tags/foo"] = reva
142
141
        thebranch = Branch.open('.')
143
142
        self.assertEqual({"foo": default_mapping.revision_id_foreign_to_bzr(reva)},
144
 
                          thebranch.tags.get_tag_dict())
145
 
 
 
143
                         thebranch.tags.get_tag_dict())
146
144
 
147
145
 
148
146
class TestWithGitBranch(tests.TestCaseWithTransport):
158
156
 
159
157
    def test_get_stacked_on_url(self):
160
158
        self.assertRaises(UnstackableBranchFormat,
161
 
            self.git_branch.get_stacked_on_url)
 
159
                          self.git_branch.get_stacked_on_url)
162
160
 
163
161
    def test_get_physical_lock_status(self):
164
162
        self.assertFalse(self.git_branch.get_physical_lock_status())
171
169
        self.format = branch.LocalGitBranchFormat()
172
170
 
173
171
    def test_get_format_description(self):
174
 
        self.assertEqual("Local Git Branch", self.format.get_format_description())
 
172
        self.assertEqual("Local Git Branch",
 
173
                         self.format.get_format_description())
175
174
 
176
175
    def test_get_network_name(self):
177
176
        self.assertEqual(b"git", self.format.network_name())