diff maps.py @ 310:15b8bab03504

Change default author substitution to avoid updating test hashes. Rather than '%s <%s%s>', just use '%s%s'. The two should be functionally equivalent. All tests pass. Added a comment about the handling of missing authors. This is tested by test_push_to_default in tests/test_push_command.py; it is treated the same as before.
author Dan Villiom Podlaski Christiansen <danchr@gmail.com>
date Sun, 03 May 2009 18:51:29 +0200
parents 1d48d9a34c19
children 05cd4a5138bf
line wrap: on
line diff
--- a/maps.py
+++ b/maps.py
@@ -70,8 +70,8 @@ class AuthorMap(dict):
         if author in self:
             result = self.super.__getitem__(author)
         elif self.ui.configbool('hgsubversion', 'defaultauthors', True):
-            self[author] = result = \
-                '%s <%s%s>' % (author, author, self.defaulthost)
+            # TODO: should we treat missing authors specially?
+            self[author] = result = '%s%s' % (author, self.defaulthost)
             self.ui.warn('Substituting author "%s" for default "%s"\n'
                          % (author, result))
         else: