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

Re: request for svnpatch

From: Charles Acknin <charlesacknin_at_gmail.com>
Date: Sun, 24 Aug 2008 22:49:06 +0200

On Fri, Aug 15, 2008 at 7:06 PM, Stefan Küng <tortoisesvn_at_gmail.com> wrote:
> Hi,
> I've checked out the svnpatch-diff branch some time ago to find out what
> new API's are available. I've mentioned this before, I'd like to have
> additional API's available:

Thanks for having a look! I've mostly been offline wrt Subversion for
the last couple months (writing my MS dissertation). I'll have more
time in September to further look at your request if nobody showed up

> currently, the only API available is svn_client_patch().
> I would need APIs to:
> * list all affected files/folders in a patchfile:
> - affected file path
> - maybe size of the patch part for that file
> - whether content or properties are affected
> - new name/path in case of a rename
> * ability to apply part of the patchfile, affecting only one of the
> possible paths
> without these APIs, it won't be possible to get a preview before
> actually applying the patch.

I had started implementing the dry-run mode for 'svn patch', but it
was disabled at some point to let further development take place on
the branch instead, I can't remember why/what exactly. Would dry-run
help here? (Note that I'm not saying there's no need for more APIs to
svnpatch; there is definitely.)

I'm curious, how do you deal with doing the same thing for 'svn merge'
in tsvn for instance? Say you want to obtain the list of paths
affected by a merge operation.

> the svn client could also use these:
> svn list --svnpatch patchfile
> file1 : modified
> file3 : renamed to file3_new
> file2 : moved to file4
> file4 : added
> or something like that.

I don't think the 'list' subcommand is appropriate here according to
its semantics (help list says "list (ls): List directory entries in
the repository."). The output of 'svn patch --dry-run' would be very
similar to the one you mentioned.

> And then if the user doesn't want to apply the
> full patchfile but only parts of it:
> svn apply --svnpatch patchfile file1
> would only apply the modifications for file1.

Good idea! Just copied that to my TODO list. Oh, and it's 'svn patch' btw :-)


To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-08-24 22:49:21 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.