* can Cygwin CVS change line endings on checkout/update?
@ 2002-09-21 20:21 David M. Karr
2002-09-22 1:14 ` Nicholas Wourms
2002-09-22 2:50 ` Igor Pechtchanski
0 siblings, 2 replies; 8+ messages in thread
From: David M. Karr @ 2002-09-21 20:21 UTC (permalink / raw)
To: cygwin
I've noticed that WinCVS has a feature where it can change the line endings on
files on checkout/update, to either use DOS or Unix line endings. I don't see
anything in the Cygwin CVS interface that can do this. Is this feature just
not in standard command-line CVS?
--
===================================================================
David M. Karr ; Java/J2EE/XML/Unix/C++
dmkarr@earthlink.net
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: can Cygwin CVS change line endings on checkout/update?
2002-09-21 20:21 can Cygwin CVS change line endings on checkout/update? David M. Karr
@ 2002-09-22 1:14 ` Nicholas Wourms
2002-09-22 2:50 ` Igor Pechtchanski
1 sibling, 0 replies; 8+ messages in thread
From: Nicholas Wourms @ 2002-09-22 1:14 UTC (permalink / raw)
To: David M. Karr, cygwin
--- "David M. Karr" <dmkarr@earthlink.net> wrote:
> I've noticed that WinCVS has a feature where it can change the line
> endings on
> files on checkout/update, to either use DOS or Unix line endings.
> I don't see
> anything in the Cygwin CVS interface that can do this. Is this
> feature just
> not in standard command-line CVS?
Cygwin's CVS is based on the stock cvs sources, which were designed
with Unix and Unix-style line endings in mind. If you need to insert
dos line endings, use unix2dos. Similarly, if you need to switch to
Unix line endings, use dos2unix. If you know what you are doing, you
could probably whip up a script to automate the processing for you.
Cheers,
Nicholas
__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: can Cygwin CVS change line endings on checkout/update?
2002-09-21 20:21 can Cygwin CVS change line endings on checkout/update? David M. Karr
2002-09-22 1:14 ` Nicholas Wourms
@ 2002-09-22 2:50 ` Igor Pechtchanski
2002-09-22 9:40 ` Bruce Alderson
1 sibling, 1 reply; 8+ messages in thread
From: Igor Pechtchanski @ 2002-09-22 2:50 UTC (permalink / raw)
To: David M. Karr; +Cc: cygwin
On 21 Sep 2002, David M. Karr wrote:
> I've noticed that WinCVS has a feature where it can change the line
> endings on files on checkout/update, to either use DOS or Unix line
> endings. I don't see anything in the Cygwin CVS interface that can do
> this. Is this feature just not in standard command-line CVS?
I don't believe cvs itself is aware of DOS line endings. However, as
Nicholas suggested, you can set up a filter to do this. If you control
the repository, look at CVSROOT/cvswrappers, especially the "-t/-f"
options.
Igor
--
http://cs.nyu.edu/~pechtcha/
|\ _,,,---,,_ pechtcha@cs.nyu.edu
ZZZzz /,`.-'`' -. ;-;;,_ igor@watson.ibm.com
|,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski
'---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow!
"Water molecules expand as they grow warmer" (C) Popular Science, Oct'02, p.51
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: can Cygwin CVS change line endings on checkout/update?
2002-09-22 2:50 ` Igor Pechtchanski
@ 2002-09-22 9:40 ` Bruce Alderson
2002-09-22 9:55 ` can cygwin " Christopher Faylor
0 siblings, 1 reply; 8+ messages in thread
From: Bruce Alderson @ 2002-09-22 9:40 UTC (permalink / raw)
To: cygwin
[-- Attachment #1: Type: text/plain, Size: 975 bytes --]
Actually, Cyg CVS (afaik) determines line termination defauls based on
the cyg dll, and user-defined mounts that the check-out are done to.
I've found this as we have a number of developers using cyg/cvs who have
set up mounts in a number of creative ways (not according to docs,etc.)
... and cvs will write files in UNIX mode. Normally, cvs will write PC
flavoured files.
The command line version of cvs does support repairing incorrect
line-terminators - useful if you happen to import some binary files that
prefer not to have their contents messed with. The command is cvs admin
- I don't recall the full syntax off hand (the Cerviquest docs are
great).
-- mx
On Sat, 2002-09-21 at 21:26, Igor Pechtchanski wrote:
> I don't believe cvs itself is aware of DOS line endings. However, as
> Nicholas suggested, you can set up a filter to do this. If you control
> the repository, look at CVSROOT/cvswrappers, especially the "-t/-f"
> options.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 232 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: can cygwin CVS change line endings on checkout/update?
2002-09-22 9:40 ` Bruce Alderson
@ 2002-09-22 9:55 ` Christopher Faylor
2002-09-22 14:01 ` Nicholas Wourms
0 siblings, 1 reply; 8+ messages in thread
From: Christopher Faylor @ 2002-09-22 9:55 UTC (permalink / raw)
To: cygwin
On Sun, Sep 22, 2002 at 08:44:40AM -0700, Bruce Alderson wrote:
>Actually, Cyg CVS (afaik) determines line termination defauls based on
>the cyg dll, and user-defined mounts that the check-out are done to.
>I've found this as we have a number of developers using cyg/cvs who have
>set up mounts in a number of creative ways (not according to docs,etc.)
>... and cvs will write files in UNIX mode. Normally, cvs will write PC
>flavoured files.
The name of the product is "Cygwin". It is not "cyg". I don't know where
this abbreviation is coming from but I really find it repugnant.
cgf
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: can cygwin CVS change line endings on checkout/update?
2002-09-22 9:55 ` can cygwin " Christopher Faylor
@ 2002-09-22 14:01 ` Nicholas Wourms
2002-09-22 17:06 ` Christopher Faylor
0 siblings, 1 reply; 8+ messages in thread
From: Nicholas Wourms @ 2002-09-22 14:01 UTC (permalink / raw)
To: cygwin
--- Christopher Faylor <cgf@redhat.com> wrote:
> On Sun, Sep 22, 2002 at 08:44:40AM -0700, Bruce Alderson wrote:
> >Actually, Cyg CVS (afaik) determines line termination defauls
> based on
> >the cyg dll, and user-defined mounts that the check-out are done
> to.
> >I've found this as we have a number of developers using cyg/cvs
> who have
> >set up mounts in a number of creative ways (not according to
> docs,etc.)
> >... and cvs will write files in UNIX mode. Normally, cvs will
> write PC
> >flavoured files.
>
> The name of the product is "Cygwin". It is not "cyg". I don't
> know where
> this abbreviation is coming from but I really find it repugnant.
Didn't you know? "cyg" is Ebonics for Cygwin...
__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: can Cygwin CVS change line endings on checkout/update?
@ 2002-09-22 21:18 ASH, JAMES (SBCSI)
0 siblings, 0 replies; 8+ messages in thread
From: ASH, JAMES (SBCSI) @ 2002-09-22 21:18 UTC (permalink / raw)
To: dmkarr, cygwin
First of all, you should always make efforts to be sure that your CVS files
are stored using the *UNIX* line ending conventions, whether you are using a
client on DOS/Windows or not, whether your CVS server is running on
DOS/Windows or Unix. If you do not, you *will* have trouble with diffs, and
CVS may tell you a file is out of date when it is not.
Second, the Cygwin CVS (as I believe the "stock" CVS) is aware of line
endings and what to do with them. In a nutshell, a Windows client will
convert the endings before commiting to CVS.
If you are using a DOS text mount on your client machine, and your files
contain DOS CR/LF endings, the client will convert the line endings to UNIX
for you when you commit, and convert back to CR/LF when you checkout/update.
It is smart this way.
If you are using a binary mount on your client machine, the CVS client will
*NOT* do any conversion. It will assume that you are already using Unix line
endings (because you have a binary mount) and will leave them as is. This
will lead to CR/LF in your repository (which you do not want).
In our shop, the recommendation is to use DOS text mounts on your client
machine so that the line endings are handled properly by CVS on checkout and
commit.
We make this recommendation because, if you use binary mounts, and happen to
save something using a Windows editor, or any Windows IDE, that editor will
save your local files with DOS endings. When you commit, CVS will not
convert endings because of the binary mounts. You end up with CR/LF in your
repository, and this can cause false diffs.
Sorry to ramble. Hope this helps.
-----Original Message-----
From: dmkarr@earthlink.net [mailto:dmkarr@earthlink.net]
Sent: Saturday, September 21, 2002 10:21 PM
To: cygwin@cygwin.com
Subject: can Cygwin CVS change line endings on checkout/update?
I've noticed that WinCVS has a feature where it can change the line endings
on
files on checkout/update, to either use DOS or Unix line endings. I don't
see
anything in the Cygwin CVS interface that can do this. Is this feature just
not in standard command-line CVS?
--
===================================================================
David M. Karr ; Java/J2EE/XML/Unix/C++
dmkarr@earthlink.net
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2002-09-23 3:01 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-21 20:21 can Cygwin CVS change line endings on checkout/update? David M. Karr
2002-09-22 1:14 ` Nicholas Wourms
2002-09-22 2:50 ` Igor Pechtchanski
2002-09-22 9:40 ` Bruce Alderson
2002-09-22 9:55 ` can cygwin " Christopher Faylor
2002-09-22 14:01 ` Nicholas Wourms
2002-09-22 17:06 ` Christopher Faylor
2002-09-22 21:18 can Cygwin " ASH, JAMES (SBCSI)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).