[PEAR-BUG] Bug #20403 [Com]: Network connection error with SVN pre-commit

[email protected] ("[email protected]")
Newsgroups php.pear.bugs
Message-ID <[email protected]>
Edit report at https://pear.php.net/bugs/bug.php?id=20403&edit=1

 ID:               20403
 Comment by:       [email protected]
 Reported By:      303170436 at qq dot com
 Summary:          Network connection error with SVN pre-commit
 Status:           Feedback
 Type:             Bug
 Package:          PHP_CodeSniffer
 Operating System: centos6.4
 Package Version:  1.5.4
 PHP Version:      5.3.25
 Assigned To:      squiz
 Roadmap Versions: 
 New Comment:

thanks very much
now i had tested i found that error cause from SVN,
when the error message return so much from  SVN, it will trigger the
"Network connection closed unexpectedly"
so this is SVN bug?


Previous Comments:
------------------------------------------------------------------------

[2014-09-16 08:06:08] squiz

I had a read of that link and tried a commit with errors in multiple
files and still can't get 
any problems to occur. So I don't think PHPCS is crashing or existing
incorrectly in any 
of these cases. Even when it does fail to check, the pre-commit hook
doesn't report that 
network error to me.

I really don't think I'm going to be able to find the problem you're
having with the pre-
commit hook. I haven't had anyone report anything like this before, so
I'm not even 
sure where to start looking or how to replicate it.

------------------------------------------------------------------------

[2014-09-12 10:19:14] jouny

Dear Greg


i had try like that

svn/hooks/pre-commit:
/data/svntools/PHP_CodeSniffer-master/scripts/phpcs-svn-pre-commit
"$REPOS" -t "$TXN" >&2 || exit 1

error message?
# svn commit -m ''
Sending        index.php
Sending        test.php
Transmitting file data ..svn: Commit failed (details follow):
svn: Network connection closed unexpectedly


i have tested the result like this:
linux server A => linux server A  --- ok (PHP_CodeSniffer working well)
linux server B => linux server B  --- ok 

linux server A => linux server B  --- error (svn: Network connection
closed unexpectedly)
linux server B => linux server A  --- error

my local machine => linux server A  --- error
my local machine => linux server B  --- error

disabled iptables also happen

PHP_CodeSniffer has tested
PHP_CodeSniffer-master
2.0.0RC1
1.5.4
1.5.3

subversion has tested
1.6.2
1.8.10
1.8.9

php has tested
5.3.25
5.4.32


and i found the question like this:
http://stackoverflow.com/questions/20377510/svn-commit-results-in-e210002-network-connection-closed-unexpectedly-not-usi

i don't know if is the same as me

------------------------------------------------------------------------

[2014-09-11 09:57:16] jouny

ok, thank you sincerely

i try it later, contact you when any questions

------------------------------------------------------------------------

[2014-09-11 08:50:54] squiz

I've tried your file and it is still working fine for me. This is what I
get for it:

Adding         index.php
Transmitting file data .svn: E165001: Commit failed (details follow):
svn: E165001: Commit blocked by pre-commit hook (exit code 1) with
output:

FILE: index.php
--------------------------------------------------------------------------------
FOUND 433 ERRORS AND 90 WARNINGS AFFECTING 305 LINES

Then lots of error and warning messages for the file.

I'm not sure how to fix this for you. Can you clone the git repository
and try using the 
phpcs-svn-pre-commit file from there directly?

git clone git://github.com/squizlabs/PHP_CodeSniffer.git

Then change your pre-commit hook to be something like:

/usr/bin/php /path/to/PHP_CodeSniffer/scripts/phpcs-svn-pre-commit
"$REPOS" -t 
"$TXN" >&2 || exit 1

------------------------------------------------------------------------

[2014-09-11 08:17:57] jouny

thanks

https://github.com/jounyl/test
pls review this object~

waitting for your reply

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://pear.php.net/bugs/bug.php?id=20403

-- 
Edit this bug report at https://pear.php.net/bugs/bug.php?id=20403&edit=1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.