You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Karl Fogel <kf...@red-bean.com> on 2008/04/28 18:38:47 UTC

WIN32_RETRY_LOOP on Cygwin (was: Subversion 1.5.0 Release Candidate 4 Released)

Spiro Trikaliotis <ne...@trikaliotis.net> writes:
> I have not tested this version yet, but from the source, I see that one
> behaviour is the same as with 1.4:
>
> In subversion-1.5.0-rc4/subversion/libsvn_subr/io.c, the
> WIN32_RETRY_LOOP is defined as loop only if WIN32 is defined.
> Unfortunately, for Cygwin, this means that this work-aroundy is not
> performed, as WIN32 is not defined there.
>
> Is it possible to change this
> #ifdef WIN32
> to
> #if defined(WIN32) || defined(__CYGWIN__)
>
> so Cygwin can profit from this work-around, too?

I've CC'd dev@ on this response.

I don't have enough background knowledge to anticipate all the "gotchas"
here, but this seems reasonable to me.  Cygwin doesn't mask over the
behavior of other processes in Windows, or low-level filesystem
behaviors, right?  So it makes sense that WIN32_RETRY_LOOP() would be
necessary in Cygwin too.

However, I'd like to hear comments from other developers with more
Windows and Cygwin experience...

> (Please, compare the thread I started on the Cygwin mailing list here:
> http://www.cygwin.com/ml/cygwin/2008-04/msg00550.html)
>
> Additionally, the current SVN client (1.4.6) always uses LF line endings
> as "natural" line endings in cygwin, regardless if cygwin has been
> installed with LF line-endings, or with CR/LF line endings.

Hmmm, how does Subversion determine the "native" end-of-line convention?
I'd think we just ask APR somehow; if so, the question is, why isn't APR
getting the right answer on Cygwin?

> I wanted to test this with the current 1.5.0RC4, but I was not able to
> compile it myself. (Yes, I would prefer a pre-built version of this.)
> Will there be a change with 1.5.0RC4, or does it still behave the same
> here?

I didn't understand your final question (reword it?), but re prebuilts:
I don't know of any, and search://subversion "1.5.0-rc4" prebuilt/ turns
up only your mail :-).

-Karl

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

Re: WIN32_RETRY_LOOP on Cygwin

Posted by Karl Fogel <kf...@red-bean.com>.
Karl Fogel <kf...@red-bean.com> writes:
> Spiro Trikaliotis <ne...@trikaliotis.net> writes:
>> I wanted to test this with the current 1.5.0RC4, but I was not able to
>> compile it myself. (Yes, I would prefer a pre-built version of this.)
>> Will there be a change with 1.5.0RC4, or does it still behave the same
>> here?
>
> I didn't understand your final question (reword it?), but re prebuilts:
> I don't know of any, and search://subversion "1.5.0-rc4" prebuilt/ turns
> up only your mail :-).

Ah, re prebuilts, see this (lightly edited) conversation I just had in
IRC:

   <kfogel>   anyone offering prebuilts of 1.5.0-rc4?  (e.g., CollabNet?)
   <markphip> kfogel: yes we have posted Windows and Linux binaries
   <markphip> OSX coming soon
   <markphip> and Solaris
   <markphip> http://merge-tracking.open.collab.net/
   <kfogel>   markphip: thanks
   <kfogel>   I'll follow up to the fellow who asked.

-Karl

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

Re: WIN32_RETRY_LOOP on Cygwin (was: Subversion 1.5.0 Release Candidate 4 Released)

Posted by Spiro Trikaliotis <ne...@trikaliotis.net>.
Hello Karl,

thank you for your answer.

Karl Fogel wrote:

> Spiro Trikaliotis <ne...@trikaliotis.net> writes:

>> Additionally, the current SVN client (1.4.6) always uses LF line endings
>> as "natural" line endings in cygwin, regardless if cygwin has been
>> installed with LF line-endings, or with CR/LF line endings.
>
> Hmmm, how does Subversion determine the "native" end-of-line convention?
> I'd think we just ask APR somehow; if so, the question is, why isn't APR
> getting the right answer on Cygwin?

It is because it is not clear on Cygwin what is the native format. With
Cygwin, you can mount directories with LF line endings, and you can mount
them with CRLF line endings. You can even mount the same part of the FS
in two diffent directories, once with LF, and once with CRLF line
endings.

Obviously, the developers of APR must have thought the the LF line
ending is the natural one for Cygwin. However, Cygwin operates on
Windows, where CRLF is the natural line ending.

CVS always behaves correctly in this case, as CVS opens text files as
such (fopen(..., "wt")). As SVN handles this case itself, it must know
which is the correct line ending.

This could, for example, be recognized from Cygwin. Anyway, personally,
it would be enough for me if I could somehow tell SVN which line ending
to use as the native one. Something like --native-eol for "svn export"
also for the checkout, update and commit commands would be exactly what
I would need, or the ability to override in the config file.


I have seen this being discussed elsewhere, too, in the thread starting
here:

  http://svn.haxx.se/dev/archive-2005-02/0993.shtml

It also talks about how one could change the native eol style locally:

  http://svn.haxx.se/dev/archive-2005-02/1034.shtml

