Please sign in to comment.
Don't use `emailuser` in Mercurial
Summary: The `emailuser` template is a relatively recent addition to Mercurial, and a few users have complained about it. It also doesn't actually do what I thought it did, e.g. in an address like this: "Abraham Lincoln" <email@example.com> ^^^^^^^^^^^^^^^ ^^^^^^^^ (1) (2) ^^^^^^^^^^^^^^^^^^^^^^^ (3) ...I want (1), but `emailuser` means (2). Instead, extract (1) with `getDisplayName()` and (3) with `getAddress()` using PhutilEmailAddress. The implementation in Mercurial is not particularly sophisticated or magical (it just looks for "@" and "<") so we aren't really missing anything by doing this ourselves, at least today. Also fix some issues in `arc export`, which literally no one uses, but which is occasionally useful for testing (as here). Test Plan: - Ran `arc diff --only` in an `hg` repo, checked DB to see that name/email were correctly extracted. - Ran `arc export --git` in an `hg` repo, didn't get a long series of fatals. Reviewers: btrahan, DurhamGoode Reviewed By: DurhamGoode CC: aran Maniphest Tasks: T2866, T2858 Differential Revision: https://secure.phabricator.com/D5539
- Loading branch information...
Showing with 18 additions and 10 deletions.