Share your knowledge at the LQ Wiki.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 04-16-2007, 04:02 AM   #1
Registered: Dec 2003
Distribution: Slackware, Alpine Linux, Ubuntu, Debian
Posts: 219

Rep: Reputation: 35
CVS's line break management


I have a CVS server on a linux box and the problem is, cvs changes line break characters. Sometimes these leads to problems.
Since the problems occur in txt files (which my php excel report generator uses to build a mht file), I could set cvs to handle these files as binary files (so it won't change them), but this is my last choice. Is there any option or setting, which would solve this line break problem, e.g. ignore line break or something like that?
Old 04-16-2007, 09:00 PM   #2
Senior Member
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,125

Rep: Reputation: 165Reputation: 165
With text files the CVS server/client communication converts the line endings to the appropriate one for the client OS. For example, if you have a client on a Linux OS you will get LF line endings, if your client is on Windows you will get CRLF line endings.

Is your code accessing files in the CVS repository directly and seeing the LF line endings? If so, you will need to check in the files as binary so they are stored in the repository with CRLF line endings. Is your app for management of the CVS repository? Would something like ViewVC do the job for you?

If not, I'd suggest running a cvs export of the tagged version you require (probably onto a Windows box if you require CRLF and then transferring it back) and pointing your PHP code at that instead. It's static, but at least it will give you the line endings you require without modifying the files in CVS.

Alternatively, pipe the files through something like sed (unless PHP has the functionality built in) and modify the line endings.

I hope I've understood the problem properly...



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Report: GroundWork to Break New Net Management Ground at Interop LXer Syndicated Linux News 0 08-31-2006 03:54 AM
Printing management (command line cups) grautu Slackware 3 10-20-2005 01:55 PM
command line file management class_struggle Linux - Newbie 2 07-29-2004 02:50 PM
line break tag in mozilla firebird mbegovic Linux - Software 0 04-28-2004 07:20 PM
openoffice spreadsheet questions: disable autocomplete, soft line-break and bugreport codec Linux - Software 0 04-28-2004 05:10 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:48 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration