Trailing end-of-lines in C++ with Tortoise SVN
I'm new to a team tha开发者_如何学编程t uses SVN for source control. I'm used to Git myself, so I'm really at a loss with all of SVN's pre-commit/post-checkout filters for tracked files.
I've commited some C++ source code with standard-compliant trailing end-of-lines using TortoiseSVN (on Windows). One colleague, also on Windows and using TortoiseSVN GUI client sees the same files as I committed: they have trailing \n
. Another uses the svn
command-line client on Linux and sees files with no trailing \n
.
Looking at the files using the web-based Visual SVN server source code browser, we can see that the committed source files do not contain the trailing \n
. This makes me think the problem is on the client side of both TortoiseSVN users. Also, if I commit a file with two trailing \n
characters, only one of them is removed.
Question: how do I disable this behavior, so that source files are modified exactly as I committed them? All my editors are configured to produce UTF-8 encoded text, spaces-only (no tabs) with Unix line-endings and add the trailing \n
automatically. I'd like this to be committed as is.
have a look at the svn:eol-style property and the auto-props section in the config file.
精彩评论