Vijay Balakrishna <Vijay.Balakrishna at Sun.COM> writes: > I need comments/suggestion on my approach for bug > 261 Need a permchk (Permissions Check) check module > webrev: http://cr.opensolaris.org/~vijaybk/webrev_261/ > > I have all changes in cdm.py to warn for presence of +x. Do we need > usr/src/tools/onbld/Checks/PermChk.py (new)? Also, we may gate hook to > reject push that I haven't looked into.
I suspect you don't actually have to go through the bit with lstat(), if the workspace is modified, the localtip will be an instance of workingctx() which will build a manifest based on the dirstate, I'd expect the second loop to be enough for both cases. In both loops, you print the "The following files..." banner within the loop, so it'll be output once per file, it would seem better to collect a list of files, and output them at once, under a single banner. If the first paragraph here isn't accurate, I suspect your first loop will misbehave when files have been removed, renamed, or have been deleted (with rm) but not removed from Hg control. It'd be good to wrap the strings used in the warning. Other than that, looks good, I think. -- Rich