# HG changeset patch # User Dirkjan Ochtman # Date 1243496460 -7200 # Node ID 2c06490644559a9507686a6b11ab5d9c66250ad1 # Parent d19843ac13c92ddfdffc970ed62184410882d7c8 Author maps: handle lines without = gracefully. diff --git a/hgsubversion/maps.py b/hgsubversion/maps.py --- 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() 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 @@ -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 \n") + authormap.write("Augie Fackler \n") authormap.close() _ui = ui.ui() _ui.setconfig('hgsubversion', 'stupid', str(stupid))