[prev in list] [next in list] [prev in thread] [next in thread] 

List:       subversion-dev
Subject:    Re: svn diff -p1 ?
From:       John Szakmeister <john () szakmeister ! net>
Date:       2004-07-31 0:03:32
Message-ID: 200407302003.32986.john () szakmeister ! net
[Download RAW message or body]

On Friday 30 July 2004 18:19, kfogel@collab.net wrote:
> 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"

'cd ..; svn diff <name_of_dir>' would produce a '-p1' type patch as well.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic