def test_id_native(self): rev = Revision("somerevid") rev.timestamp = 43842423 rev.committer = "Joe <*****@*****.**>" self.assertEquals( "somepath somerevid 1971-05-23T10:27:03.000000Z Joe <*****@*****.**>", keywords['Id']("somerevid", rev, "somedir/somepath", None))
def test_export(self): rev = Revision("myrevid") rev.committer = u"Jelmer <foo>" rev.message = u"ürk" rev.timestamp = 432432 rev.timezone = 0 rev.properties = { "something": u"else", "hg:extra:foo": base64.b64encode("bar")} (manifest, user, (time, timezone), desc, extra) = \ self.mapping.export_revision(rev) self.assertEquals("Jelmer <foo>", user) self.assertEquals(None, manifest) self.assertEquals(u"ürk", desc) self.assertEquals({"bzr-revprop-something": "else", "foo": "bar"}, extra)
def test_date_revmeta_not_native(self): rev = Revision("somerevid") rev.timestamp = 43842423 self.assertEquals('1971-05-23T10:27:03.000000Z', keywords['Date']("somerevid", rev, "somepath", None))