Hi,
I encountered the following issue converting a CVS
repository where all
text files have to be CRLF (FreeDOS):
Used cvs2svn (1.5.0) on Linux, with
DefaultEOLStyleSetter('CRLF') in the
options file, conversion happened without problems.
When checking out from the new SVN repository I noticed that
all checked
out files had CRLF line endings (correct), but as soon as I
changed a file
and 'svn diff'ed it reported that the whole file changed its
line endings
from LF to CRLF (not correct).
The cause is that cvs2svn converts the text files to have LF
line endings
whereas subversion expects them to have CRLF line endings in
the
repository (only when eol-style is set to CRLF obviously).
I worked around it by changing dumpfile_delegate.py to do
if s_item.needs_eol_filter:
data_reader =
CRLF_EOL_Filter(LF_EOL_Filter(pipe.stdout))
else:
data_reader = pipe.stdout
and
class CRLF_EOL_Filter:
"""Filter a stream and convert all LF
end-of-line markers
into CRLFs."""
def __init__(self, stream):
self.stream = stream
self.eof = False
def read(self, size):
while True:
buf = self.stream.read(size)
self.eof = len(buf) == 0
buf = buf.replace('n', 'rn')
if buf or self.eof:
return buf
this is just a quick workaround I could use for FreeDOS; a
proper solution
would also care about CR line endings and do the right
thing.
Bart
------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribe cvs2svn.tigris.org
For additional commands, e-mail: dev-help cvs2svn.tigris.org
|