[PATCH 2 of 4 V3] dirstate: add code to populate the non-normal map on dirstate packing/parsing
Laurent Charignon
lcharignon at fb.com
Thu Dec 17 17:45:26 CST 2015
I sent a V5 fixing that.
Thanks!
Laurent
On Dec 17, 2015, at 12:47 PM, Bryan O'Sullivan <bos at serpentine.com<mailto:bos at serpentine.com>> wrote:
On Thu, Dec 17, 2015 at 10:24 AM, Laurent Charignon <lcharignon at fb.com<mailto:lcharignon at fb.com>> wrote:
+static inline int add_to_nonnormalmap(PyObject *fname, PyObject *nonnmap,
+ PyObject * statestring, char state, int mtime)
{
+ if (fname && nonnmap) {
+ if (state != 'n' && PyDict_SetItem(nonnmap, fname, statestring) == -1)
+ return -1;
+ if (state == 'n' && mtime == -1
+ && PyDict_SetItem(nonnmap, fname, statestring) == -1)
+ return -1;
For coding style consistency, please let the && hang at the end of the line, and align the following line beneath the open paren.
+ if nonnormalmap is not None and e[0] != 'n' or e[3] == -1:
+ nonnormalmap[f] = e[:4]
Please use explicit parens to make the intended meaning of the "and" and "or" clear here.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20151217/cc6ff00a/attachment.html>
More information about the Mercurial-devel
mailing list