changeset 358:2c0649064455

Author maps: handle lines without = gracefully.
author Dirkjan Ochtman <dirkjan@ochtman.nl>
date Thu, 28 May 2009 09:41:00 +0200
parents d19843ac13c9
children e74321f6f8a1
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
@@ -47,7 +47,7 @@ class AuthorMap(dict):
                                      % (srcauth, self[srcauth], dstauth))
                     else:
                         self[srcauth] = dstauth
-                except IndexError:
+                except (IndexError, ValueError):
                     self.ui.warn('Ignoring line %i in author map %s: %s\n'
                                  % (number, path, line.rstrip()))
             f.close()
--- a/tests/test_fetch_mappings.py
+++ b/tests/test_fetch_mappings.py
@@ -22,6 +22,7 @@ class MapTests(test_util.TestBase):
         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 Fackler <durin42@gmail.com>\n")
         authormap.close()
         _ui = ui.ui()
         _ui.setconfig('hgsubversion', 'stupid', str(stupid))