On 09.04.2010 21:07, Greg Stein wrote:
> On Fri, Apr 9, 2010 at 13:49, Stefan Küng<tortoisesvn_at_gmail.com> wrote:
>> ...
>> Going through the code of TSVN, I found a few places where we use functions
>> defined in svn_wc.h:
>
> Ooh! Thanks!
>
>> * svn_wc_adm_probe_open3, used to get the svn_wc_adm_access_t required for
>> svn_client_uuid_from_path()
>
> Looks like we have an access-baton-free replacement
> (svn_client_uuid_from_path2).
Great! I was wondering why an svn_client_ function would need an access
baton anyway.
>
>> * svn_wc_translated_file2
>> * svn_wc_prop_list
>> * svn_wc_is_adm_dir
>
> These should be fine.
>
>> * svn_wc_dup_status2
>
> I think we're going to be revamping the status structure pretty hard. It may
I'm aware that the status functions and structures will change a lot.
>> * svn_wc_get_pristine_copy_path (we don't use svn_wc_get_pristine_contents
>> because that returns a stream, and we need a file)
>
> Ugh. This one is particularly problematic.
>
> Can I ask what you use it for, so that we can come up with a suitable
> replacement?
We use it to get the pristine file when we do diffs WC->BASE. For
example, users can doubleclick on modified files in most dialogs
(especially the commit dialog) to show the diff before committing.
I know that there's svn_wc_get_pristine_contents which we should use
instead, but we need a file, not a stream to work with (the file is
needed because we start another app to do the diff). Sure, we could use
the stream and save that ourselves to a file instead, but that's what
svn_wc_get_pristine_copy_path already does, so we still use that api.
>
>> * svn_wc_set_adm_dir
>
> Set? Is this for when you detect a working copy that uses _svn ?
This is needed. Check the svn main.c file (for 1.6.x at least). There's
this in there:
#if defined(WIN32) || defined(__CYGWIN__)
/* Set the working copy administrative directory name. */
if (getenv("SVN_ASP_DOT_NET_HACK"))
{
err = svn_wc_set_adm_dir("_svn", pool);
if (err)
return svn_cmdline_handle_exit_error(err, pool, "svn: ");
}
#endif
So if the command line client has to initialize this, we have to do it too.
From what I remember, this was done (back in the days) so that clients
could use something else than _svn if they wanted to. The env variable
doesn't set the value but only has to be present.
Stefan
--
___
oo // \\ "De Chelonian Mobile"
(_,\/ \_/ \ TortoiseSVN
\ \_/_\_/> The coolest Interface to (Sub)Version Control
/_/ \_\ http://tortoisesvn.net
Received on 2010-04-09 21:28:20 CEST