[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] optionally disable normalization of working copy files in diff invocations

From: Matthias Gerstner <Matthias.Gerstner_at_ncp-e.com>
Date: Fri, 18 Jul 2014 11:32:19 +0200

> I'd hope we could address this without public API changes and
> without adding yet another command line option.

Yes the API change is pretty tough.

> How about we make this the default if a third party diff tool is used?
> This way, third party diff tools will always display differences in
> keywords, and possibly EOLs.

Would be fine for the common case I guess. But it still might break some
more exotic uses. At least reversing the default might be a good idea,
so the normalization only takes place if explicitly requested when using
external tools.

Another more complex approach would be to keep passing temporary,
normalized files to the differ but then afterwards check whether it has
been modified an incorporate the changes back into the working copy. But
that's beyond what I can do here...

> In terms of coding style, I'd use a boolean that switches normal
> form on, rather than off. I find it easier to keep track of this way.

That's true.

> The interaction between use_text_base and your new no_normalization
> flag isn't made clear. You can't have both!
>
> Also, your change only addresses BASE->WORKING diffs, as far as I can tell.
> What about REPOS->WORKING or WORKING->REPOS diffs?

I've actually just been annoyed with the inability to edit my diffs so I
poked around in the code and that's the result. It fixed my particular
use case. I had quite a hard time getting so far, not knowing the
internal workings of subversion very well.

> The diff below (compile-tested but otherwise untested) shows how
> I would try to address this without any public API changes.
> Does this do what you want?

I've tested it but didn't get the desired result. Using --diff-cmd I
still get passed temporary files.

-- 
Matthias Gerstner, Dipl.-Wirtsch.-Inf. (FH)
Entwicklung
 
NCP engineering GmbH
Dombühler Straße 2, D-90449, Nürnberg
Geschäftsführer Peter Söll, HRB-Nr: 77 86 Nürnberg
 
Telefon: +49 911 9968-153, Fax: +49 911 9968-229
E-Mail: Matthias.Gerstner_at_ncp-e.com
Internet: http://www.ncp-e.com

Received on 2014-07-18 11:32:59 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.