Alexey Dobriyan <adobriyan@mail.ru> writes:
> 1. svn diff -p1 (but not p2, p3, ...)
> (I think is optimal)
>
> svn_diff_file_output_unified() gets new parameter -
> 'unsigned int patch_level'. 0 means "-p0" patches , 1 means "-p1" ones.
>
> Logic of svn_diff_file_output_unified() becomes
> if (patch_level) {
> printf("--- a/"); ...
> printf("+++ b/"); ...
> } else {
> printf("--- "); ...
> printf("+++ "); ...
> }
>
> svn_diff_file_output_unified(...) becomes
> svn_diff_file_output_unified(... , 0); to not break other people.
>
> Next step: get "-p1" option from command line, propagate patch_level down.
> Smells like API change for me. Comments on this are extremely welcome.
>
> I do not know a project which demands -p2 and greater levels. If there is
> one go to #2. :)
>
> 2. svn diff -pN
>
> Everything like in #1 with an obvious change in output.
Unfortunately, all options share the same namespace, and using "-p"
for something so diff-specific probably wouldn't be a good allocation.
However, can't you generate -p1 patches with
$ svn diff --diff-cmd=/usr/bin/diff -x "-p1"
?
-Karl
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Jul 31 01:52:05 2004