[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: Julian Foad <julianfoad_at_btopenworld.com>
Date: Thu, 23 Oct 2008 13:38:19 +0100

On Thu, 2008-10-23 at 13:31 +0200, Neels J Hofmeyr wrote:
>
> 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!

But that doesn't enable us to read back the conflict state immediately
after loggy-writing it, does it?

> > 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!!!

Jolly good! Happy moving!

- Julian

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-10-23 14:38:36 CEST

This is an archived mail posted to the Subversion Dev mailing list.