>> I wanted to test this with the current 1.5.0RC4, but I was not able to
>> compile it myself. (Yes, I would prefer a pre-built version of this.)
>> Will there be a change with 1.5.0RC4, or does it still behave the same
>> here?
>
> I didn't understand your final question (reword it?), but re prebuilts:
> I don't know of any, and search://subversion "1.5.0-rc4" prebuilt/ turns
> up only your mail :-).

You understood it correctly, the link you send in the next mail was
exactly what I was searching for: A version for Windows which I do not
have to compile. I could have called it "Windows binaries" instead, you
are right.

Thanks for your time,
Spiro.

-- 
Spiro R. Trikaliotis                              http://opencbm.sf.net/
http://www.trikaliotis.net/                     http://www.viceteam.org/


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

Re: WIN32_RETRY_LOOP on Cygwin

Posted by Spiro Trikaliotis <ne...@trikaliotis.net>.
Hello Max,

thank you for your reply, and I am sorry for my late reply.

Max Bowsher wrote:

> Karl Fogel wrote:
>> Spiro Trikaliotis <ne...@trikaliotis.net> writes:
>>> In subversion-1.5.0-rc4/subversion/libsvn_subr/io.c, the
>>> WIN32_RETRY_LOOP is defined as loop only if WIN32 is defined.
>>> Unfortunately, for Cygwin, this means that this work-aroundy is not
>>> performed, as WIN32 is not defined there.
[...]
>> I don't have enough background knowledge to anticipate all the "gotchas"
>> here, but this seems reasonable to me.
[...]
>> However, I'd like to hear comments from other developers with more
>> Windows and Cygwin experience...
>
> I guess as former Subversion Cygwin package maintainer, I should pipe up
> here. (former, because I resigned yesterday, having completed the
> transition to a Microsoft-free computing experience just this week)

Congratulations to the transistion. Unfortunately, this is something not
everyone can afford.

> People occasionally would suggest using WIN32_RETRY_LOOP on Cygwin. I
> never patched it into the Cygwin packages during my tenure, because I
> never once experienced any Subversion operation failing in a relevant
> way. But then, perhaps that's because I was just lucky, and tended to
> run a fairly clean system. *shrug*

Well, this was true for me, too, before my Antivirus company decided to
release a newer main version of the tool. It was then when this problem
started...

>> Hmmm, how does Subversion determine the "native" end-of-line convention?
>> I'd think we just ask APR somehow; if so, the question is, why isn't APR
>> getting the right answer on Cygwin?
>
> native == APR_EOL_STR, a preprocessor constant. Which is fine. Except
> that on Cygwin, the choice of what the intended on-disk eol style should
> be can be configured on *per-directory* basis. I took one look at how
> much libsvn_subr assumes that the native eol is a simple compile-time
> constant, and punted on trying to change anything here.

So, it seems the best way to solve this for me is to compile SVN myself
and replace that APR_EOL_STR to CRLF, right?

Regards,
   Spiro.

-- 
Spiro R. Trikaliotis                              http://opencbm.sf.net/
http://www.trikaliotis.net/                     http://www.viceteam.org/


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

Re: WIN32_RETRY_LOOP on Cygwin

Posted by Max Bowsher <ma...@ukf.net>.
Karl Fogel wrote:
> Spiro Trikaliotis <ne...@trikaliotis.net> writes:
>> In subversion-1.5.0-rc4/subversion/libsvn_subr/io.c, the
>> WIN32_RETRY_LOOP is defined as loop only if WIN32 is defined.
>> Unfortunately, for Cygwin, this means that this work-aroundy is not
>> performed, as WIN32 is not defined there.
>>
>> Is it possible to change this
>> #ifdef WIN32
>> to
>> #if defined(WIN32) || defined(__CYGWIN__)
>>
>> so Cygwin can profit from this work-around, too?
> 
> I've CC'd dev@ on this response.
> 
> I don't have enough background knowledge to anticipate all the "gotchas"
> here, but this seems reasonable to me.  Cygwin doesn't mask over the
> behavior of other processes in Windows, or low-level filesystem
> behaviors, right?  So it makes sense that WIN32_RETRY_LOOP() would be
> necessary in Cygwin too.
> 
> However, I'd like to hear comments from other developers with more
> Windows and Cygwin experience...

I guess as former Subversion Cygwin package maintainer, I should pipe up
here. (former, because I resigned yesterday, having completed the
transition to a Microsoft-free computing experience just this week)

People occasionally would suggest using WIN32_RETRY_LOOP on Cygwin. I
never patched it into the Cygwin packages during my tenure, because I
never once experienced any Subversion operation failing in a relevant
way. But then, perhaps that's because I was just lucky, and tended to
run a fairly clean system. *shrug*

>> (Please, compare the thread I started on the Cygwin mailing list here:
>> http://www.cygwin.com/ml/cygwin/2008-04/msg00550.html)



>> Additionally, the current SVN client (1.4.6) always uses LF line endings
>> as "natural" line endings in cygwin, regardless if cygwin has been
>> installed with LF line-endings, or with CR/LF line endings.
> 
> Hmmm, how does Subversion determine the "native" end-of-line convention?
> I'd think we just ask APR somehow; if so, the question is, why isn't APR
> getting the right answer on Cygwin?

native == APR_EOL_STR, a preprocessor constant. Which is fine. Except
that on Cygwin, the choice of what the intended on-disk eol style should
be can be configured on *per-directory* basis. I took one look at how
much libsvn_subr assumes that the native eol is a simple compile-time
constant, and punted on trying to change anything here.


Max.