shortuser should stop before the first space character.
authorThomas Arendsen Hein <thomas@intevation.de>
Wed, 27 Sep 2006 20:34:52 +0200
changeset 3176 7492b33bdd9f
parent 3175 fc379b91f602
child 3177 8683c7a637ad
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"
mercurial/util.py
--- a/mercurial/util.py	Wed Sep 27 09:10:31 2006 -0700
+++ b/mercurial/util.py	Wed Sep 27 20:34:52 2006 +0200
@@ -948,6 +948,9 @@
     f = user.find('<')
     if f >= 0:
         user = user[f+1:]
+    f = user.find(' ')
+    if f >= 0:
+        user = user[:f]
     return user
 
 def walkrepos(path):