New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing PhpUnit support for windows #8694

Merged
merged 15 commits into from Sep 8, 2015

Conversation

Projects
None yet
5 participants
@ThaDafinser
Contributor

ThaDafinser commented Sep 2, 2015

Allow running tests on windows
http://forum.piwik.org/read.php?15,126943

Started around with this php console tests:run unit

Did you know? You can run tests faster by disabling xdebug (if you need xdebug, speed up tests by setting xdebug.coverage_enable=0)
Executing command: cd C:\Data\wap\htdocs\GitHub\piwik/tests/PHPUnit && C:\Data\wap\htdocs\GitHub\piwik/vendor/bin/phpunit   --testsuite UnitTests
PHPUnit 4.7.7 by Sebastian Bergmann and contributors.

Runtime:    PHP 5.6.7 with Xdebug 2.3.2
Configuration:  C:\Data\wap\htdocs\GitHub\piwik\tests\PHPUnit\phpunit.xml.dist

..FF.FFFFFFF................................................   60 / 2942 (  2%)
............................................................  120 / 2942 (  4%)
............................................................  180 / 2942 (  6%)
..............................................F..F....F.....  240 / 2942 (  8%)
............................................................  300 / 2942 ( 10%)
............................................................  360 / 2942 ( 12%)
............................................................  420 / 2942 ( 14%)
............................................................  480 / 2942 ( 16%)
......................F.......FF...FFFF.....................  540 / 2942 ( 18%)
........FFFFFFFFFFFFFFFFFF..................................  600 / 2942 ( 20%)
............................................................  660 / 2942 ( 22%)
..............FF.....F.FFF.F...FFFF...........SSFFFF.FFFFF.F  720 / 2942 ( 24%)
F...........................................................  780 / 2942 ( 26%)
............................................................  840 / 2942 ( 28%)
............................................................  900 / 2942 ( 30%)
............................................................  960 / 2942 ( 32%)
............................................................ 1020 / 2942 ( 34%)
............................................................ 1080 / 2942 ( 36%)
............................................................ 1140 / 2942 ( 38%)
............................................................ 1200 / 2942 ( 40%)
............................................................ 1260 / 2942 ( 42%)
............................................................ 1320 / 2942 ( 44%)
............................................................ 1380 / 2942 ( 46%)
.F..FF.F.F...FFFFFFFFF.FFF.....F..FFFFFFFFFFFFF............. 1440 / 2942 ( 48%)
..............................................FFFFFFFFFFFFFF 1500 / 2942 ( 50%)
FFFFFF...................................................... 1560 / 2942 ( 53%)
............................................................ 1620 / 2942 ( 55%)
............................................................ 1680 / 2942 ( 57%)
............................................................ 1740 / 2942 ( 59%)
............................................................ 1800 / 2942 ( 61%)
............................................................ 1860 / 2942 ( 63%)
............................................................ 1920 / 2942 ( 65%)
............................................................ 1980 / 2942 ( 67%)
............................................................ 2040 / 2942 ( 69%)
............................................................ 2100 / 2942 ( 71%)
............................................................ 2160 / 2942 ( 73%)
............................................................ 2220 / 2942 ( 75%)
............................................................ 2280 / 2942 ( 77%)
............................................................ 2340 / 2942 ( 79%)
............................................................ 2400 / 2942 ( 81%)
............................................................ 2460 / 2942 ( 83%)
............................................................ 2520 / 2942 ( 85%)
............................................................ 2580 / 2942 ( 87%)
............................................................ 2640 / 2942 ( 89%)
............................................................ 2700 / 2942 ( 91%)
............................................................ 2760 / 2942 ( 93%)
............................................................ 2820 / 2942 ( 95%)
.............E.............................................. 2880 / 2942 ( 97%)
............................................................ 2940 / 2942 ( 99%)

@ThaDafinser ThaDafinser changed the title from Feature/windows to [WIP] Feature/windows Sep 2, 2015

ThaDafinser added some commits Sep 2, 2015

ThaDafinser added some commits Sep 2, 2015

@ThaDafinser ThaDafinser referenced this pull request Sep 2, 2015

Closed

[WIP] Skip dot #7

@ThaDafinser

This comment has been minimized.

Show comment
Hide comment
@ThaDafinser

