> Frankly, though, probably not enough that I
> would want to see such an ugly feature built into fossil.
I also like beautiful things and hate ugly things. But life is
sometimes difficult and it is better to fix problems instead
of workaround them.
An alternative solution could be:
fossil settings read-write-filter my_proc
where my__proc could be one executable, a shell script or anything
that could be started with "start" on windows.
It would take 3 arguments: read_or_write, the file name and the contents and
would return the modified contents.
Then, in the tools directory or in contrib it should be possible to provide
several examples of my_proc
A typical script for unix could be:
#!/bin/sh -f
read_write=$1
filename=$2
contents=$3
extension=${filename##*.}
if [ $extension = "txt" ] ; then
if [ $read_write = "read" ] ; then
echo $contents | unix2dos
else
echo $contents | dos2unix
fi
else
echo "$contents"
fi
2009/10/21 Joshua Paine <[email protected]>:
> On Wed, 2009-10-21 at 17:09 +0200, Ramon Ribó wrote:
>> 1- A TCL file is checked in on windows
>> 2- It is checked out on unix and line ending is "\r\n"
>
> When the file is created on Windows, it should be created using unix
> line endings. This is very easy to do in most editors. You can just set
> it as your default and no one gets hurt. Everything except Notepad can
> view it fine.
>
>> 1- I create a nice README or License file for my application in unix
>> 3- README files are open by the user (not by my that I use a wonderful
>> convert-all editor). In Windows, they typically open with Notepad.
>> 4- The file is viewed as with one very long line
>
> Since your end users are not likely to checkout your code from fossil, I
> don't think fossil's behavior is very relevant here. Either create your
> README with windows line endings, or add some kind of conversion into
> your build process when you produce packages for end users.
>
> For source code, my experience is that unix endings work everywhere for
> running or viewing--except windows notepad. If there is any language
> available on both windows and linux where a file will run/compile on
> windows if it has windows endings *but not* if it has unix endings and
> likewise will run on linux only with unix endings, then I have some
> sympathy for your plight. Frankly, though, probably not enough that I
> would want to see such an ugly feature built into fossil.
>
> --
> Joshua Paine
> LetterBlock: Web applications built with joy
> http://letterblock.com/
> 301-576-1920
>
> _______________________________________________
> fossil-users mailing list
> [email protected]
> http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
>
_______________________________________________
fossil-users mailing list
[email protected]
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users