Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15415249
D9605.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D9605.diff
View Options
diff --git a/src/repository/api/ArcanistMercurialAPI.php b/src/repository/api/ArcanistMercurialAPI.php
--- a/src/repository/api/ArcanistMercurialAPI.php
+++ b/src/repository/api/ArcanistMercurialAPI.php
@@ -247,9 +247,16 @@
list($node, $rev, $full_author, $date, $branch, $tag,
$parents, $desc) = explode("\1", $log, 9);
- $email = new PhutilEmailAddress($full_author);
- $author = $email->getDisplayName();
- $author_email = $email->getAddress();
+ // Not everyone enters their email address as a part of the username
+ // field. Try to make it work when it's obvious
+ if (strpos($full_author, '@') === false) {
+ $author = $full_author;
+ $author_email = null;
+ } else {
+ $email = new PhutilEmailAddress($full_author);
+ $author = $email->getDisplayName();
+ $author_email = $email->getAddress();
+ }
// NOTE: If a commit has only one parent, {parents} returns empty.
// If it has two parents, {parents} returns revs and short hashes, not
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Mar 21, 5:03 AM (4 d, 15 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7559970
Default Alt Text
D9605.diff (1 KB)
Attached To
Mode
D9605: Don't parse mercurial usernames without email address as an email address
Attached
Detach File
Event Timeline
Log In to Comment