comparison hg_delta_editor.py @ 226:bb2b78f9f4ce

Use a reverse lookup in authormap to determine the author for 'hg svn info'.
author Dan Villiom Podlaski Christiansen <danchr@gmail.com>
date Fri, 27 Mar 2009 02:59:42 +0100
parents 2117cb0118fe
children d79843a3d42c
comparison
equal deleted inserted replaced
225:2117cb0118fe 226:bb2b78f9f4ce
687 def authorforsvnauthor(self, author): 687 def authorforsvnauthor(self, author):
688 if(author in self.authors): 688 if(author in self.authors):
689 return self.authors[author] 689 return self.authors[author]
690 return '%s%s' %(author, self.author_host) 690 return '%s%s' %(author, self.author_host)
691 691
692 def svnauthorforauthor(self, author):
693 for svnauthor, hgauthor in self.authors.iteritems():
694 if author == hgauthor:
695 return svnauthor
696 else:
697 # return the original svn-side author
698 return author.rsplit('@', 1)[0]
699
692 def readauthors(self, authorfile): 700 def readauthors(self, authorfile):
693 self.ui.note(('Reading authormap from %s\n') % authorfile) 701 self.ui.note(('Reading authormap from %s\n') % authorfile)
694 f = open(authorfile, 'r') 702 f = open(authorfile, 'r')
695 for line in f: 703 for line in f:
696 if not line.strip(): 704 if not line.strip():