Summary:
Previously, updating a commit via arc diff in mercurial would
prepopulate the update message with part of the commit message. In an
amend workflow this doesn't make sense, so I disabled it. Git already
does this, so now mercurial matches git in this scenario.
We had users complain that new users would often submit diffs with the
default update message, and it wasn't useful since they were using a
amend flow.
Test Plan:
arc diff on a commit that already had a diff
Verified the editor did not have a update message
arc diff on a stack of commits where the bottom one had a diff
Verified the editor provided a default update message
Reviewers: epriestley
Reviewed By: epriestley
CC: aran, Korvin
Differential Revision: https://secure.phabricator.com/D6215
$messages = $repository_api->getCommitMessageLog();
+ if (count($messages) == 1) {
+ // If there's only one message, assume this is an amend-based workflow and
+ // that using it to prefill doesn't make sense.
+ return null;
+ }
+
$local = $this->loadActiveLocalCommitInfo();
$hashes = ipull($local, null, 'commit');