[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:

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


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

[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

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

[2014-09-11 07:45:39] squiz

I'm using SVN 1.7.10 and PHP 5.4.24, which are the standard versions on
OS X.

I've tried PHPCS 1.5.4 as well as the latest code from the Git repo for
both the 1.x 
and 2.x branches. All of them work the same way.

But the error you are getting is not from PHP_CodeSniffer.
PHP_CodeSniffer doesn't 
require a network connection.

The strange thing is that svnlook shouldn't require a network connection
either 
because it can only be run on the same server as the SVN repository. So
I don't know 
where that error is coming from.

And yes, you can send me the file you are checking so I can test it if
you'd like. It's 
probably best to put it somewhere like gist.github.com or pastebin.com
so it doesn't 
get broken by the bug tracker.

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

[2014-09-11 07:23:48] jouny

if so, could you tell me what is the version  for your SVn and
PHP_CodeSniffer ?

and could i give my php object to you to help me test on your  local
machine ?

if can't,  also thanks very much :)

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

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.