From 861bb08141a93131a5aeffdb49f509e33d0b875f Mon Sep 17 00:00:00 2001 From: epriestley Date: Tue, 5 Dec 2017 05:35:06 -0800 Subject: [PATCH] (stable) Fix Mercurial commit history ordering Summary: See . In D18769, I rewrote this from using the `--branch` flag (which is unsafe and does not function on branches named `--config=x.y` and such). However, this rewrite accidentally changed the result order, which impacted Mercurial commit hisotry lists and graphs. Swap the order of the constraints so we get newest-to-oldest again, as expected. Test Plan: Viewed a Mercurial repository's history graph, saw sensible chronology after the patch. Reviewers: amckinley Reviewed By: amckinley Differential Revision: https://secure.phabricator.com/D18817 --- .../diffusion/conduit/DiffusionHistoryQueryConduitAPIMethod.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/applications/diffusion/conduit/DiffusionHistoryQueryConduitAPIMethod.php b/src/applications/diffusion/conduit/DiffusionHistoryQueryConduitAPIMethod.php index e36c0a124e..4c1d39e8c8 100644 --- a/src/applications/diffusion/conduit/DiffusionHistoryQueryConduitAPIMethod.php +++ b/src/applications/diffusion/conduit/DiffusionHistoryQueryConduitAPIMethod.php @@ -130,7 +130,7 @@ final class DiffusionHistoryQueryConduitAPIMethod } else { $path_arg = ''; $revset_arg = hgsprintf( - 'branch(%s) and reverse(ancestors(%s))', + 'reverse(ancestors(%s)) and branch(%s)', $drequest->getBranch(), $commit_hash); }