ThaDafinser Sep 2, 2015

Contributor

i executed vendor\bin\php-cs-fixer fix [PATHS...] --fixers=linefeed for the newline problems

folders: core/plugins/tests

Contributor

ThaDafinser commented Sep 2, 2015

i executed vendor\bin\php-cs-fixer fix [PATHS...] --fixers=linefeed for the newline problems

folders: core/plugins/tests

ThaDafinser added some commits Sep 2, 2015

@ThaDafinser

This comment has been minimized.

Show comment
Hide comment
@ThaDafinser

ThaDafinser Sep 2, 2015

Contributor

Getting closer...

Contributor

ThaDafinser commented Sep 2, 2015

Getting closer...

@ThaDafinser

This comment has been minimized.

Show comment
Hide comment
@ThaDafinser

ThaDafinser Sep 2, 2015

Contributor

The unit test run now all on windows, expect one...but thats hard to fix since its a file lock with a parallel request!

@tsteur i'm done with it...if you think its good you can merge it.


C:\Data\wap\htdocs\GitHub\piwik>php console tests:run unit
Did you know? You can run tests faster by disabling xdebug (if you need xdebug,
speed up tests by setting xdebug.coverage_enable=0)
Executing command: cd C:\Data\wap\htdocs\GitHub\piwik/tests/PHPUnit && C:\Data\w
ap\htdocs\GitHub\piwik/vendor/bin/phpunit   --testsuite UnitTests
PHPUnit 4.7.7 by Sebastian Bergmann and contributors.

Runtime:        PHP 5.6.7 with Xdebug 2.3.2
Configuration:  C:\Data\wap\htdocs\GitHub\piwik\tests\PHPUnit\phpunit.xml.dist

............................................................   60 / 2942 (  2%)
............................................................  120 / 2942 (  4%)
............................................................  180 / 2942 (  6%)
............................................................  240 / 2942 (  8%)
............................................................  300 / 2942 ( 10%)
............................................................  360 / 2942 ( 12%)
............................................................  420 / 2942 ( 14%)
............................................................  480 / 2942 ( 16%)
............................................................  540 / 2942 ( 18%)
............................................................  600 / 2942 ( 20%)
............................................................  660 / 2942 ( 22%)
..............................................SS.........S..  720 / 2942 ( 24%)
............................................................  780 / 2942 ( 26%)
............................................................  840 / 2942 ( 28%)
............................................................  900 / 2942 ( 30%)
............................................................  960 / 2942 ( 32%)
............................................................ 1020 / 2942 ( 34%)
............................................................ 1080 / 2942 ( 36%)
............................................................ 1140 / 2942 ( 38%)
............................................................ 1200 / 2942 ( 40%)
............................................................ 1260 / 2942 ( 42%)
............................................................ 1320 / 2942 ( 44%)
............................................................ 1380 / 2942 ( 46%)
............................................................ 1440 / 2942 ( 48%)
............................................................ 1500 / 2942 ( 50%)
............................................................ 1560 / 2942 ( 53%)
............................................................ 1620 / 2942 ( 55%)
............................................................ 1680 / 2942 ( 57%)
............................................................ 1740 / 2942 ( 59%)
............................................................ 1800 / 2942 ( 61%)
............................................................ 1860 / 2942 ( 63%)
............................................................ 1920 / 2942 ( 65%)
............................................................ 1980 / 2942 ( 67%)
............................................................ 2040 / 2942 ( 69%)
............................................................ 2100 / 2942 ( 71%)
............................................................ 2160 / 2942 ( 73%)
............................................................ 2220 / 2942 ( 75%)
............................................................ 2280 / 2942 ( 77%)
............................................................ 2340 / 2942 ( 79%)
............................................................ 2400 / 2942 ( 81%)
............................................................ 2460 / 2942 ( 83%)
............................................................ 2520 / 2942 ( 85%)
............................................................ 2580 / 2942 ( 87%)
............................................................ 2640 / 2942 ( 89%)
............................................................ 2700 / 2942 ( 91%)
............................................................ 2760 / 2942 ( 93%)
............................................................ 2820 / 2942 ( 95%)
.............E.............................................. 2880 / 2942 ( 97%)
............................................................ 2940 / 2942 ( 99%)
..

