# HG changeset patch # User Jun Wu # Date 1493167410 25200 # Node ID af3ef002395de8bc9a1b015bf85a812974371f0b # Parent dc51700be00c421a8dc4b0fc1b50dd4ce9ccd3e9 parsers: add version to help detect breaking binary changes diff -r dc51700be00c -r af3ef002395d mercurial/parsers.c --- a/mercurial/parsers.c Tue Apr 25 17:36:59 2017 -0700 +++ b/mercurial/parsers.c Tue Apr 25 17:43:30 2017 -0700 @@ -2854,8 +2854,12 @@ void dirs_module_init(PyObject *mod); void manifest_module_init(PyObject *mod); +static const int version = 1; + static void module_init(PyObject *mod) { + PyModule_AddIntConstant(mod, "version", version); + /* This module constant has two purposes. First, it lets us unit test * the ImportError raised without hard-coding any error text. This * means we can change the text in the future without breaking tests,