You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Bill Baxter <wb...@gmail.com> on 2005/02/25 03:48:19 UTC

Cygwin, eol-style, and --native-eol

It seems there's NO way to force svn to check out files as CRLF under
Unix or Cygwin.  This just smacks me as a bizarre limitation for svn
to have at this stage of the game.

Why do you need this?  In the case of Unix, you might want to check
out your source code on the Unix side and then do subsequent
operations from Windows via a samba mount, for example.

In the case of Cygwin, you might want to use the cygwin command prompt
for issuing all your svn commands (because cmd just sucks), but still
you plan to do all your editing etc with Visual Studio.

The --native-eol flag works great for svn export.  Why isn't this flag
supported for svn checkout too?

Also it would be even more handy if the native eol could be set via
the config file.

--Bill Baxter

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Cygwin, eol-style, and --native-eol

Posted by Philip Martin <ph...@codematters.co.uk>.
Bill Baxter <wb...@gmail.com> writes:

> In that case, is there any reasonable workaround that will let me
> work from a cygwin shell, but have all my source files treated as
> DOS?

Use the source code.

Look at the function svn_subst_eol_style_from_value() in the file
subversion/libsvn_subr/subst.c. That function determines what the
various svn:eol-style settings mean and you will see that "native"
leads to APR_EOL_STR, i.e. Subversion gets the value from APR.  You
could change svn_subst_eol_style_from_value() and rebuild Subversion,
or you could change APR_EOL_STR and rebuild all of APR, APR-UTIL and
Subversion, it depends what behaviour you want.

-- 
Philip Martin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Cygwin, eol-style, and --native-eol

Posted by Bill Baxter <wb...@gmail.com>.
Jani -- svn:eol-style doesn't do what I want.  It modifies the
repository, changing how the files get checked out for _all_ users.  I
just want to change how the files get check out for _me_ on a
case-by-case basis.

Michael -- Currently, yes, Cygwin is exactly my issue.  I prefer to do
all my work in the Cygwin bash shell, but actually I generally have
the cygwin filesystem mounted in DOS-mode, not Unix-mode.  So that's
one issue, but it seems like the cygwin folks do recognize it as a bug
that svn doesn't take that setting as the 'native' EOL style.  The
cygwin port of CVS does take it into account, which is really the
whole reason I use Cygwin in DOS-mode in the first place -- to get CVS
to act properly.

But beyond svn's behavior under Cygwin, I still think it would be
useful if one could check out one copy of one's source tree on a unix
machine and then freely edit it from either unix or windows (via
samba, e.g.) and svn would just take care of the line endings so that
junk doesn't get checked in.  I think that would require the checked
out tree to 'know' what sort of eol-style it is.


Ok, so anyway, it sounds like what I want isn't supported and isn't
likely to be in the near future.  In that case, is there any
reasonable workaround that will let me work from a cygwin shell, but
have all my source files treated as DOS?  I guess I'll just try using
the win32 command line client from inside Cygwin and see how it goes.

Thanks,
---bb

On 25 Feb 2005 15:56:03 -0600, C. Michael Pilato <cm...@collab.net> wrote:
> Jani Averbach <ja...@jaa.iki.fi> writes:
> 
> > On 2005-02-25 12:48+0900, Bill Baxter wrote:
> > > It seems there's NO way to force svn to check out files as CRLF under
> > > Unix or Cygwin.  This just smacks me as a bizarre limitation for svn
> > > to have at this stage of the game.
> >
> > svn:eol-style might help you:
> > http://svnbook.red-bean.com/en/1.1/ch07s02.html#svn-ch-7-sect-2.3.5
> >
> > svn help ps
> >   ...
> >   svn:eol-style  - One of 'native', 'LF', 'CR', 'CRLF'.
> 
> I think the complaint is that on a cygwin system, you might have
> variations notions of what "native" means depending on whether you
> feel like using Unix or Windows tools to operate on the working copy
> files.
> 
> Am I completely wrong?
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Cygwin, eol-style, and --native-eol

Posted by "C. Michael Pilato" <cm...@collab.net>.
Jani Averbach <ja...@jaa.iki.fi> writes:

> On 2005-02-25 12:48+0900, Bill Baxter wrote:
> > It seems there's NO way to force svn to check out files as CRLF under
> > Unix or Cygwin.  This just smacks me as a bizarre limitation for svn
> > to have at this stage of the game.
> 
> svn:eol-style might help you:
> http://svnbook.red-bean.com/en/1.1/ch07s02.html#svn-ch-7-sect-2.3.5
> 
> svn help ps
>   ...
>   svn:eol-style  - One of 'native', 'LF', 'CR', 'CRLF'.

I think the complaint is that on a cygwin system, you might have
variations notions of what "native" means depending on whether you
feel like using Unix or Windows tools to operate on the working copy
files.  

Am I completely wrong?

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Cygwin, eol-style, and --native-eol

Posted by Jani Averbach <ja...@jaa.iki.fi>.
On 2005-02-25 12:48+0900, Bill Baxter wrote:
> It seems there's NO way to force svn to check out files as CRLF under
> Unix or Cygwin.  This just smacks me as a bizarre limitation for svn
> to have at this stage of the game.

svn:eol-style might help you:
http://svnbook.red-bean.com/en/1.1/ch07s02.html#svn-ch-7-sect-2.3.5

svn help ps
  ...
  svn:eol-style  - One of 'native', 'LF', 'CR', 'CRLF'.

> Also it would be even more handy if the native eol could be set via
> the config file.
> 
http://svnbook.red-bean.com/en/1.1/ch07s02.html#svn-ch-7-sect-2.4

BR, Jani

-- 
Jani Averbach


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Cygwin, eol-style, and --native-eol

Posted by Philip Martin <ph...@codematters.co.uk>.
Bill Baxter <wb...@gmail.com> writes:

> The --native-eol flag works great for svn export.  Why isn't this flag
> supported for svn checkout too?

It's not supported because nobody wrote the code.  To do it properly
might involve storing the native-eol setting in the .svn/entries file,
I suspect subsequent commands may not work if they assume a different
setting to that used by checkout.

> Also it would be even more handy if the native eol could be set via
> the config file.

That only works if all access uses the same config file and it's not
good to assume that.  It's a characteristic of the wc and needs to be
stored in .svn/entries.

-- 
Philip Martin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org