Time: 1.55 minutes, Memory: 49.50Mb

There was 1 error:

1) Piwik\Plugins\UserCountry\tests\Unit\UserCountryTest::testGeoIpUpdaterRedunda
ntChecks
rename(C:\Data\wap\htdocs\GitHub\piwik/tests/lib/geoip-files/GeoIPISP.dat,C:\Dat
a\wap\htdocs\GitHub\piwik/tests/lib/geoip-files/GeoIPISP.dat.broken): Der Prozes
s kann nicht auf die Datei zugreifen, da sie von einem anderen Prozess verwendet
 wird. (code: 32)

C:\Data\wap\htdocs\GitHub\piwik\plugins\UserCountry\GeoIPAutoUpdater.php:563
C:\Data\wap\htdocs\GitHub\piwik\plugins\UserCountry\tests\Unit\UserCountryTest.p
hp:181
C:\Data\wap\htdocs\GitHub\piwik\plugins\UserCountry\tests\Unit\UserCountryTest.p
hp:92

--

There were 3 skipped tests:

1) Piwik\Tests\Unit\Metrics\FormatterTest::test_getPrettyTimeFromSeconds_Returns
CorrectResult with data set #6 (31536000, array('365 days 0 hours', '8760:00:00'
))
Will not pass on 32-bit machine.

C:\Data\wap\htdocs\GitHub\piwik\tests\PHPUnit\Unit\Metrics\FormatterTest.php:116


2) Piwik\Tests\Unit\Metrics\FormatterTest::test_getPrettyTimeFromSeconds_Returns
CorrectResult with data set #7 (32421600.0, array('1 years 10 days', '9006:00:00
'))
Will not pass on 32-bit machine.

C:\Data\wap\htdocs\GitHub\piwik\tests\PHPUnit\Unit\Metrics\FormatterTest.php:116


3) Piwik\Tests\Unit\Metrics\FormatterTest::test_getPrettyTimeFromSeconds_Returns
CorrectResult with data set #17 (-31536000, array('-365 days 0 hours', '-8760:00
:00'))
Will not pass on 32-bit machine.

C:\Data\wap\htdocs\GitHub\piwik\tests\PHPUnit\Unit\Metrics\FormatterTest.php:116


FAILURES!
Tests: 2942, Assertions: 5865, Errors: 1, Skipped: 3.


C:\Data\wap\htdocs\GitHub\piwik>
Contributor

ThaDafinser commented Sep 2, 2015

The unit test run now all on windows, expect one...but thats hard to fix since its a file lock with a parallel request!

@tsteur i'm done with it...if you think its good you can merge it.


C:\Data\wap\htdocs\GitHub\piwik>php console tests:run unit
Did you know? You can run tests faster by disabling xdebug (if you need xdebug,
speed up tests by setting xdebug.coverage_enable=0)
Executing command: cd C:\Data\wap\htdocs\GitHub\piwik/tests/PHPUnit && C:\Data\w
ap\htdocs\GitHub\piwik/vendor/bin/phpunit   --testsuite UnitTests
PHPUnit 4.7.7 by Sebastian Bergmann and contributors.

Runtime:        PHP 5.6.7 with Xdebug 2.3.2
Configuration:  C:\Data\wap\htdocs\GitHub\piwik\tests\PHPUnit\phpunit.xml.dist

