Content filter sample: eol plugin
Ian Clatworthy
ian.clatworthy at internode.on.net
Mon May 19 06:22:42 BST 2008
Talden wrote:
> Ahh, it seems that this plugin solves a different problem to that hit
> by my developers. All of the tools know how to _render_ EOLs of both
> kinds fine but some of the tools do not respect the EOLs currently in
> the file when adding new EOLs - they might add CRLF lines to a .sh.
> In this circumstance this plugin can't help since we don't want exact,
> we want EOLs normalised to a target form for certain file-types.
>
> Perhaps these are two combination types that are desirable.
No problem - we can extend the list similar to your suggestion.
> ====== ======================= ========================================
> Value Commit newlines as On checkout, convert newlines to
> ====== ======================= ========================================
> exact exactly as in file No conversion
> ------ ----------------------- ----------------------------------------
> dos crlf No conversion
> ------ ----------------------- ----------------------------------------
> nix lf No conversion
> ------ ----------------------- ----------------------------------------
> native lf crlf on Windows, otherwise lf
> ====== ======================= ========================================
I'd prefer to keep "exact", "native" and "dos" as they were and add
"crlf" and "lf" for the dos/nix cases you've added above. Is that OK? If
you think it would be clearer, I'll rename "native" to "unix".
> Failing that we're back to using scripted conversion of files at build
> time to enforce the rules and just have to live with noisy commits.
I'd consider the plugin a failure if you still need to do that. Let's
make sure it works for you because I'm sure many others will run into
the same issues.
Ian C.
More information about the bazaar
mailing list