Patchwork [1,of,2,stable,v2] parsers: introduce headrevsfiltered in C extension

login
register
mail settings
Submitter Mads Kiilerich
Date Oct. 26, 2014, 11:32 a.m.
Message ID <b47beb587afc679188a3.1414323177@localhost.localdomain>
Download mbox | patch
Permalink /patch/6468/
State Accepted
Headers show

Comments

Mads Kiilerich - Oct. 26, 2014, 11:32 a.m.
# HG changeset patch
# User Mads Kiilerich <madski@unity3d.com>
# Date 1414322050 -3600
#      Sun Oct 26 12:14:10 2014 +0100
# Branch stable
# Node ID b47beb587afc679188a3060d84cec4d6f38bbfb8
# Parent  eb763217152ab2b472416bcc57722451c317f282
parsers: introduce headrevsfiltered in C extension

All extensions that have this function do support filtering. The existing
headrevs function may support filtering but we cannot reliably detect whether
it does.

Patch

diff --git a/mercurial/parsers.c b/mercurial/parsers.c
--- a/mercurial/parsers.c
+++ b/mercurial/parsers.c
@@ -2109,7 +2109,9 @@  static PyMethodDef index_methods[] = {
 	{"get", (PyCFunction)index_m_get, METH_VARARGS,
 	 "get an index entry"},
 	{"headrevs", (PyCFunction)index_headrevs, METH_VARARGS,
-	 "get head revisions"},
+	 "get head revisions"}, /* Can do filtering since 3.2 */
+	{"headrevsfiltered", (PyCFunction)index_headrevs, METH_VARARGS,
+	 "get filtered head revisions"}, /* Can always do filtering */
 	{"insert", (PyCFunction)index_insert, METH_VARARGS,
 	 "insert an index entry"},
 	{"partialmatch", (PyCFunction)index_partialmatch, METH_VARARGS,