[darcs-users] Line endings opinion poll (with bonus opinion)

Nigel Rowe rho at swiftdsl.com.au
Sun Oct 31 08:21:01 UTC 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sun, 31 Oct 2004 13:40, Michael Conrad wrote:
> On Saturday, October 30, 2004 7:27 PM Bryce Wilcox-O'Hearn wrote:
> > If you want revision control, use darcs (or monotone, or ...).  If you
> > want line-endings regularized, run a script which processes text files
> > and regularizes their line-endings.  If you want tabs coverted into
> > sequences of four spaces, run a script that does that.  Etc.
>

I see the problem as more in the way of "what is the definition of a line of 
text" than regularising the contents of the lines themselves.

> The problem remains that the mess will still get recorded, and then need to
> be fixed and a new patch generated, which will likely cause conflicts with
> Ned's repo.
>
> I had forgotten the classic issue of tabbing/spacing, though; thats another
> annoying one.  (The working files can be fixed with a script, but not the
> patches)

Tabs/spaces are the part of contents of the contents of the line.  \n vs \r\n 
vs \r define what separates lines within a *file*.  And that is system 
dependent. 

The basic unit of a darcs hunk is a line of text.  I think the definition of 
the representation of a line of text, within a file under darcs control, 
needs to be regularised.

> What about the custom-diff idea?  If I could somehow pass -b to diff, it
> would solve the irritation: darcs would only see changes involving real
> edits, and not whitespace finagling.  I forget if this will solve the ^M
> problem as well, but I could always hack up my own version of diff.
>
> I'm thinking that darcs would remain consistent if -b were applied to ALL
> of its calls to diff.  Can anyone think of an exception?

Python.  Leading whitespace is *very* significant.  For that matter, in an 
open triple-quote, trailing whitespace forms part of the literal.

>
> -Mike

Cheers,
	Nigel


- -- 
	Nigel Rowe
	rho at swiftdsl.com.au


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFBhKB1BbmcM2pfckkRAnFCAJ9Mud0igwXDmYgw9FfpHoFiB2Ea4wCfaJ9g
xruyX/BDN9MhO94rIOpmg/A=
=LXFm
-----END PGP SIGNATURE-----




More information about the darcs-users mailing list