Exemplo n.º 1
0
 def test_get_revision_null_revid(self):
     mapping = BzrSvnMappingv4()
     foreign_revid = ("fsdkjhfsdkjhfsd", u"mypath", 1)
     self.cache.insert_revision(foreign_revid,
         mapping, (None, None, False), "oldlhs")
     self.assertEquals(
         ((None, mapping.revision_id_foreign_to_bzr(foreign_revid), False), "oldlhs"),
         self.cache.get_revision(foreign_revid, mapping))
Exemplo n.º 2
0
 def test_get_original_mapping_v4(self):
     self.cache.set_original_mapping(("fsdkjhfsdkjhfsd", u"mypath", 1),
         BzrSvnMappingv4())
     self.assertEquals(BzrSvnMappingv4(), self.cache.get_original_mapping(("fkjhfsdkjh", u"mypath", 1)))
Exemplo n.º 3
0
 def test_get_revision(self):
     self.cache.insert_revision(("fsdkjhfsdkjhfsd", u"mypath", 1),
         BzrSvnMappingv4(), (42, "somerevid", False), "oldlhs")
     self.assertEquals(((42, "somerevid", False), "oldlhs"),
         self.cache.get_revision(("bfdshfksdjh", u"mypath", 1),
         BzrSvnMappingv4()))
Exemplo n.º 4
0
 def test_get_unknown_revision(self):
     self.assertRaises(KeyError,
         self.cache.get_revision, ("bfdshfksdjh", u"mypath", 1),
         BzrSvnMappingv4())
Exemplo n.º 5
0
 def test_v4(self):
     self.assertEqual((("uuid", "trunk", 1), BzrSvnMappingv4()),
             mapping_registry.parse_revision_id("svn-v4:uuid:trunk:1"))
Exemplo n.º 6
0
 def test_v4(self):
     revprops = self._generate_revprops(BzrSvnMappingv4())
     self.assertEquals(self.testament.as_short_text(),
         revprops[mapping.SVN_REVPROP_BZR_TESTAMENT])
Exemplo n.º 7
0
 def test_v4_slash(self):
     self.assertEqual("svn-v4:uuid:project/trunk:1",
         BzrSvnMappingv4().revision_id_foreign_to_bzr(("uuid", "project/trunk", 1)))
Exemplo n.º 8
0
 def test_v4_space(self):
     self.assertEqual("svn-v4:uuid:trunk%20l:1",
         BzrSvnMappingv4().revision_id_foreign_to_bzr(("uuid", "trunk l", 1)))