Comment 1 by Stephen Leake, Oct 27, 2010
this test is also broken in the same way in version 0.48. overriding the execute attr init function lets the test pass in 8f507884dab9bab6b439cec51f6adc6d006d3e66: attr_init_functions["mtn:execute"] = function(filename) return nil end
Comment 2 by Thomas Moschny, Oct 27, 2010
How can "attrs can be set after a commit"? Or, more precisely, how's that different from "file contents can be changed after a commit"? Attributes are part of the manifest and thus of course part of the revision hash. Do you propose to change this?
Comment 3 by Richard Levitte, Oct 27, 2010
Looking at the source, I'd say that the problem lies in the added lua routine called is_executable(). The actual function that implements that routine can be found in unix/process.cc and win32/process.cc. win32/process.cc does nothing (it just returns false), while unix/process.cc does what's sensible for Unix. So, the question in the end is, which of those two does Cygwin use? I'm guessing it uses unix/process.cc. Doesn't seem to be the right thing to do, but I don't know enough about Cygwin to have an opinion, all I wanted was to point at where the problem should be.
Comment 4 by Richard Levitte, Oct 27, 2010
Further analysis shows that, in fact, Cygwin is regarded as unix by configure.ac. This is probably normally a good thing, since it tries to emulate unix... but when it comes to is_executable, maybe that's not the best idea. So we have a choice. Either add *-pc-cygwin in the case that catches Win32 platforms in configure.ac, or make is_executable in unix/process.cc a special case for Cygwin.
Comment 5 by Stephen Leake, Oct 28, 2010
> How can "attrs can be set after a commit"? 'mtn attr set' > Or, more precisely, how's that different from "file contents can be > changed after a commit"? I thought it was; apparently I'm wrong. > Attributes are part of the manifest and thus of course part of the > revision hash. Do you propose to change this? No, I was just wrong; attrs are part of the revision hash. This is discussed in monotone.info; I've just missed it before now. So the issue resolves to ensuring that attrs are consistently applied within a project, and specifically for this and other tests. There is no way to make an automatic execute attr detector get the 'right' answer on all platforms (because there is no 'right' answer), so that's not a solution for this test. Thus the issue of the execute attr being set incorrectly on Cygwin (and other platforms) is a separate issue; I'll file a separate bug report for that. The attr_init_functions I provide below is a reasonable solution for this bug. It should be in test_hooks.lua, so all the tests benefit from it. We should do the same for attr_init_functions["mtn:manual_merge"], so future changes to that don't break tests. Those are the only attr_init_functions in std_hooks.lua
Comment 6 by Stephen Leake, Nov 20, 2010
fixed in 00d480b93189317980e1ce63bcec1e69a4e66f5e by overloading attr_init_functions["mtn:execute"] to return 'nil' for all tests. manual_merge is not a problem for the tests
Status:
Fixed
Sign in to reply to this comment.
Reported by Stephen Leake, Oct 27, 2010