monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Monotone-devel] very strange cygwin/mingw difference


From: Stephen Leake
Subject: Re: [Monotone-devel] very strange cygwin/mingw difference
Date: Wed, 27 Oct 2010 07:10:45 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (windows-nt)

Thomas Keller <address@hidden> writes:

> Am 27.10.2010 09:49, schrieb Stephen Leake:
>> Stephen Leake <address@hidden> writes:
>> 
>>> diff_on_missing_trailing_newline_at_end_of_file is passing on MinGW and
>>> Debian, but failing on Cygwin.
>>>
>>> The failure is because the revid for the commit is different:
>>>
>>> stdout:
>>> #
>>> # old_revision [b0598d59ea7c3b8b4a6f27e5ac80c1337c33f1c3]
>>> #
>>>
>>> file13.diff:
>>> #
>>> # old_revision [40ea110392539e19c2d251569a3610c0051e0c64]
>>> #
>>>
>>> the revision contains two files. I don't see how they can have different
>>> revids.
>>>
>>> I'll try to investigate further; any ideas?
>> 
>> I think I found it; cygwin sets the "mtn:execute" attribute, but mingw
>> doesn't. And that's part of the manifest that is hashed for the id:
>> 
>> cygwin:
>> $../../../mtn.exe au get_manifest_of 
>> format_version "1"
>> 
>> dir ""
>> 
>>    file "file1"
>> content [a43dc27b1c92cccc533ceb3a27035128e26e5b07]
>>    attr "mtn:execute" "true"
>> 
>>    file "file2"
>> content [4f8091d2fa31b0598dd0ff6dc936f8d0b47b59d1]
>>    attr "mtn:execute" "true"
>> 
>> 
>> mingw:
>> ../../../mtn.exe au get_manifest_of 
>> format_version "1"
>> 
>> dir ""
>> 
>>    file "file1"
>> content [a43dc27b1c92cccc533ceb3a27035128e26e5b07]
>> 
>>    file "file2"
>> content [4f8091d2fa31b0598dd0ff6dc936f8d0b47b59d1]
>
> Hrm... I'm by no means a Windows expert, but does plain Win32 (not
> Cygwin) even have the concept of an executable bit...? This might be the
> reason why its not set on mingw.

Neither file is actually executable; the fact that Cygwin sets it is a
separate bug.

On Windows, "executable" is determined by the file extension; *.com,
*.exe, and others are recognized as executable by the DOS shell. The
actual list is set by the PATHEXT environment variable; mine seems to be
set to:

PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH

As far as I can tell, monotone has never gotten automatic setting of the
executable attribute right on any platform; I've just been ignoring it.

However, that doesn't address the issue of whether setting an attribute
on a rev should change the revid. Since we can set attributes after the
rev has been committed, attrs should not affect the revid; this has to
be a recent bug in mtn. I'll do a bisect to see when this test broke.

-- 
-- Stephe



reply via email to

[Prev in Thread] Current Thread [Next in Thread]