[Logo] JCVSForum - Community Support For JCVS Users and Developers
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Windows/Unix linefeed  XML
Forum Index » JCVS Users
Author Message
Anonymous



While checkout of Linux-source-files with jCVS in MS-Windows there is changed the Linux-Linefeed(0Ah) into Windows-Linefeed(0Dh 0Ah). This is not fine. Is it possible to checkout with "Unix-linefeed" in MS-Windows?
time


[Avatar]

Joined: 05/06/2004 18:09:23
Messages: 367
Location: Bangkok
Offline

In my experience, fighting the native live termination is a difficult battle.

Having said that, you can control the native line terminator by setting the Java System property 'line.separator', either via a property file or on the command line as a JVM argument: '-Dline.separator='.

I have found that setting command line arguments with \n or \r is difficult at best, so I would suggest recompiling the code with the setting explicitly in the code, or using a properties file which may prove easier.

I will add a command line option that will allow easier setting of the property in the future.

[TODO]
[Email] [WWW]
Anonymous



Did this ever happen? It appears not. I would really rather not recompile jCVS over this issue

Does the system property setting work? If so, what exactly is the right syntax?

Cheers,
Rob
Anonymous



OK, it turns out the system property setting *does* work, but man, is it ever a scary hack.

I found this discussion of the same issue in Eclipse and it had an immensely helpful pointer to the precise way to do this. You really do have to find a way to insert a naked line feed (0xa, but you can't do "-Dline.separator=0xa") into the jCVS startup shortcut.

I wound up following the advice of one person in the Eclipse thread, and downloading and using the Windows "SciTE" text editor, which has a nice switchable setting for line terminators and viewing them. In that editor, I could create (and see!) a single LF character, which I could then copy to the clipboard, and paste into the jCVS startup shortcut. Then I could check out the source I wanted (the jboss-seam CVS tree from jboss.org) and it indeed no longer had double-spaced source!

So, this does work, but it's insanely convoluted....
Cheers,
Rob
 
Forum Index » JCVS Users
Go to:   
Powered by JForum 2.1.9 © JForum Team