f.write("modified")
self.client_add("checkout/bla.txt")
self.assertTrue(context.text_modified("checkout/bla.txt"))
+
+ def test_props_modified(self):
+ context = wc.Context()
+ self.make_client("repos", "checkout")
+ with open('checkout/bla.txt', 'w') as f:
+ f.write("modified")
+ self.client_add("checkout/bla.txt")
+ self.assertFalse(context.props_modified("checkout/bla.txt"))
return PyBool_FromLong(modified);
}
+static PyObject *py_wc_context_props_modified_p2(PyObject *self, PyObject *args)
+{
+ PyObject* py_path;
+ const char *path;
+ apr_pool_t *pool;
+ svn_wc_context_t *wc_context = ((ContextObject *)self)->context;
+ svn_boolean_t modified;
+
+ if (!PyArg_ParseTuple(args, "O", &py_path))
+ return NULL;
+
+ pool = Pool(NULL);
+
+ path = py_object_to_svn_abspath(py_path, pool);
+ if (path == NULL) {
+ apr_pool_destroy(pool);
+ return NULL;
+ }
+
+ RUN_SVN_WITH_POOL(pool, svn_wc_props_modified_p2(&modified, wc_context,
+ path, pool));
+
+ apr_pool_destroy(pool);
+
+ return PyBool_FromLong(modified);
+}
+
+
static PyMethodDef context_methods[] = {
{ "locked", py_wc_context_locked, METH_VARARGS, "locked(path) -> (locked_here, locked)\n"
"Check whether a patch is locked."},
"Check format version of a working copy." },
{ "text_modified", py_wc_context_text_modified_p2, METH_VARARGS, "text_modified(path) -> bool\n"
"Check whether text of a file is modified against base." },
+ { "props_modified", py_wc_context_props_modified_p2, METH_VARARGS, "props_modified(path) -> bool\n"
+ "Check whether props of a file are modified against base." },
{ NULL }
};