............................................................   60 / 2942 (  2%)
............................................................  120 / 2942 (  4%)
............................................................  180 / 2942 (  6%)
............................................................  240 / 2942 (  8%)
............................................................  300 / 2942 ( 10%)
............................................................  360 / 2942 ( 12%)
............................................................  420 / 2942 ( 14%)
............................................................  480 / 2942 ( 16%)
............................................................  540 / 2942 ( 18%)
............................................................  600 / 2942 ( 20%)
............................................................  660 / 2942 ( 22%)
..............................................SS.........S..  720 / 2942 ( 24%)
............................................................  780 / 2942 ( 26%)
............................................................  840 / 2942 ( 28%)
............................................................  900 / 2942 ( 30%)
............................................................  960 / 2942 ( 32%)
............................................................ 1020 / 2942 ( 34%)
............................................................ 1080 / 2942 ( 36%)
............................................................ 1140 / 2942 ( 38%)
............................................................ 1200 / 2942 ( 40%)
............................................................ 1260 / 2942 ( 42%)
............................................................ 1320 / 2942 ( 44%)
............................................................ 1380 / 2942 ( 46%)
............................................................ 1440 / 2942 ( 48%)
............................................................ 1500 / 2942 ( 50%)
............................................................ 1560 / 2942 ( 53%)
............................................................ 1620 / 2942 ( 55%)
............................................................ 1680 / 2942 ( 57%)
............................................................ 1740 / 2942 ( 59%)
............................................................ 1800 / 2942 ( 61%)
............................................................ 1860 / 2942 ( 63%)
............................................................ 1920 / 2942 ( 65%)
............................................................ 1980 / 2942 ( 67%)
............................................................ 2040 / 2942 ( 69%)
............................................................ 2100 / 2942 ( 71%)
............................................................ 2160 / 2942 ( 73%)
............................................................ 2220 / 2942 ( 75%)
............................................................ 2280 / 2942 ( 77%)
............................................................ 2340 / 2942 ( 79%)
............................................................ 2400 / 2942 ( 81%)
............................................................ 2460 / 2942 ( 83%)
............................................................ 2520 / 2942 ( 85%)
............................................................ 2580 / 2942 ( 87%)
............................................................ 2640 / 2942 ( 89%)
............................................................ 2700 / 2942 ( 91%)
............................................................ 2760 / 2942 ( 93%)
............................................................ 2820 / 2942 ( 95%)
.............E.............................................. 2880 / 2942 ( 97%)
............................................................ 2940 / 2942 ( 99%)
..

Time: 1.55 minutes, Memory: 49.50Mb

There was 1 error:

1) Piwik\Plugins\UserCountry\tests\Unit\UserCountryTest::testGeoIpUpdaterRedunda
ntChecks
rename(C:\Data\wap\htdocs\GitHub\piwik/tests/lib/geoip-files/GeoIPISP.dat,C:\Dat
a\wap\htdocs\GitHub\piwik/tests/lib/geoip-files/GeoIPISP.dat.broken): Der Prozes
s kann nicht auf die Datei zugreifen, da sie von einem anderen Prozess verwendet
 wird. (code: 32)

C:\Data\wap\htdocs\GitHub\piwik\plugins\UserCountry\GeoIPAutoUpdater.php:563
C:\Data\wap\htdocs\GitHub\piwik\plugins\UserCountry\tests\Unit\UserCountryTest.p
hp:181
C:\Data\wap\htdocs\GitHub\piwik\plugins\UserCountry\tests\Unit\UserCountryTest.p
hp:92

--

There were 3 skipped tests:

1) Piwik\Tests\Unit\Metrics\FormatterTest::test_getPrettyTimeFromSeconds_Returns
CorrectResult with data set #6 (31536000, array('365 days 0 hours', '8760:00:00'
))
Will not pass on 32-bit machine.

C:\Data\wap\htdocs\GitHub\piwik\tests\PHPUnit\Unit\Metrics\FormatterTest.php:116


2) Piwik\Tests\Unit\Metrics\FormatterTest::test_getPrettyTimeFromSeconds_Returns
CorrectResult with data set #7 (32421600.0, array('1 years 10 days', '9006:00:00
'))
Will not pass on 32-bit machine.

C:\Data\wap\htdocs\GitHub\piwik\tests\PHPUnit\Unit\Metrics\FormatterTest.php:116


3) Piwik\Tests\Unit\Metrics\FormatterTest::test_getPrettyTimeFromSeconds_Returns
CorrectResult with data set #17 (-31536000, array('-365 days 0 hours', '-8760:00
:00'))
Will not pass on 32-bit machine.

C:\Data\wap\htdocs\GitHub\piwik\tests\PHPUnit\Unit\Metrics\FormatterTest.php:116


FAILURES!
Tests: 2942, Assertions: 5865, Errors: 1, Skipped: 3.


C:\Data\wap\htdocs\GitHub\piwik>

@ThaDafinser ThaDafinser changed the title from [WIP] Feature/windows to Fixing PhpUnit support for windows Sep 2, 2015

@tsteur

This comment has been minimized.

Show comment
Hide comment
@tsteur

tsteur Sep 2, 2015

Member

I'm getting the same error under Linux/Ubuntu. Never looked into it.

