/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_mapping.py

  • Committer: Jelmer Vernooij
  • Date: 2018-01-24 07:51:44 UTC
  • mfrom: (7251 work)
  • mto: This revision was merged to the branch mainline in revision 7252.
  • Revision ID: jelmer@jelmer.uk-20180124075144-byhp1hgdjt2jurfo
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
    )
35
35
 
36
36
from .. import tests
37
 
from ..errors import UnknownCommitExtra
 
37
from ..errors import (
 
38
    UnknownCommitExtra,
 
39
    UnknownMercurialCommitExtra,
 
40
    )
38
41
from ..mapping import (
39
42
    BzrGitMappingv1,
40
43
    escape_file_id,
217
220
        self.assertEqual(
218
221
            rev.properties[u'git-mergetag-0'], tag.as_raw_string())
219
222
 
 
223
    def test_unknown_hg_fields(self):
 
224
        c = Commit()
 
225
        c.tree = b"cc9462f7f8263ef5adfbeff2fb936bb36b504cba"
 
226
        c.message = b"Some message"
 
227
        c.committer = b"Committer"
 
228
        c.commit_time = 4
 
229
        c.author_time = 5
 
230
        c.commit_timezone = 60 * 5
 
231
        c.author_timezone = 60 * 3
 
232
        c.author = b"Author"
 
233
        c._extra = [(b"HG:extra", b"bla:Foo")]
 
234
        mapping = BzrGitMappingv1()
 
235
        self.assertRaises(
 
236
            UnknownMercurialCommitExtra,
 
237
            mapping.import_commit, c, mapping.revision_id_foreign_to_bzr)
 
238
 
220
239
 
221
240
class RoundtripRevisionsFromBazaar(tests.TestCase):
222
241