diff --git a/mercurial/cext/parsers.c b/mercurial/cext/parsers.c --- a/mercurial/cext/parsers.c +++ b/mercurial/cext/parsers.c @@ -567,6 +567,14 @@ Py_RETURN_FALSE; } }; +static PyObject *dirstate_item_get_p1_tracked(dirstateItemObject *self) +{ + if (self->flags & dirstate_flag_p1_tracked) { + Py_RETURN_TRUE; + } else { + Py_RETURN_FALSE; + } +}; static PyObject *dirstate_item_get_added(dirstateItemObject *self) { @@ -642,6 +650,8 @@ {"mtime", (getter)dirstate_item_get_mtime, NULL, "mtime", NULL}, {"state", (getter)dirstate_item_get_state, NULL, "state", NULL}, {"tracked", (getter)dirstate_item_get_tracked, NULL, "tracked", NULL}, + {"p1_tracked", (getter)dirstate_item_get_p1_tracked, NULL, "p1_tracked", + NULL}, {"added", (getter)dirstate_item_get_added, NULL, "added", NULL}, {"p2_info", (getter)dirstate_item_get_p2_info, NULL, "p2_info", NULL}, {"merged", (getter)dirstate_item_get_merged, NULL, "merged", NULL}, diff --git a/mercurial/pure/parsers.py b/mercurial/pure/parsers.py --- a/mercurial/pure/parsers.py +++ b/mercurial/pure/parsers.py @@ -301,6 +301,11 @@ return True @property + def p1_tracked(self): + """True if the file is tracked in the first parent manifest""" + return self._p1_tracked + + @property def p2_info(self): """True if the file needed to merge or apply any input from p2