changeset 3169:7492b33bdd9f

shortuser should stop before the first space character. Examples: "Foo Bar <foo.bar AT example DOT com>" -> "foo.bar" (instead of "foo.bar AT example DOT com>" as it was before.) "Foo Bar" -> "Foo"
author Thomas Arendsen Hein <thomas@intevation.de>
date Wed, 27 Sep 2006 20:34:52 +0200
parents fc379b91f602
children 8683c7a637ad
files mercurial/util.py
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/util.py
+++ b/mercurial/util.py
@@ -948,6 +948,9 @@ def shortuser(user):
     f = user.find('<')
     if f >= 0:
         user = user[f+1:]
+    f = user.find(' ')
+    if f >= 0:
+        user = user[:f]
     return user
 
 def walkrepos(path):