From: "Tim Van Holder" To: Subject: RE: MS-DOS path support in CVS Date: Sun, 17 Dec 2000 11:23:28 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) In-reply-to: <4634-Sat16Dec2000193129+0200-eliz@is.elta.co.il> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id FAA10396 Reply-To: djgpp-workers AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > If a repository is on a Unix box, it means you need to write files in > binary mode when checking them out. Not if all files on it are simple sources; then using text mode would be equally acceptable. It's basically the same situation as a local repository, with a slightly better reason for using binary-only. > > if, say, you checked out the CVS sources (in text mode, > > so you end up with all CRLF). You edit some files, including the > > MSVC project files. You make a diff, which would either use text mode or > > binary mode. > > If it used text mode, the patches to the project files would fail (as > > they're CRLF in the repository). And if binary mode was used, you'd be > > introducing CRLFs into the Unix-style sources. > > Sorry, I'm not following: in the scenario you described above, what > did the user create the diffs for, and how are they relevant to the > routine CVS operation? The case in point would be me getting the sources from anonymous CVS. I can't commit, so I need to prepare a diff to send to the maintainers. If I changes DOS-style files too, my diff would need to be binary-based to preserve EOL conventions in all files (since it would probably be applied on a Linux/Unix box). > If you are talking about the CVS client sending diffs to the server, > then it should use the same logic as we talked before: read files in > binary mode if that's the default, or in text mode if the user > overrides the default. If the local CVS tree is kept in > Unix-compatible format (which I think should be the default for remote > repositories), then binary reads for computing diffs will always DTRT. I know - I wasn't talking about internal CVS operations, but rather about using CVS-created diffs. > > Unless I'm mistaken about how patch --binary operates, it would not help > > in this case > I thought you were talking about Patch invoked locally, not on the > remote server. Are you? I was indeed talking about invoking GNU patch on a diff created by CVS. I'll be testing all-binary operation this week (if I find the time); if that seems to work, I'll try adding the two other modes of operation and see how they fare. I was thinking of using the same options as WinCVS does (--lf and --crlf), but what would be a good name for the mod DJ suggested (binary write, text read)? --maybe-crlf?