dev@glassfish.java.net

Re: ^M char in files

From: Byron Nevins <Byron.Nevins_at_Sun.COM>
Date: Sun, 06 Apr 2008 15:42:57 -0700

I'm not buying that the UNIX line terminator is "right" and the Windows
line terminator is "wrong".

But I think this is a problem. I wonder why cvs handles the conversion
automatically and perfectly and subversion requires so much extra
work/configuration?

I wrote a program that tells you what "format" a text file is in. Here
are the results for one directory I work in. This is from a straight
svn checkout with no changes:

AsadminMain.java: UNIX
BackupCommands.java: UNIX
BaseLifeCycleCommand.java: UNIX
CLIProcessExecutor.java: UNIX
CreateDomainCommand.java: UNIX
DatabaseCommand.java: DOS
DatabaseReporter.java: DOS
DeleteDomainCommand.java: UNIX
DerbyControl.java: DOS
DummyCommand.java: UNIX
HelpCommand.java: UNIX
ListDomainsCommand.java: UNIX
RemoteCommand.java: DOS
RemoteCommandParser.java: UNIX
S1ASCommand.java: UNIX
StartDatabaseCommand.java: UNIX
StartDomainCommand.java: UNIX
StopDatabaseCommand.java: DOS
StopDomainCommand.java: UNIX

Sahoo wrote:
> Thanks, Claudio. Yes, I was exactly referring to this in my last
> reply. Let's hope Windows users use something like this going forward.
>
> Thanks,
> Sahoo
>
> Claudio Miranda wrote:
>> Those properties can be configured at svn client level, as you
>> requested, see an example extracted from $HOME/.subversion/config
>>
>> ### Section for configuring automatic properties.
>> [auto-props]
>> ### The format of the entries is:
>> ### file-name-pattern = propname[=value][;propname[=value]...]
>> ### The file-name-pattern can contain wildcards (such as '*' and
>> ### '?'). All entries which match will be applied to the file.
>> ### Note that auto-props functionality must be enabled, which
>> ### is typically done by setting the 'enable-auto-props' option.
>> # *.c = svn:eol-style=native
>> # *.cpp = svn:eol-style=native
>> # *.h = svn:eol-style=native
>> # *.dsp = svn:eol-style=CRLF
>> # *.dsw = svn:eol-style=CRLF
>> # *.sh = svn:eol-style=native;svn:executable
>> # *.txt = svn:eol-style=native
>> # *.png = svn:mime-type=image/png
>> # *.jpg = svn:mime-type=image/jpeg
>> # Makefile = svn:eol-style=native
>>
>> Claudio Miranda
>>
>> On Thu, Apr 3, 2008 at 11:35 AM, Sahoo <Sahoo_at_sun.com> wrote:
>>
>>> Thanks, Claudio. When new files are added, we have to again set the
>>> properties, right? Can user use the auto-props setting in their svn
>>> client
>>> for all .java, .xml and other known extensions? That way, when new
>>> files
>>> are added, they are automatically taken care of.
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>

-- 
Byron Nevins Work 408-276-4089, Home 650-359-1290, Cell 650-784-4123 - Sun Microsystems, Inc.