Summary: Like git, it is also valid to have empty net change under hg. Should not throw if that is the case.
Test Plan: Tried on a hg repo.
Reviewers: lifeihuang, #blessed_reviewers, epriestley
Reviewed By: #blessed_reviewers, epriestley
Subscribers: epriestley, Korvin
Differential Revision: https://secure.phabricator.com/D8888
}
if (empty($this->changeCache[$path])) {
- if ($is_git) {
- // This can legitimately occur under git if you make a change, "git
- // commit" it, and then revert the change in the working copy and run
- // "arc lint".
+ if ($is_git || $is_hg) {
+ // This can legitimately occur under git/hg if you make a change,
+ // "git/hg commit" it, and then revert the change in the working copy
+ // and run "arc lint".
$change = new ArcanistDiffChange();
$change->setCurrentPath($path);
return $change;