Homec4science

Fix Mercurial "Last Modified" query

Authored by epriestley <git@epriestley.com> on Feb 28 2013, 03:41.

Description

Fix Mercurial "Last Modified" query

Summary:
To determine when a file was last modified, we currently run hg log ... -b branch ... file. However, this is incorrect, because Mercurial does not interpret "-b x" as "all ancestors of the commit named x" like Git does, and we don't care about where the modification happened anyway (we always have a resolved commit as a starting point). I think this got copy-pasta'd from the History query.

Instead, drop the branch-specific qualifier and find the last modification, period.

Test Plan: Mercurial commit views of commits not on the repository's default branch are no longer broken.

Reviewers: DurhamGoode, vrana, chad

Reviewed By: chad

CC: aran

Differential Revision: https://secure.phabricator.com/D5146

Details

Committed
epriestley <git@epriestley.com>Feb 28 2013, 03:41
Pushed
aubortJan 31 2017, 17:16
Parents
rPH8fead366154f: Implement DiffusionMercurialContainsQuery in Diffusion
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHe5122877a55d: Fix Mercurial "Last Modified" query (authored by epriestley <git@epriestley.com>).Feb 28 2013, 03:41