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
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2364612
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-06-23 20:33:05 CEST