[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

RE: Inconsistent/Mixed end of line text file Issues

From: Prasad, Venkat <venkat.prasad_at_credit-suisse.com>
Date: Wed, 24 Jun 2009 14:00:41 +0800

Thank you for response, but eol-style property was already there.
 
$ svn proplist CsRiskServerTestBind.cpp
Properties on 'CsRiskServerTestBind.cpp':
 ClearcaseRevision
 ClearcaseLabels
 svn:eol-style

 

________________________________

From: David Weintraub [mailto:qazwart_at_gmail.com]
Sent: 24 June 2009 02:32
To: Prasad, Venkat
Cc: Bert Huijben; users_at_subversion.tigris.org
Subject: Re: Inconsistent/Mixed end of line text file Issues

You can use the svn:eol-style property to prevent the wrong or mixed line endings on a file.

What you need to do is to create a pre-commit hook that fails the commit if the files being committed don't have this property. I have a Perl pre-commit hook that you are free to use: <http://files.getdropbox.com/u/433257/hooks.zip>. It can check if particular files have a particular property set and that the property is set to the correct value. I use it to prevent shell scripts and Makefiles from being checked in with Windows line endings.

Then, you'll need to do a massive checkout, add this property to the files your repository, and commit those changes. This will remove the inconsistant line endings in the most recent revision of your files, but not the past revisions.

However, once you get everything cleaned up, the svn:eol-style property will keep it clean.

On Tue, Jun 23, 2009 at 11:40 AM, Prasad, Venkat <venkat.prasad_at_credit-suisse.com> wrote:

        Hi Bret,
        
        Previous email on Solaris and this on linux. Please can you help in resloving this mixed and inconsistent end line issues? Thank you.
        
        svnadm:vsol45a-0114$ file CsRiskServerTestBind.cpp.svn-base
        CsRiskServerTestBind.cpp.svn-base: ASCII C++ program text, with CRLF, LF line terminators
        svnadm:vsol45a-0114$
        svnadm:vsol45a-0114$ cat -v CsRiskServerTestBind.cpp.svn-base
        //^M
        // CsRiskServerTestBind.cpp^M
        //^M
        ^M
        #include "CsFirst.h"^M
        #include <iostream>^M
        #include <fstream>^M
        #include "CsRisk.h"^M
        #include "CsArgv.h"^M
        #include "CsException.h"^M
        #include "CsCorbaException.h"^M
        #include <string>^M
        ^M
        int main( int argc, char ** argv )^M
        {^M
               try^M
               {^M
                       CORBA::ORB_ptr orb = CORBA::ORB_init( argc , argv , CS_CORBA_ORB ) ;^M
        ^M
                       CsArgv args( argc, argv ) ;^M
               if( args.count() != 4 && args.count() != 5 )^M
               {^M
                               std::cerr ^M
                                       << "usage: " << args.exeBasename() << " <object-name> <server-name> <hostname> [<obj-ref-file>]" << std::endl^M
                                       << " eg. " << args.exeBasename() << " production CsMarsRisk lns45d-1101" << std::endl ;^M
                               return 2 ;^M
                       }^M
        
        
        -----Original Message-----
        From: Prasad, Venkat
        Sent: 23 June 2009 22:53
        To: 'Bert Huijben'; users_at_subversion.tigris.org
        Subject: RE: LOTof Issues
        
        Thanks Bert,
        
        Here, I can see svn:eol-style property on file, but its not shows in .svn/text-base any LF or CR .. etc?
        
        sgs45a-3503:vprasad3$ svn proplist CsRiskServerTestBind.cpp Properties on 'CsRiskServerTestBind.cpp':
         ClearcaseRevision
         ClearcaseLabels
         svn:eol-style
        sgs45a-3503:vprasad3$ file text-base/CsRiskServerTestBind.cpp.svn-base
        text-base/CsRiskServerTestBind.cpp.svn-base: ascii text
        sgs45a-3503:vprasad3$ cat -v text-base/CsRiskServerTestBind.cpp.svn-base
        //^M
        // CsRiskServerTestBind.cpp^M
        //^M
        ^M
        #include "CsFirst.h"^M
        #include <iostream>^M
        #include <fstream>^M
        #include "CsRisk.h"^M
        #include "CsArgv.h"^M
        #include "CsException.h"^M
        #include "CsCorbaException.h"^M
        #include <string>^M
        ^M
        int main( int argc, char ** argv )^M
        {^M
               try^M
               {^M
                       CORBA::ORB_ptr orb = CORBA::ORB_init( argc , argv , CS_CORBA_ORB ) ;^M ^M
                       CsArgv args( argc, argv ) ;^M
               if( args.count() != 4 && args.count() != 5 )^M
               {^M
                               std::cerr ^M
        
        
        
        
        -----Original Message-----
        From: Bert Huijben [mailto:bert_at_qqmail.nl]
        Sent: 23 June 2009 22:39
        To: Prasad, Venkat; users_at_subversion.tigris.org
        Subject: RE: LOTof Issues
        
        The unix file command doesn't check the entire file to produce its output, so you shouldn't use it to determine if a file has an inconstent line endings.
        
        It just reads some parts of the file and then writes the result. So the file can have inconsistent line endings without noticing.
        
               Bert
        
        From: Prasad, Venkat [mailto:venkat.prasad_at_credit-suisse.com]
        Sent: dinsdag 23 juni 2009 16:19
        To: Stefan Küng; dev_at_subversion.tigris.org; users_at_subversion.tigris.org
        Subject: LOTof Issues
        
        <<Line_endings_Issues.doc>>
        Please can you assist on this. We are struck up on this.
        
        Venkat Prasad
        CREDIT SUISSE
        SCM Systems Support
        The signature level 4
        Changi Business Park
        Singapore 486066
        Phone +65 6306 0310
        ============================================================================
        ==
        Please access the attached hyperlink for an important electronic communications disclaimer:
        
        http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
        ============================================================================
        ==
        
        
        
        ==============================================================================
        Please access the attached hyperlink for an important electronic communications disclaimer:
        
        http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
        ==============================================================================
        
        ------------------------------------------------------
        http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2364517
        
        To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
        

-- 
David Weintraub
qazwart_at_gmail.com
==============================================================================
Please access the attached hyperlink for an important electronic communications disclaimer: 
http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
==============================================================================
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2364792
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-06-24 08:02:26 CEST

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.