mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 16:57:49 +03:00
ctree: fix treemanifest.diff signature
Summary: Turns out that manifest.diff accepts kwargs, so we need to support that signature. We'll come back and actually implement clean=True support later. Test Plan: Ran 'hg diff -r master^ -r master' with some future patches and verified the result was correct (it originally failed entirely because diff had the wrong signature). Reviewers: #fastmanifest, ttung Reviewed By: ttung Subscribers: ttung Differential Revision: https://phabricator.intern.facebook.com/D3766104 Signature: t1:3766104:1472156875:0ce2a16286b1e4fd6b0f2260249e3318270d8814
This commit is contained in:
parent
2ed42c2e18
commit
38ad2b9ab5
@ -301,11 +301,13 @@ static void treemanifest_diffrecurse(
|
||||
}
|
||||
}
|
||||
|
||||
static PyObject *treemanifest_diff(PyObject *o, PyObject *args) {
|
||||
static PyObject *treemanifest_diff(PyObject *o, PyObject *args, PyObject *kwargs) {
|
||||
py_treemanifest *self = (py_treemanifest*)o;
|
||||
PyObject *otherObj;
|
||||
PyObject *cleanObj;
|
||||
static char const *kwlist[] = {"m2", "clean", NULL};
|
||||
|
||||
if (!PyArg_ParseTuple(args, "O", &otherObj)) {
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O", (char**)kwlist, &otherObj, &cleanObj)) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -699,7 +701,7 @@ static PyObject *treemanifest_matches(py_treemanifest *self, PyObject *args) {
|
||||
// ==== treemanifest ctype declaration ====
|
||||
|
||||
static PyMethodDef treemanifest_methods[] = {
|
||||
{"diff", treemanifest_diff, METH_VARARGS, "performs a diff of the given two manifests\n"},
|
||||
{"diff", (PyCFunction)treemanifest_diff, METH_VARARGS|METH_KEYWORDS, "performs a diff of the given two manifests\n"},
|
||||
{"find", treemanifest_find, METH_VARARGS, "returns the node and flag for the given filepath\n"},
|
||||
{"flags", (PyCFunction)treemanifest_flags, METH_VARARGS|METH_KEYWORDS,
|
||||
"returns the flag for the given filepath\n"},
|
||||
|
Loading…
Reference in New Issue
Block a user