comparison tests/test_fetch_mappings.py @ 1374:a17d8874a099

Added dynamic author mapping.
author Jerome M. BERGER <jeberger@free.fr>
date Thu, 28 Jan 2016 19:43:21 +0100
parents 57d65269d30c
children 94eb844fd4ab
comparison
equal deleted inserted replaced
1373:b072dc02d1e3 1374:a17d8874a099
112 self.assertEqual(self.repo[0].user(), 112 self.assertEqual(self.repo[0].user(),
113 'Augie Fackler <durin42@gmail.com>') 113 'Augie Fackler <durin42@gmail.com>')
114 self.assertEqual(self.repo['tip'].user(), 114 self.assertEqual(self.repo['tip'].user(),
115 'evil@5b65bade-98f3-4993-a01f-b7a6710da339') 115 'evil@5b65bade-98f3-4993-a01f-b7a6710da339')
116 116
117 def test_author_map_mapauthorscmd(self):
118 repo_path = self.load_svndump('replace_trunk_with_branch.svndump')
119 ui = self.ui()
120 ui.setconfig('hgsubversion', 'mapauthorscmd', 'echo "svn: %s"')
121 commands.clone(ui, test_util.fileurl(repo_path),
122 self.wc_path)
123 self.assertEqual(self.repo[0].user(), 'svn: Augie')
124 self.assertEqual(self.repo['tip'].user(), 'svn: evil')
125
117 def _loadwithfilemap(self, svndump, filemapcontent, 126 def _loadwithfilemap(self, svndump, filemapcontent,
118 failonmissing=True): 127 failonmissing=True):
119 repo_path = self.load_svndump(svndump) 128 repo_path = self.load_svndump(svndump)
120 filemap = open(self.filemap, 'w') 129 filemap = open(self.filemap, 'w')
121 filemap.write(filemapcontent) 130 filemap.write(filemapcontent)