This revision was automatically updated to reflect the committed changes.
Closed by commit rHGb1f62cd39b5c: fsmonitor: layer on another hack in bser.c
for os.stat() compat (issue5811) (authored by durin42, committed by ).
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
indygreg accepted this revision.
indygreg added a comment.
This revision is now accepted and ready to land.
This is super hacky. That's par for the course for this file, sadly.
Also, I'm kinda surprised we're fully realizing the Python tuple to represent
stat results. If we made tuple
durin42 added a comment.
PTAL - I think this should be ready to go.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D2939
To: durin42, #hg-reviewers, indygreg
Cc: spectral, indygreg, mercurial-devel
___
Mercurial-devel
indygreg added a comment.
I managed to debug this.
`st[state.ST_MTIME]` will invoke `PyObject_GetItem`. Its implementation does
this:
m = o->ob_type->tp_as_mapping;
if (m && m->mp_subscript)
return m->mp_subscript(o, key);
if (o->ob_type->tp_as_sequence) {
durin42 added inline comments.
INLINE COMMENTS
> spectral wrote in bser.c:106
> My system pythons (2.7.13 and 3.5.3) have the following behaviors:
>
> ≻ python -c 'from __future__ import print_function; import os, sys, stat;
> print(sys.version); s=os.stat("."); print(s.st_mtime,
spectral added inline comments.
INLINE COMMENTS
> bser.c:106
> + if (i == 8 && PySequence_Size(obj->values) < 7) {
> +// Hack alert: Python 3 removed support for os.stat().st_mtime
> +// being an integer.Instead, if you need an integer, you have to
My system pythons (2.7.13 and 3.5.3)
indygreg added a comment.
I may look into this today. Having fsmonitor disabled makes operations on
Firefox repos much slower and this is hampering my ability to hack on that repo
:/
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D2939
To: durin42,
durin42 added a comment.
In https://phab.mercurial-scm.org/D2939#47601, @indygreg wrote:
> This still fails for me with:
>
> File "/home/gps/src/hg/mercurial/context.py", line 1590, in
_dirstatestatus
> clean=clean, unknown=unknown)
> File
indygreg requested changes to this revision.
indygreg added a comment.
This revision now requires changes to proceed.
This still fails for me with:
File "/home/gps/src/hg/mercurial/context.py", line 1590, in
_dirstatestatus
clean=clean, unknown=unknown)
File
durin42 updated this revision to Diff 7271.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D2939?vs=7270=7271
REVISION DETAIL
https://phab.mercurial-scm.org/D2939
AFFECTED FILES
hgext/fsmonitor/pywatchman/bser.c
CHANGE DETAILS
diff --git
durin42 added a subscriber: indygreg.
durin42 added a comment.
@indygreg I think you saw this failure mode, I'd appreciate it if you could
check if this fixes the watchman failures I introduced (I don't use watchman,
and so I'm not quite sure how to reproduce.)
REPOSITORY
rHG Mercurial
durin42 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REVISION SUMMARY
It's unclear to me how these `bserobj_tuple` objects are used, other
than as stat objects. This should fix fsmonitor in the wake of
12 matches
Mail list logo