bug-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

History command confused by different line endings


From: Bob Kline
Subject: History command confused by different line endings
Date: Tue, 29 Jan 2002 13:16:03 -0500 (EST)

When the history file has lines with mixed line-endings (some \r\n, some
\n, presumably resulting from the use of different versions of cvs), the
history command is unable to match O and F records reliably.  This
happens because the history file is opened in binary mode, and the
read_hrecs() function is testing explicitly for '\n' as the record
terminator.  This results in the software thinking that the '\r'
preceding the '\n' is part of the data for the last field in the record
(hr->mod).

A patch against cvs-1.11.1p1 is attached.  The patch doesn't address the
Macintosh convention for line endings, but I assume the problem doesn't
occur with any versions of cvs on the Mac, because if it did, cvs
wouldn't be able to find any of the end-of-record marks, given the
hard-coded search for '\n' in the contents of a file opened in binary
mode.

-- 
Bob Kline
mailto:bkline@rksystems.com
http://www.rksystems.com

Attachment: history.patch
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]