[PATCH 1 of 2 stable] tests: do not depend on order of os.walk in convert tests
Patrick Mézard
patrick at mezard.eu
Wed Aug 1 06:41:54 CDT 2012
Le 01/08/12 11:52, Mads Kiilerich a écrit :
> On 01/08/12 09:50, Ross Lagerwall wrote:
>> A second attempt at fixing the test-convert-git.t failures on Fedora 17.
>
> FWIW: I don't see any failure on my F17 with git-1.7.11.2-2.fc17.i686. The problem you see must thus have some other cause.
I see the failure (git-repo4 test not failing) both on OSX with 1.7.11.3 and on Windows XP with 1.7.11.msysgit.1.
[...]
>> diff --git a/tests/test-convert-git.t b/tests/test-convert-git.t
>> --- a/tests/test-convert-git.t
>> +++ b/tests/test-convert-git.t
>> @@ -281,20 +281,29 @@
>> abort: --sourcesort is not supported by this data source
>> [255]
>> -damage git repository and convert again
>> - $ cat > damage.py <<EOF
>> - > import os
>> - > import stat
>> - > for root, dirs, files in os.walk('git-repo4/.git/objects'):
>> - > if files:
>> - > path = os.path.join(root, files[0])
>> - > if os.name == 'nt':
>> - > os.chmod(path, stat.S_IWUSR)
>
> The chmod is there for a reason and should not be removed - check the file history with 'annotate'.
Testing on Windows, msys rm does not seem to care about read-only files, we can forget about this one.
About portability, I am more concerned by blob identifiers changing between platforms or git versions. I have not seen any problem until now, I suggest we try this version and see what breaks.
--
Patrick Mézard
More information about the Mercurial-devel
mailing list