From 985a85ec722950ca5842df6bf46a64b04c2215a0 Mon Sep 17 00:00:00 2001 From: epriestley Date: Thu, 11 Apr 2013 10:05:55 -0700 Subject: [PATCH] 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 --- .../query/lastmodified/DiffusionMercurialLastModifiedQuery.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/applications/diffusion/query/lastmodified/DiffusionMercurialLastModifiedQuery.php b/src/applications/diffusion/query/lastmodified/DiffusionMercurialLastModifiedQuery.php index e0a40e76c7..4a7c89f223 100644 --- a/src/applications/diffusion/query/lastmodified/DiffusionMercurialLastModifiedQuery.php +++ b/src/applications/diffusion/query/lastmodified/DiffusionMercurialLastModifiedQuery.php @@ -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, '/'), '.'));