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

Re: svn commit: r919460 - filtering svn patch targets

From: Stefan Küng <tortoisesvn_at_gmail.com>
Date: Wed, 10 Mar 2010 20:58:24 +0100

On 10.03.2010 19:14, Julian Foad wrote:

>> Yes, I would also need to know which paths the patch wants to modify,
>> and then later I want to tell the API which of those paths it should
>> actually modify.
>> This is to let the user choose which paths to modify and which ones not.
>
> OK, well the issue #3434 didn't mention that. Since you already have a
> patch implementation which does what you want, could you show us the API
> definition (at least) for this part of it? That would help a lot, since
> then we wouldn't have to guess about what you want :-)

It's basically a class with methods like:
* ParsePatchfile
* GetCount //returns the number of paths affected
* GetPath(int index) // returns the affected path
* PatchPath(int index, TCHAR * target) // applies the patch for the path
and saves the result in 'target'

The names of the class methods are actually a little bit different, but
that's pretty much what we have right now and what we need.
Of course, it might not be possible for the svn patch to use indexes to
specify the affected path, but passing in the path would work too (if
there's a way to get a list of those paths).

>
>> And it would be great if I could tell where to save the result, i.e. not
>> having the patch applied to the target file but to a copy of that file
>> instead so I can show the user a preview of the result without actually
>> modifying the real file yet.
>
> Again, please suggest an API for this. I know we could design it
> ourselves, but it'll be great if you can save us some time!

See above the "PatchPath(int index, TCHAR * target)" method.

Stefan

-- 
        ___
   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest Interface to (Sub)Version Control
    /_/   \_\     http://tortoisesvn.net
Received on 2010-03-10 20:59:00 CET

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.