Mercurial > hgsubversion
comparison 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 |
comparison
equal
deleted
inserted
replaced
309:9ad5cf45e30c | 310:15b8bab03504 |
---|---|
68 In such cases, a new value is generated and added to the dictionary | 68 In such cases, a new value is generated and added to the dictionary |
69 as well as the backing store. ''' | 69 as well as the backing store. ''' |
70 if author in self: | 70 if author in self: |
71 result = self.super.__getitem__(author) | 71 result = self.super.__getitem__(author) |
72 elif self.ui.configbool('hgsubversion', 'defaultauthors', True): | 72 elif self.ui.configbool('hgsubversion', 'defaultauthors', True): |
73 self[author] = result = \ | 73 # TODO: should we treat missing authors specially? |
74 '%s <%s%s>' % (author, author, self.defaulthost) | 74 self[author] = result = '%s%s' % (author, self.defaulthost) |
75 self.ui.warn('Substituting author "%s" for default "%s"\n' | 75 self.ui.warn('Substituting author "%s" for default "%s"\n' |
76 % (author, result)) | 76 % (author, result)) |
77 else: | 77 else: |
78 raise hgutil.Abort('Author %s has no entry in the author map!' | 78 raise hgutil.Abort('Author %s has no entry in the author map!' |
79 % author) | 79 % author) |