Member

tsteur commented Sep 2, 2015

I'm getting the same error under Linux/Ubuntu. Never looked into it.

@ThaDafinser

This comment has been minimized.

Show comment
Hide comment
@ThaDafinser

ThaDafinser Sep 2, 2015

Contributor

After this is merged, i will look into #8648 again

Contributor

ThaDafinser commented Sep 2, 2015

After this is merged, i will look into #8648 again

@mattab

View changes

Show outdated Hide outdated core/Intl/Locale.php
@mattab

This comment has been minimized.

Show comment
Hide comment
@mattab

mattab Sep 3, 2015

Member

Left a comment, otherwise looks good to me 👍

Member

mattab commented Sep 3, 2015

Left a comment, otherwise looks good to me 👍

@ThaDafinser

This comment has been minimized.

Show comment
Hide comment
@ThaDafinser

ThaDafinser Sep 3, 2015

Contributor

@mattab ty for the review. I changed that line

Contributor

ThaDafinser commented Sep 3, 2015

@mattab ty for the review. I changed that line

mattab pushed a commit that referenced this pull request Sep 8, 2015

Matthieu Aubry
Merge pull request #8694 from ThaDafinser/feature/windows
Fixing PhpUnit support for windows

@mattab mattab merged commit 9c2ae2b into matomo-org:master Sep 8, 2015

1 of 2 checks passed

continuous-integration/travis-ci/pr The Travis CI build failed
Details
Scrutinizer 1 new issues, 2 updated code elements
Details
@mattab

This comment has been minimized.

Show comment
Hide comment
@mattab

mattab Sep 8, 2015

Member

Thanks @ThaDafinser - btw are tests passing on your Windows machine now?

Member

mattab commented Sep 8, 2015

Thanks @ThaDafinser - btw are tests passing on your Windows machine now?

@ThaDafinser

This comment has been minimized.

Show comment
Hide comment
@ThaDafinser

ThaDafinser Sep 9, 2015

Contributor

@mattab with this PR yes. Expect this error

There was 1 error:

1) Piwik\Plugins\UserCountry\tests\Unit\UserCountryTest::testGeoIpUpdaterRedunda
ntChecks
rename(C:\Data\wap\htdocs\GitHub\piwik/tests/lib/geoip-files/GeoIPISP.dat,C:\Dat
a\wap\htdocs\GitHub\piwik/tests/lib/geoip-files/GeoIPISP.dat.broken): Der Prozes
s kann nicht auf die Datei zugreifen, da sie von einem anderen Prozess verwendet
 wird. (code: 32)

C:\Data\wap\htdocs\GitHub\piwik\plugins\UserCountry\GeoIPAutoUpdater.php:563
C:\Data\wap\htdocs\GitHub\piwik\plugins\UserCountry\tests\Unit\UserCountryTest.p
hp:181
C:\Data\wap\htdocs\GitHub\piwik\plugins\UserCountry\tests\Unit\UserCountryTest.p
hp:92
Contributor

ThaDafinser commented Sep 9, 2015

@mattab with this PR yes. Expect this error

There was 1 error:

1) Piwik\Plugins\UserCountry\tests\Unit\UserCountryTest::testGeoIpUpdaterRedunda
ntChecks
rename(C:\Data\wap\htdocs\GitHub\piwik/tests/lib/geoip-files/GeoIPISP.dat,C:\Dat
a\wap\htdocs\GitHub\piwik/tests/lib/geoip-files/GeoIPISP.dat.broken): Der Prozes
s kann nicht auf die Datei zugreifen, da sie von einem anderen Prozess verwendet
 wird. (code: 32)

C:\Data\wap\htdocs\GitHub\piwik\plugins\UserCountry\GeoIPAutoUpdater.php:563
C:\Data\wap\htdocs\GitHub\piwik\plugins\UserCountry\tests\Unit\UserCountryTest.p
hp:181
C:\Data\wap\htdocs\GitHub\piwik\plugins\UserCountry\tests\Unit\UserCountryTest.p
hp:92
@mattab

This comment has been minimized.

Show comment
Hide comment
@mattab

mattab Sep 11, 2015

Member

from @diosmosis

