comparison hg_delta_editor.py @ 299:3e27514d575c

Use a reverse lookup in authormap to determine the author for 'hg svn info'. We don't use util.shortuser(); it breaks stuff by cropping the user name at the first period even if it's part of the name.
author Dan Villiom Podlaski Christiansen <danchr@gmail.com>
date Fri, 27 Mar 2009 02:59:42 +0100
parents 9be04de434ed
children 4aba7542f6a9
comparison
equal deleted inserted replaced
298:32d3f1716e66 299:3e27514d575c
690 def authorforsvnauthor(self, author): 690 def authorforsvnauthor(self, author):
691 if(author in self.authors): 691 if(author in self.authors):
692 return self.authors[author] 692 return self.authors[author]
693 return '%s%s' %(author, self.author_host) 693 return '%s%s' %(author, self.author_host)
694 694
695 def svnauthorforauthor(self, author):
696 for svnauthor, hgauthor in self.authors.iteritems():
697 if author == hgauthor:
698 return svnauthor
699 else:
700 # Mercurial incorrectly splits at e.g. '.', so we roll our own.
701 return author.rsplit('@', 1)[0]
702
695 def readauthors(self, authorfile): 703 def readauthors(self, authorfile):
696 self.ui.note(('Reading authormap from %s\n') % authorfile) 704 self.ui.note(('Reading authormap from %s\n') % authorfile)
697 f = open(authorfile, 'r') 705 f = open(authorfile, 'r')
698 for line in f: 706 for line in f:
699 if not line.strip(): 707 if not line.strip():