1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2025-02-16 16:58:38 +01:00
phorge-arcanist/src
epriestley ac0aa330f5 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" <alincoln@whitehouse.gov>
   ^^^^^^^^^^^^^^^   ^^^^^^^^
         (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
2013-04-02 14:06:46 -07:00
..
configuration Added automatic stash / unstash support for Git in arc diff. 2013-03-21 16:00:05 -07:00
difference Don't use absolute path in ArcanistDiffUtils 2013-03-14 09:14:50 -07:00
differential Delete license headers from files 2012-11-05 11:16:24 -08:00
docs Make the "this is technical documentation" message of "Arcanist Overview" more clear 2012-08-10 11:37:30 -07:00
events/constant Dispatch an event in arc land right before pushing a revision 2013-03-08 18:32:36 -08:00
exception Delete license headers from files 2012-11-05 11:16:24 -08:00
hgdaemon Fix dynamic string usage as safe input 2013-02-02 16:28:15 -08:00
infrastructure/testing Delete license headers from files 2012-11-05 11:16:24 -08:00
lint Improve error if python can't run pep8 2013-03-19 11:44:49 -07:00
parser Parsing rcsdiff -u 2013-03-14 06:15:42 -07:00
repository Don't use emailuser in Mercurial 2013-04-02 14:06:46 -07:00
unit Document parameters 2013-03-06 13:47:05 -08:00
workflow Don't use emailuser in Mercurial 2013-04-02 14:06:46 -07:00
workingcopyidentity Add hook for runtime config settings. 2013-04-01 11:26:17 -07:00
__phutil_library_init__.php Delete license headers from files 2012-11-05 11:16:24 -08:00
__phutil_library_map__.php Render unit results progressively 2013-02-28 15:33:21 -08:00