Could you set 'svn:eol-style' to 'LF' for 'packaging/win32/*.sh'?
Christian Stimming
stimming at tuhh.de
Wed Jun 2 14:57:37 EDT 2010
Am Wednesday 02 June 2010 schrieb Derek Atkins:
> Hi,
>
> Tao Wang <dancefire at gmail.com> writes:
> > Hi,
> >
> > I'm adding themes and theme engines to Gnucash on Windows. Some error
> > messages always occured during the patching. And then I found it's
> > end-of-line problems stop me.
> >
> > The *.sh files do not share same svn:eol-style, some of them are set to
> > 'LF', some set to 'native' which is 'CRLF' on Windows, the rest are not
> > set svn:eol-style.Both setting them to 'LF' or leave them unset works
> > for patching. At least, they should be shared same 'svn:eol-style'.
> > Because, set them to 'LF' will not stop them running by 'bash' on
> > Windows. So, I suggest set them to 'LF'. Thanks.
>
> Are you doing your work on Windows or on Linux? IMHO all scripts
> should be set to eol-style native because then local editing on the
> local system will do the right thing.. Although if you're doing your
> work on a Windows system and then creating a patch, yes, it's sort of
> going to expect the patch to be applied on Windows.
>
> However I believe that changing the line-ending to LF would
> be.. inappropriate. It would make editing on Windows harder, and your
> patches will most likely still have CRLF in them!
Actually I'd rather disagree here: I've been working in cross-platform
development with SVN for quite some time by now, and the line ending issue
keeps popping up again and again *unless* we set the svn:eol-style hard for
one of the two choices. Be it either LF or CRLF, but the point is that only
with one of these two choices the checked out files will have deterministic
content. In all other cases (no svn:eol-style or even "native") it is up to
the OS of the user and/or the editor and/or the current svn client to see
which line endings are in the file.
Hence, I agree with the original proposal and I'd rather set all eol-style to
LF unless there are some files where Windows tools require CRLF line endings.
As Tao has confirmed the latter is not the case, I'll set this to LF. This
will get rid of any line ending issues.
(But only for files which are already in SVN. New files will always have no
svn:eol-style set. It is not possible to have those set for new files by the
server automatically. Believe me, it is not possible - I have spent
considerable time researching this. The only simple workaround is that all
developers modify their $HOME/.subversion/config files and activate the
following lines:
enable-auto-props = yes
*.c = svn:eol-style=LF
*.h = svn:eol-style=LF
*.sh = svn:eol-style=LF
Once this is set on a user's computer, every new file that is added to svn
from that computer will have the noted eol-style property added
automatically.)
Regards,
Christian
More information about the gnucash-devel
mailing list