Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 705769
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T04:05:26+00:00 2026-05-14T04:05:26+00:00

we have the following environment: a Windows 2008 Server with Apache 2.2.14 and SVN

  • 0

we have the following environment: a Windows 2008 Server with Apache 2.2.14 and SVN 1.6.6 through WebDAV. Multiple developers commit Java code from different Windows platforms.

Now we want to implement a pre-commit hook to our repository that runs Checkstyle on the committed code. We use SVNChecker (http://svnchecker.tigris.org/) for this, which works pretty well. Unfortunately, when Checkstyle reports errors, the line numbers in the reports are the double values of the actual line numbers.

When you commit something in SVN, it creates a temporary directory with the new files. Then, the pre-commit hook is run and if it succeeds, the new files are actually committed to the repository. I analysed these temporary files in a Hex Editor and found out that all newlines (\n) were replaced by a carriage return and a newline (\r\n). As we use Windows line-breaks (\r\n) in our files, this resulted in \r\r\n, which is considered as two newlines by Checkstyle and several text editors. The strage thing is that the line-breaks are correct when checking out from our repository, so they are somehow converted back somewhere.

I could solve this problem by setting the property svn:eol-style (see http://svnbook.red-bean.com/en/1.1/ch07s02.html#svn-ch-7-sect-2.3.5) to native. Everything worked as it should then. Unfortunately, for us this would mean that we would have to add this property to every file in our repository. As far as I know, there is a setting in the SVN client that does this automatically whenever you add a new file, but unfortunately we cannot tell all our developers to add this setting to their SVN client.

The description of the eol-style property says “by default, Subversion doesn’t pay any attention to the type of end-of-line (EOL) markers used in your files”. To me, it looks like a bug in SVN that the newlines are converted nevertheless.

Does anyone have an idea how to fix this behaviour without using ugly workarounds such as manually converting the newlines back in the pre-commit hook?

Thanks for your help,
memminger

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T04:05:27+00:00Added an answer on May 14, 2026 at 4:05 am

    My assumption that SVN created a temporary directory for pre-commit hooks was wrong. Instead, a pre-commit hook can access the source files using svnlook and a transaction number. SVNChecker is the one who saves these files in a temporary directory.

    What causes the wrong line delimiters is a Python feature that automatically converts line-breaks so that all Python applications can use Unix line delimiters internally. However, only some functions convert line-breaks from external sources to Python-internal line-breaks by default. SVNChecker does not take care of this, which has already been reported as a bug on http://svnchecker.tigris.org/issues/show_bug.cgi?id=33.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have the following Environment: SharePoint server 2010 Windows server 2008 R2 SQL Server
We have Windows Server 2008 as our Production server hosted in RackSpace environment. Following
I have following this blog in setting Xvfb in my ubuntu environment: http://corpocrat.com/2008/08/19/how-to-install-xvfb-x11-server-in-linux-server/ So
My environment is windows phone 7.1. I have the following code: <ListBox ItemsSource="{Binding Path=Items}">
On a Windows Server 2008/IIS 7.5 environment, when I browse to a ASP.NET web
I have the following environment: Windows 7 Ultimate 64-bit MS office (with Access) 2010
How do you setup a multi-developer XDebug PHP environment? I have the following setup:
In my bootstrap.php I have the following: if($_SERVER['SERVER_NAME'] == 'localhost') Kohana::$environment = 'development'; else
I Have following code: Controller: public ActionResult Step1() { return View(); } [AcceptVerbs(HttpVerbs.Post)] public
I have two Windows services written in C# following the same patterns and methodology.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.