]> khamidou — GitHub mirrors - arcanist.git/commit
Fix hg amend during arc diff
authordurham <durham@fb.com>
Tue, 16 Apr 2013 17:22:00 +0000 (10:22 -0700)
committerdurham <durham@fb.com>
Tue, 16 Apr 2013 17:22:00 +0000 (10:22 -0700)
commitbfc1eeba078a089dbf2a94101d040a1b01106705
tree81b4a49866123cd10c850e1317c0592a3376eebb
parentb0a04147667c2ad3f731b59aaa002e050d294641
Fix hg amend during arc diff

Summary:
When doing an arc diff with pending changes in your working copy
it was creating a new commit with the pending changes instead of amending
the existing one.  The problem was the author comparison was comparing
values like "John Smith <john@foo.com>" with "John Smith". The fix changes
$api->getAuthor() to return "John Smith" instead of the full string. This
matches the behavior (and implementation) found in the git api.

Test Plan:
hg book foo
touch a && hg commit -Ama
touch b && hg add b
arc diff
When prompted, amend the pending changes to the existing commit.

Verified that the changes were amended instead of making a new commit.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin
Differential Revision: https://secure.phabricator.com/D5706
src/repository/api/ArcanistMercurialAPI.php