1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-30 01:10:58 +01:00

Show diffs of removed and propchanged files in Mercurial correctly

Summary:
By default, `hg log -- x` does not show commits which remove the file `x`, nor commits which only change properties on `x`. By passing the flag `--removed`, commits which remove or just change properties are shown. We expect these commits to be shown in callers (this is the default behavior in Git).

Fixes T2608.

Test Plan: Created commits which remove a file and change properties on a file. Verified `hg log --removed -- x` reported them correctly, and Diffusion showed them correctly.

Reviewers: btrahan, DurhamGoode

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2608

Differential Revision: https://secure.phabricator.com/D5656
This commit is contained in:
epriestley 2013-04-11 10:05:55 -07:00
parent 1e1c99c97b
commit 985a85ec72

View file

@ -10,7 +10,7 @@ final class DiffusionMercurialLastModifiedQuery
$path = $drequest->getPath();
list($hash) = $repository->execxLocalCommand(
'log --template %s --limit 1 --rev %s -- %s',
'log --template %s --limit 1 --removed --rev %s -- %s',
'{node}',
hgsprintf('reverse(%s::%s)', '0', $drequest->getCommit()),
nonempty(ltrim($path, '/'), '.'));