just a note: since the addition of https://github.com/piwik/piwik/blob/master/.gitattributes it is now required to add an entry to the file when adding a new type of binary file to the repo (eg, *.bz2 binary)

Member

mattab commented Sep 11, 2015

from @diosmosis

just a note: since the addition of https://github.com/piwik/piwik/blob/master/.gitattributes it is now required to add an entry to the file when adding a new type of binary file to the repo (eg, *.bz2 binary)

tsteur added a commit to matomo-org/developer-documentation that referenced this pull request Sep 11, 2015

refs #102 let's try to no longer switch between branches
I think switching between branches became problematic because of matomo-org/matomo#8694
@tsteur

This comment has been minimized.

Show comment
Hide comment
@tsteur

tsteur Sep 11, 2015

Member

@ThaDafinser I'm having problems when switching between branches that do not contain this .gitattributes. I often see uncommited changes but cannot do a git checkout etc. git checkout simply does nothing. Then I'm not able to switch to another branch.

Our developer docs generator had similar problems and workaround for now is to stop switching between branches: matomo-org/developer-documentation#102

Do you know what I mean? Have you ever had such problems? Do you maybe know how to fix it?

Member

tsteur commented Sep 11, 2015

@ThaDafinser I'm having problems when switching between branches that do not contain this .gitattributes. I often see uncommited changes but cannot do a git checkout etc. git checkout simply does nothing. Then I'm not able to switch to another branch.

Our developer docs generator had similar problems and workaround for now is to stop switching between branches: matomo-org/developer-documentation#102

Do you know what I mean? Have you ever had such problems? Do you maybe know how to fix it?

@ThaDafinser

This comment has been minimized.

Show comment
Hide comment
@ThaDafinser

ThaDafinser Sep 11, 2015

Contributor

@tsteur i had that problems some time ago - the changes are just the diff between \n and \r\n

_Solution should be_ https://help.github.com/articles/dealing-with-line-endings/#refreshing-a-repository-after-changing-line-endings

Contributor

ThaDafinser commented Sep 11, 2015

@tsteur i had that problems some time ago - the changes are just the diff between \n and \r\n

_Solution should be_ https://help.github.com/articles/dealing-with-line-endings/#refreshing-a-repository-after-changing-line-endings

@tsteur

This comment has been minimized.

Show comment
Hide comment
@tsteur

tsteur Sep 22, 2015

Member

It kinda works but always have to do it when switching to master because of a few files eg (.gz files). Is there a more permanent solution do this? It always takes me a couple of minutes to switch to eg master

Member

tsteur commented Sep 22, 2015

It kinda works but always have to do it when switching to master because of a few files eg (.gz files). Is there a more permanent solution do this? It always takes me a couple of minutes to switch to eg master

@ThaDafinser

This comment has been minimized.

Show comment
Hide comment
@ThaDafinser

ThaDafinser Sep 22, 2015

Contributor

@tsteur then we have to add the .gz files too ignore that

from @diosmosis

just a note: since the addition of https://github.com/piwik/piwik/blob/master/.gitattributes it is now required to add an entry to the file when adding a new type of binary file to the repo (eg, *.bz2 binary)

Contributor

ThaDafinser commented Sep 22, 2015

@tsteur then we have to add the .gz files too ignore that

from @diosmosis

just a note: since the addition of https://github.com/piwik/piwik/blob/master/.gitattributes it is now required to add an entry to the file when adding a new type of binary file to the repo (eg, *.bz2 binary)

@ThaDafinser

This comment has been minimized.

Show comment
Hide comment
@ThaDafinser

ThaDafinser Sep 22, 2015

Contributor

A side note: This addition will ensure in the future, that there are no compability issues between the OS which is used by developers. It's also a part of psr-2 (or 1?) so it will help a lot.

Contributor

ThaDafinser commented Sep 22, 2015

A side note: This addition will ensure in the future, that there are no compability issues between the OS which is used by developers. It's also a part of psr-2 (or 1?) so it will help a lot.

@tsteur

This comment has been minimized.

Show comment
Hide comment
@tsteur

tsteur Sep 23, 2015

Member

I think .gz is already listed here, I'll have a look next time I face that issue again. Yes I definitely see a value in it just wondering if there's a more efficient way to switch between branches :)

Member

tsteur commented Sep 23, 2015

