# HG changeset patch # User Dirkjan Ochtman # Date 1243496687 -7200 # Node ID 27e9fea5d114e9efdbd0b3b2f0ac0880f0228245 # Parent e74321f6f8a16c2787a79c2c470eaaae9000d48b Author maps: strip comments. diff --git a/hgsubversion/maps.py b/hgsubversion/maps.py --- a/hgsubversion/maps.py +++ b/hgsubversion/maps.py @@ -37,6 +37,7 @@ class AuthorMap(dict): f = open(path, 'r') for number, line in enumerate(f): + line = line.split('#')[0] if not line.strip(): continue diff --git a/tests/test_fetch_mappings.py b/tests/test_fetch_mappings.py --- a/tests/test_fetch_mappings.py +++ b/tests/test_fetch_mappings.py @@ -21,7 +21,7 @@ class MapTests(test_util.TestBase): def test_author_map(self, stupid=False): test_util.load_svndump_fixture(self.repo_path, 'replace_trunk_with_branch.svndump') authormap = open(self.authors, 'w') - authormap.write("Augie=Augie Fackler \n") + authormap.write('Augie=Augie Fackler # stuffy\n') authormap.write("Augie Fackler \n") authormap.close() _ui = ui.ui()