diff -r bed929082b58 -r 75d9fe70c654 mercurial/util.py --- a/mercurial/util.py Thu Jan 31 14:44:19 2008 -0600 +++ b/mercurial/util.py Thu Jan 31 14:44:19 2008 -0600 @@ -1636,6 +1636,12 @@ user = user[:f] return user +def email(author): + '''get email of author.''' + r = author.find('>') + if r == -1: r = None + return author[author.find('<')+1:r] + def ellipsis(text, maxlength=400): """Trim string to at most maxlength (default: 400) characters.""" if len(text) <= maxlength: