tags:

views:

74

answers:

3

Sending example.java Transmitting file data .svn: Commit failed (details follow): svn: 'pre-commit' hook failed with error output: example.java Unwanted TAB in file: example.java

I tried to revert my changes, and then even just adding one extra character, I'll seeing this error. Very strange! Any help would be greatly appreciated O_O

+4  A: 

It sounds like your SVN server does some pre-commit processing that does not allow tab characters in java source files. Try configuring your IDE to replace tabs with spaces.

Arnold Spence
+5  A: 

Your SVN server has pre-commit rules which check the validity of your commit (including commit comments). These rules are usual used to enforce things such as including branch numbers in commit comments for traceability purposes. It seems that you are violating a pre-commit rule by having a TAB character in your example.java file. Try removing all TAB characters from example.java and re-committing.

An odd rule I must admit. Kind of taking the spaces vs. tab characters argument to the extreme.....

S73417H
weird thing is even if i revert all my changes, and try to recommit by just adding one extra character of any nature, i'll still get the same error, so I don't quite understand why TAB would be raising an issue...or maybe the policy was added after the last commit?hmm...
alvin
The commit hook is located in $REPOS_ROOT\hooks\pre-commit.tmpl (or possibly pre-commit.bat). If you have access to the svn server you can check the modification stamp as if you can't commit an existing file without any added tabs it's either a new rule or something else is going on.
imoatama
A: 

Thanks a lot guys. It was a formatting issue after all. I don't know how it happened, but solved it in the end by gong to Eclipse -> Source -> Format

Cheers!

alvin