Line endings go from CRLF to LF under Cygwin, but not with Tailor
Bug #181161 reported by
Doug Lee
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
CVS to Bazaar importer |
Triaged
|
Medium
|
Unassigned |
Bug Description
Under Cygwin (with its line endings set to DOS/Windows), converting a CVS repo to Bazaar with Tailor produces the expected CRLF endings in text files; but only LF endings result if I import the same project via cvsps-import. `cvs update -p ... >out.txt' in Cygwin produces CRLF endings in out.txt. I did not test the output of `co', but --use-cvs on cvsps-import does not fix the problem. I'm not sure if this is a cvsps issue, a straight cvs issue, a cvsps-import issue, or something else; but I'm trying to convert about 40 Windows-based CVS projects to Bazaar, and Tailor lost the race by missing all my CVS tags...
To post a comment you must log in.
I'm not sure what the problem is. I thought originally it might be the subprocess PIPE being opened in text mode. But my simple test:
>>> import subprocess, sys Popen([ sys.executable, '-c', "print 'hello'"], stdout= subprocess. PIPE)
>>> p = subprocess.
>>> p.communicate()
('hello\r\n', None)
Shows that the CRLF is being preserved.
Internally we should be preserving exactly what was given by CVS/RCS.
I could try to help you debug it. You can add a line like: cvs(filename, cvs_revision) co(rcs_ file, cvs_revision)
=== modified file 'cvsps/importer.py'
--- cvsps/importer.py 2008-01-08 04:56:28 +0000
+++ cvsps/importer.py 2008-01-09 23:05:48 +0000
@@ -669,6 +669,7 @@
txt = self._run_
else:
txt = self._run_
+ import pdb; pdb.set_trace()
return txt, executable
@staticmethod
Which will drop you into the python debugger whenever a text is extracted. Which should allow you to see what the line endings are.