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

Re: [Fwd: svn commit: r33855 - in branches/tree-conflicts-notify/subversion: include libsvn_client libsvn_wc svn tests/cmdline tests/cmdline/svntest]

From: Neels J Hofmeyr <neels_at_elego.de>
Date: Thu, 23 Oct 2008 13:31:26 +0200

Stephen Butler wrote:
> Quoting "Neels J. Hofmeyr" <neels_at_elego.de>:
>
>> Hi tree-conflicts folks,
>>
>> could you please scroll over this and see if you can remotely relate
>> to what
>> is going on there? Branch tree-conflicts-notify, r33855.
>>
>> Particularly, I see that right after calling check_tree_conflict(), I
>> can't
>> get the tree-conflict state by doing
>> [[[
>> /* Find out whether it's a tree conflict victim. */
>> if (tree_conflicted_p != NULL)
>> {
>> svn_wc_conflict_description_t *conflict;
>> SVN_ERR_ASSERT(adm_access != NULL);
>> path = svn_path_join(dir_path, entry->name, subpool);
>> SVN_ERR(svn_wc_get_tree_conflict(&conflict, path, adm_access,
>> subpool));
>> *tree_conflicted_p = (conflict != NULL);
>> }
>> ]]]
>> (I try to do that in svn_wc_conflicted_p2(), called from
>> subversion/libsvn_wc/update_editor.c, e.g. line 2721 on the branch),
>> apparently because the tree-conflict reporting is loggy?
>
> Yes. The logs appear to be executed only at delete_entry(),
> close_directory(), or when the user cancels. So we'll have to
> pass around a local result from check_tree_conflict().
>
>>
>> If you guys know how best to get the tree-conflicted state of a node,
>> let me
>> know. At the moment I'm making check_tree_conflict() return a value to
>> explicitly indicate a conflict to the caller. But it would be nice to
>> have
>> svn_wc_conflicted_p2() work as advertised on the branch.
>
> Try this, from subversion/libsvn_wc/status.c on trunk, in get_dir_status().
>
> {
> svn_wc_conflict_description_t *tree_conflict;
> SVN_ERR(svn_wc_get_tree_conflict(&tree_conflict,
> svn_path_join(path, entry, subpool),
> adm_access, subpool));
> if (tree_conflict)
> {
> [...]
> }
> }
>
> This works even for victims that don't exist (neither in the working
> copy nor in the repo). Our svn_wc_conflicted_p2() requires a valid
> entry, which means it simply can't do the job.

Cool, thanks!

>
> I suggest we un-deprecate the original svn_wc_conflicted_p() and use
> it for reading text and prop conflict state only. And use the existing
> svn_wc_get_tree_conflict() to read tree conflict state. In fact I have
> a diff that does this to trunk. I'll try to apply it to the new notify
> branch. It's not ready for trunk because I haven't adjusted the
> relevant test expectations.

Yeah, I was contemplating the same thing. However, changing all the
svn_wc_conflicted_p() callers is quite a task, so I won't press you to do
that for me. I've only done it yesterday and I know what else I wrote around
that. So before you crack your head open on it, you can make me do it. I
mean, sure, go ahead, I'm just saying. :)

And if you've time to spare, I'd be happy to get some help on the branch.
There's still the merge notification, and checking that switch works as update.

Right, I need to pack up now and leave for the airport soon.
Also OT: We got the flat!!!

See you around!
~Neels

-- 
Neels Hofmeyr -- elego Software Solutions GmbH
Gustav-Meyer-Allee 25 / Gebäude 12, 13355 Berlin, Germany
phone: +49 30 23458696  mobile: +49 177 2345869  fax: +49 30 23458695
http://www.elegosoft.com | Geschäftsführer: Olaf Wagner | Sitz: Berlin
Handelsreg: Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194

Received on 2008-10-23 13:31:58 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.