changeset 360:27e9fea5d114

Author maps: strip comments.
author Dirkjan Ochtman <dirkjan@ochtman.nl>
date Thu, 28 May 2009 09:44:47 +0200
parents e74321f6f8a1
children cfdd4ec5230a
files hgsubversion/maps.py tests/test_fetch_mappings.py
diffstat 2 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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
 
--- 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 <durin42@gmail.com>\n")
+        authormap.write('Augie=Augie Fackler <durin42@gmail.com> # stuffy\n')
         authormap.write("Augie Fackler <durin42@gmail.com>\n")
         authormap.close()
         _ui = ui.ui()