I think .gz is already listed here, I'll have a look next time I face that issue again. Yes I definitely see a value in it just wondering if there's a more efficient way to switch between branches :)

@tsteur

This comment has been minimized.

Show comment
Hide comment
@tsteur

tsteur Sep 23, 2015

Member

It's actually those files that make me trouble:

    modified:   tests/javascript/frameworks/ext/ext-all-2.3.0.js
    modified:   tests/javascript/frameworks/ext/ext-base-2.3.0.js
    modified:   tests/javascript/frameworks/jquery/jquery-1.0.4.js
    modified:   tests/javascript/frameworks/jquery/jquery-1.3.2.js
Member

tsteur commented Sep 23, 2015

It's actually those files that make me trouble:

    modified:   tests/javascript/frameworks/ext/ext-all-2.3.0.js
    modified:   tests/javascript/frameworks/ext/ext-base-2.3.0.js
    modified:   tests/javascript/frameworks/jquery/jquery-1.0.4.js
    modified:   tests/javascript/frameworks/jquery/jquery-1.3.2.js
@diosmosis

This comment has been minimized.

Show comment
Hide comment
@diosmosis

diosmosis Sep 23, 2015

Member

@tsteur This happens when switching to a branch older than the .gitattributes file. You can deal w/ this by:

git checkout troublesome_branch
git commit -a -m "Redundant normalization"
git rebase master # rebasing will end up removing the commit above since it is redundant w/ master

After this, you won't see the problem for the branch.

Member

diosmosis commented Sep 23, 2015

@tsteur This happens when switching to a branch older than the .gitattributes file. You can deal w/ this by:

git checkout troublesome_branch
git commit -a -m "Redundant normalization"
git rebase master # rebasing will end up removing the commit above since it is redundant w/ master

After this, you won't see the problem for the branch.

@tsteur

This comment has been minimized.

Show comment
Hide comment
@tsteur

tsteur Sep 24, 2015

Member

Thx a lot I'll try it next time

Member

tsteur commented Sep 24, 2015

Thx a lot I'll try it next time

@tsteur

This comment has been minimized.

Show comment
Hide comment
@tsteur

tsteur Sep 24, 2015

Member

I think it worked, thx! Only the rebasing hurt a lot this time hehe (there were many changes in many places :) )

Member

tsteur commented Sep 24, 2015

I think it worked, thx! Only the rebasing hurt a lot this time hehe (there were many changes in many places :) )

@sgiehl

This comment has been minimized.

Show comment
Hide comment
@sgiehl
Member

sgiehl commented Sep 25, 2015

Guess that .gitattributes are also causing some test failures for plugins... See https://travis-ci.org/piwik/plugin-TasksTimetable/builds/82189993 or https://travis-ci.org/PiwikPRO/plugin-InterSites/jobs/82195390

@ThaDafinser

This comment has been minimized.

Show comment
Hide comment
@ThaDafinser

ThaDafinser Sep 28, 2015

Contributor

Another way would be to define only some filetypes:

*.php eol=lf
*.xml eol=lf

http://permalink.gmane.org/gmane.comp.version-control.git/266905

This will correctly normalize text files in the repo. However, the
second part (LF forcing on checkout) cannot be achieved easily today
because adding eol=lf will unfortunately process binary files too.
The only solution today is to mark certain types for conversion (e.g.,
*.txt eol=lf) or, inversely, mark certain types as binary (e.g.,
*.png binary).

Contributor

ThaDafinser commented Sep 28, 2015

Another way would be to define only some filetypes:

*.php eol=lf
*.xml eol=lf

http://permalink.gmane.org/gmane.comp.version-control.git/266905

This will correctly normalize text files in the repo. However, the
second part (LF forcing on checkout) cannot be achieved easily today
because adding eol=lf will unfortunately process binary files too.
The only solution today is to mark certain types for conversion (e.g.,
*.txt eol=lf) or, inversely, mark certain types as binary (e.g.,
*.png binary).

@mattab

This comment has been minimized.

Show comment
Hide comment
@mattab

mattab Oct 1, 2015

Member

@sgiehl @ThaDafinser Created issue: #8879 - any idea or even PR welcome

Member

mattab commented Oct 1, 2015

@sgiehl @ThaDafinser Created issue: #8879 - any idea or even PR welcome

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment