[PATCH 1 of 2] patches: move assignment outside the conditional
Boris Feld
boris.feld at octobus.net
Tue Feb 6 14:28:02 UTC 2018
# HG changeset patch
# User Boris Feld <boris.feld at octobus.net>
# Date 1517923456 -3600
# Tue Feb 06 14:24:16 2018 +0100
# Node ID eee9cca843bc557274945688ea52e16539d45e67
# Parent 1a31111e6239a2eb841a5dce5e1cf8212c54bf33
# EXP-Topic parallel-patching
# Available At https://bitbucket.org/octobus/mercurial-devel/
# hg pull https://bitbucket.org/octobus/mercurial-devel/ -r eee9cca843bc
patches: move assignment outside the conditional
Having this movement in its own patch will make the next patch clearer.
diff --git a/mercurial/cext/mpatch.c b/mercurial/cext/mpatch.c
--- a/mercurial/cext/mpatch.c
+++ b/mercurial/cext/mpatch.c
@@ -110,7 +110,8 @@ patches(PyObject *self, PyObject *args)
goto cleanup;
}
out = PyBytes_AsString(result);
- if ((r = mpatch_apply(out, in, inlen, patch)) < 0) {
+ r = mpatch_apply(out, in, inlen, patch);
+ if (r < 0) {
Py_DECREF(result);
result = NULL;
}
More information about the Mercurial-devel
mailing list