Page MenuHomePhabricator

D9605.diff
No OneTemporary

D9605.diff

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

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)

Event Timeline