You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by "Neels J. Hofmeyr" <ne...@elego.de> on 2008/10/24 00:58:42 UTC

branch tree-conflicts-notify

Hey guys,

I'm quite glad that we're all moving in the same direction, but by now I'm
thoroughly confused as to what is being done by whom, and what I should be
doing next.

I updated my branch wc but don't see most of the changes you talked about.
Are you committing on trunk? Steve, I see you updated the branch to trunk.
Are you trying to confuse me? ;)

Maybe it would be good if we keep the others updated on what we were doing,
as in post unfinished patches so that we don't do the exact same things in
parallel. Btw, have you guys finished the other stuff you took?

So, I'll take a look at merge notification, then. I'm afraid to change
either of svn_wc_conflicted_p2() or update notification, because I fear you
guys have patches floating for it already.

Am I being cranky? ;)

~Neels

Stephen Butler wrote:
> Quoting Julian Foad <ju...@btopenworld.com>:
> 
>>>
>>> Hmm. I've just had a look. I would want the new svn_wc_conflicted_p2()
>>> to be rather different from the old ..._p().
>>>
>>>   (1) It needs to take an adm_access. It should take this INSTEAD of an
>>> "entry", as it can easily get the entry for itself. There is no need to
>>> make the caller do this extra step. The rules for adm_access should
>>> probably be, "If there is an open adm access baton for path's parent,
>>> then adm_access must be in a set that includes it; and if there is an
>>> open adm access baton for path, then adm_access must be in a set that
>>> includes it." or something like that.
>>>
>>>   (2) While we're there, we should make all of the output parameters
>>> optional.
>>>
>>>   (3) The path need not be the path of a version-controlled object.
>>>
>>>   (4) The old function's path parameter is called "dir_path". Not sure
>>> why. The new one should be called just "path" as it applies to any node
>>> kind.
>>
>> (4) OK, I see why it's called "dir_path": (name-of-a-directory,
>> entry-from-the-directory) is one way of identifying an item in the WC.
>> We need to change (1) and (4) together, so that the new interface is:
>> (name-of-an-item, adm-access-for-the-item). This achieves (3).
>>
>>
>>> The old function looks for files on disk as well as what the "entry"
>>> says to determine whether there are text and prop conflicts. I don't
>>> propose changing that now, even though we have no equivalent behaviour
>>> for tree conflicts.
>>>
>>> - Julian
>>
> 
> Hi Julian,
> 
> Sorry I missed your last email.  As it turns out, my new function was
> almost exactly like your plan, except I hadn't gotten rid of the entry
> arg yet.  Now I hope I'll get full marks:
> 
> [[[
> /** Given a @a path in a dir under version control, decide if it is in
>  * state of conflict; return the answers in @a *text_conflicted_p, @a
>  * *prop_conflicted_p, and @a *tree_conflicted_p.  If one or two of the
>  * answers are uninteresting, simply pass NULL pointers.
>  *
>  * If @path is unversioned or does not exist, @a *text_conflicted_p and
>  * @a *prop_conflicted_p will be @c FALSE.
>  *
>  * @a adm_access is the admin access baton of the parent directory.
>  *
>  * If the @a path has a corresponding text conflict file (with suffix
>  * .mine, .theirs, etc.) that cannot be found, assume that the text
>  * conflict has been resolved by the user and return @c FALSE in @a
>  * *text_conflicted_p.
>  *
>  * Similarly, if a property conflicts file (.prej suffix) exists, but
>  * it cannot be found, assume that the property conflicts have been
>  * resolved by the user and return @c FALSE in @a *prop_conflicted_p.
>  *
>  * @a *tree_conflicted_p can't be auto-resolved in this fashion.  An
>  * explicit `resolved' is needed.
>  *
>  * @since New in 1.6.
>  */
> svn_error_t *
> svn_wc_conflicted_p2(svn_boolean_t *text_conflicted_p,
>                      svn_boolean_t *prop_conflicted_p,
>                      svn_boolean_t *tree_conflicted_p,
>                      const char *path,
>                      svn_wc_adm_access_t *adm_access,
>                      apr_pool_t *pool);
> ]]]
> 
> Cheers,
> Steve

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


Re: branch tree-conflicts-notify

Posted by Stephen Butler <sb...@elego.de>.
Quoting Julian Foad <ju...@btopenworld.com>:

> On Fri, 2008-10-24 at 17:28 +0200, Stephen Butler wrote:
> [...]
>>   * How much tree conflict info do we need to pass around in an update
>>     editor for use by the notify_func?  Candidates include the
>>     following datatypes:
>>
>>     1. svn_boolean_t
>>
>>     2. svn_wc_conflict_reason_t
>>
>>     3. svn_wc_conflict_description_t
>>
>>       SB: I plead for the simplest possible datatype, because then I
>>           make fewer mistakes. ;-)
>
> Urg. Too many email threads in progress. Sorry, I'm crossing emails with
> you. I already posted saying I want (3.), but anything will do for now.
> It was only a desire to get _something_ happening on trunk that we could
> all work with that led me to commit (3.) to trunk r33878 on Friday.
>
> I wouldn't have minded (1), but I've just now completed testing a
> catch-up merge to your branch which introduces (3), so rather than
> abandoning it I'm committing it. Sorry if it feels like I'm being pushy
> there.

No problem.

> You also posted saying let's merge the pre-r33891 state of the branch to
> trunk. Yes, if it's an improvement on trunk, please do it! I'm not sure
> if that means cherry-picking or reverting a susequent merge or what.

I think the branch is OK as it is.  The obvious next step is to improve
the skipping of tree conflicted trees, which as we've discussed should
be committed separately.

Earlier I committed r33926 on the branch, which makes all tests
pass.  No drastic changes were needed.

The branch is now fully up-to-date with trunk. I'm finishing the merge
to trunk now.

Regards,
Steve

-- 
Stephen Butler | Software Developer
elego Software Solutions GmbH
Gustav-Meyer-Allee 25 | 13355 Berlin | Germany
fon: +49 30 2345 8696 | mobile: +49 163 25 45 015
fax: +49 30 2345 8695 | http://www.elegosoft.com
Geschäftsführer: Olaf Wagner | Sitz der Gesellschaft: Berlin
Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org


Re: branch tree-conflicts-notify

Posted by Julian Foad <ju...@btopenworld.com>.
On Fri, 2008-10-24 at 17:28 +0200, Stephen Butler wrote:
[...]
> Current status: on the branch, the update-editor and its friends are
> finally playing nicely with each other and printing 'C' where we want
> it, at least for 'svn update'.  I'll fix up the switch tests this
> evening (on the branch).  And have a look at the situation for merge.
> 
> Before we merge the tree-conflicts-notify branch into trunk, there are
> a couple of design issues to sort out.
> 
>   * Should we print '   C' or '   C(D->M)' for a tree conflict victim?
> 
>       SB: The latter (in the style of 'svn status --conflicts') is nice,
>           but the former is simpler to generate and to test.

The simpler output is fine.

>   * How much tree conflict info do we need to pass around in an update
>     editor for use by the notify_func?  Candidates include the
>     following datatypes:
> 
>     1. svn_boolean_t
> 
>     2. svn_wc_conflict_reason_t
> 
>     3. svn_wc_conflict_description_t
> 
>       SB: I plead for the simplest possible datatype, because then I
>           make fewer mistakes. ;-)

Urg. Too many email threads in progress. Sorry, I'm crossing emails with
you. I already posted saying I want (3.), but anything will do for now.
It was only a desire to get _something_ happening on trunk that we could
all work with that led me to commit (3.) to trunk r33878 on Friday.

I wouldn't have minded (1), but I've just now completed testing a
catch-up merge to your branch which introduces (3), so rather than
abandoning it I'm committing it. Sorry if it feels like I'm being pushy
there.


>   * If it turns out that merge's update editor requires substantial
>     changes to fix tree conflict notification, can we do that in a
>     second diff?

That would have been no problem, and still is no problem if further
changes are needed.


You also posted saying let's merge the pre-r33891 state of the branch to
trunk. Yes, if it's an improvement on trunk, please do it! I'm not sure
if that means cherry-picking or reverting a susequent merge or what.

- Julian




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: branch tree-conflicts-notify

Posted by Stephen Butler <sb...@elego.de>.
Quoting Julian Foad <ju...@btopenworld.com>:

> Neels,
>
> Sometimes we seem to be getting in each other's way, but generally I
> find it immensely helpful to see you doing similar things in a different
> way. Half of the things I get stuck on, you show me a way out. The bits
> I get stuck on take up most of my time, so your showing me the way
> through half of them nearly doubles my productivity!
>
> - Julian


I agree.  At my level of expertise, I can't comment usefully on a diff
to the callbacks apparatus until I've tried to solve the problem
myself.  There's some redundant programming effort, but teaching each
other directly would also take time.

Neels, I'm sorry if I've been blocking you from committing to the branch
you made.  On the positive side, in r33883 I edited the update tests
so that they all pass.  To get an idea of the current behavior of the
branch, just search for the relevant test expectations (containing the
string "treeconflicts='C'").

Current status: on the branch, the update-editor and its friends are
finally playing nicely with each other and printing 'C' where we want
it, at least for 'svn update'.  I'll fix up the switch tests this
evening (on the branch).  And have a look at the situation for merge.

Before we merge the tree-conflicts-notify branch into trunk, there are
a couple of design issues to sort out.

  * Should we print '   C' or '   C(D->M)' for a tree conflict victim?

      SB: The latter (in the style of 'svn status --conflicts') is nice,
          but the former is simpler to generate and to test.

  * How much tree conflict info do we need to pass around in an update
    editor for use by the notify_func?  Candidates include the
    following datatypes:

    1. svn_boolean_t

    2. svn_wc_conflict_reason_t

    3. svn_wc_conflict_description_t

      SB: I plead for the simplest possible datatype, because then I
          make fewer mistakes. ;-)

  * If it turns out that merge's update editor requires substantial
    changes to fix tree conflict notification, can we do that in a
    second diff?

Comments, tree conflict fans?

Regards,
Steve


-- 
Stephen Butler | Software Developer
elego Software Solutions GmbH
Gustav-Meyer-Allee 25 | 13355 Berlin | Germany
fon: +49 30 2345 8696 | mobile: +49 163 25 45 015
fax: +49 30 2345 8695 | http://www.elegosoft.com
Geschäftsführer: Olaf Wagner | Sitz der Gesellschaft: Berlin
Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org


Re: branch tree-conflicts-notify

Posted by "Neels J. Hofmeyr" <ne...@elego.de>.

Julian Foad wrote:
> Neels,
> 
> Sometimes we seem to be getting in each other's way, but generally I
> find it immensely helpful to see you doing similar things in a different
> way. Half of the things I get stuck on, you show me a way out. The bits
> I get stuck on take up most of my time, so your showing me the way
> through half of them nearly doubles my productivity!

Cool! I guess, if I look at it that way... it's probably just me, not used
to working across other people. :)

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


Re: branch tree-conflicts-notify

Posted by Julian Foad <ju...@btopenworld.com>.
Neels,

Sometimes we seem to be getting in each other's way, but generally I
find it immensely helpful to see you doing similar things in a different
way. Half of the things I get stuck on, you show me a way out. The bits
I get stuck on take up most of my time, so your showing me the way
through half of them nearly doubles my productivity!

- Julian



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: branch tree-conflicts-notify

Posted by Julian Foad <ju...@btopenworld.com>.
On Fri, 2008-10-24 at 04:05 +0200, Neels J. Hofmeyr wrote:
> 
> Julian Foad wrote:
> > On Fri, 2008-10-24 at 02:58 +0200, Neels J. Hofmeyr wrote:
> >> Hey guys,
> >>
> >> I'm quite glad that we're all moving in the same direction, but by now I'm
> >> thoroughly confused as to what is being done by whom, and what I should be
> >> doing next.
> >>
> >> I updated my branch wc but don't see most of the changes you talked about.
> >> Are you committing on trunk? Steve, I see you updated the branch to trunk.
> >> Are you trying to confuse me? ;)
> > 
> > I'm working on trunk. I'm regarding the "tree-conflicts-notify" branch
> > as yours alone.
> > 
> >> Maybe it would be good if we keep the others updated on what we were doing,
> >> as in post unfinished patches so that we don't do the exact same things in
> >> parallel. Btw, have you guys finished the other stuff you took?
> > 
> > OK, here (attached) is the "skip when conflicts occur during update"
> > patch that I'm working on.
> > 
> >> So, I'll take a look at merge notification, then. I'm afraid to change
> >> either of svn_wc_conflicted_p2() or update notification, because I fear you
> >> guys have patches floating for it already.
> > 
> > I need an updated (per-victim) version of svn_wc_conflicted_p2(). I keep
> > starting to do it, but then stop because I don't fully understand how
> > the current callers would need to change. Maybe we can keep the current
> > version (or the previous version "svn_wc_conflicted_p()") and just
> > introduce the new version alongside it.
> > 
> > My patch attached includes a local function "conflicted_p3()" that does
> > pretty much what I want the new public function to do.
> > 
> > This patch also includes returning the new conflict (if any) from the
> > function check_tree_conflict, so that the calling code can generate its
> > notification and skip further edits. I believe you needed that. How
> > about you commit that part of my patch to trunk - or, if you prefer, I
> > will in the morning - with all callers just passing NULL for that output
> > parameter.
> > 
> > 
> >> Am I being cranky? ;)
> > 
> > No, you're right that it's getting confusing. I'm feeling it too. I
> > don't know whether to just commit some partial updates or if that would
> > get in your way.
> > 
> > One thing I was about to commit was removing the per-parent
> > notifications from "merge". Here's a patch for that as well. It seems a
> > bit negative to just delete that notification without adding per-victim,
> > but might be a useful start. Again, feel free to commit if you like.
> > 
> > Have a good session tonight.
> > 
> > - Julian
> 
> So, there we have it: we're already doing overlapping stuff. For example,
> I've also added a return parameter to check_tree_conflict() on the branch
> some days ago. I see you've added stuff entirely differently.

Urgh. I've just committed the "check_tree_conflict() returns the
conflict" part of my patch, thinking that would be useful for you too. I
had forgotten, since seeing your branch patch a day or two ago, that
you'd done something similar but different. I only did that tonight in
order to get somewhere with skipping, and I only did "skipping" tonight
because it got mentioned today and I thought it was time I went back to
it.

But I see that skipping in update is very closely involved with sending
notifications, which is what you're doing. So I'll try to let you
continue without me doing too much that overlaps. But I might still
commit small incremental improvements. I hope that won't be a problem.

I'll go back to "merge --into-conflicted" tomorrow. I've started coding
(the easy bit - passing a flag along to the callbacks) but next I need
to write a test or two for it, to have a scenario in which to try it
out.

> Steve, Julian, I must admit I don't know how to deal with our concurrency.
> Do you have some guidance for me?

Mail exchanges like this one. Committing frequently.

> We're currently changing the signatures of the same functions. Not good.
> Should I rather go back to the diff-repos-wc branch (dirs_same_p) for a few
> days and then come back and merge tree-conflicts-notify into what you've
> done until then, if at all necessary?

No, I'd like it if you could carry on with tree-conflicts-notify. But if
that's difficult because the structure of the code isn't good (such as
where it's supposed to check for existing conflicts and then check
whether it's causing a new tree conflict, but doesn't do it in that
order in all cases), then maybe what I'm showing in
"skip-inside-conflicts-3.patch" will be useful.

Don't worry about committing something that might get in my way: if you
commit something that's an improvement, I'll gladly merge it into
whatever work I have in progress.


> Well, by now it's too late to start something proper. Sigh. Until tomorrow,
> then.

Have a good sleep instead, perhaps. Good night,

- Julian



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: branch tree-conflicts-notify

Posted by "Neels J. Hofmeyr" <ne...@elego.de>.

Julian Foad wrote:
> On Fri, 2008-10-24 at 02:58 +0200, Neels J. Hofmeyr wrote:
>> Hey guys,
>>
>> I'm quite glad that we're all moving in the same direction, but by now I'm
>> thoroughly confused as to what is being done by whom, and what I should be
>> doing next.
>>
>> I updated my branch wc but don't see most of the changes you talked about.
>> Are you committing on trunk? Steve, I see you updated the branch to trunk.
>> Are you trying to confuse me? ;)
> 
> I'm working on trunk. I'm regarding the "tree-conflicts-notify" branch
> as yours alone.
> 
>> Maybe it would be good if we keep the others updated on what we were doing,
>> as in post unfinished patches so that we don't do the exact same things in
>> parallel. Btw, have you guys finished the other stuff you took?
> 
> OK, here (attached) is the "skip when conflicts occur during update"
> patch that I'm working on.
> 
>> So, I'll take a look at merge notification, then. I'm afraid to change
>> either of svn_wc_conflicted_p2() or update notification, because I fear you
>> guys have patches floating for it already.
> 
> I need an updated (per-victim) version of svn_wc_conflicted_p2(). I keep
> starting to do it, but then stop because I don't fully understand how
> the current callers would need to change. Maybe we can keep the current
> version (or the previous version "svn_wc_conflicted_p()") and just
> introduce the new version alongside it.
> 
> My patch attached includes a local function "conflicted_p3()" that does
> pretty much what I want the new public function to do.
> 
> This patch also includes returning the new conflict (if any) from the
> function check_tree_conflict, so that the calling code can generate its
> notification and skip further edits. I believe you needed that. How
> about you commit that part of my patch to trunk - or, if you prefer, I
> will in the morning - with all callers just passing NULL for that output
> parameter.
> 
> 
>> Am I being cranky? ;)
> 
> No, you're right that it's getting confusing. I'm feeling it too. I
> don't know whether to just commit some partial updates or if that would
> get in your way.
> 
> One thing I was about to commit was removing the per-parent
> notifications from "merge". Here's a patch for that as well. It seems a
> bit negative to just delete that notification without adding per-victim,
> but might be a useful start. Again, feel free to commit if you like.
> 
> Have a good session tonight.
> 
> - Julian

So, there we have it: we're already doing overlapping stuff. For example,
I've also added a return parameter to check_tree_conflict() on the branch
some days ago. I see you've added stuff entirely differently.

Steve, Julian, I must admit I don't know how to deal with our concurrency.
Do you have some guidance for me?

We're currently changing the signatures of the same functions. Not good.
Should I rather go back to the diff-repos-wc branch (dirs_same_p) for a few
days and then come back and merge tree-conflicts-notify into what you've
done until then, if at all necessary?

Well, by now it's too late to start something proper. Sigh. Until tomorrow,
then.

~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


Re: branch tree-conflicts-notify

Posted by Julian Foad <ju...@btopenworld.com>.
On Fri, 2008-10-24 at 02:58 +0200, Neels J. Hofmeyr wrote:
> Hey guys,
> 
> I'm quite glad that we're all moving in the same direction, but by now I'm
> thoroughly confused as to what is being done by whom, and what I should be
> doing next.
> 
> I updated my branch wc but don't see most of the changes you talked about.
> Are you committing on trunk? Steve, I see you updated the branch to trunk.
> Are you trying to confuse me? ;)

I'm working on trunk. I'm regarding the "tree-conflicts-notify" branch
as yours alone.

> Maybe it would be good if we keep the others updated on what we were doing,
> as in post unfinished patches so that we don't do the exact same things in
> parallel. Btw, have you guys finished the other stuff you took?

OK, here (attached) is the "skip when conflicts occur during update"
patch that I'm working on.

> So, I'll take a look at merge notification, then. I'm afraid to change
> either of svn_wc_conflicted_p2() or update notification, because I fear you
> guys have patches floating for it already.

I need an updated (per-victim) version of svn_wc_conflicted_p2(). I keep
starting to do it, but then stop because I don't fully understand how
the current callers would need to change. Maybe we can keep the current
version (or the previous version "svn_wc_conflicted_p()") and just
introduce the new version alongside it.

My patch attached includes a local function "conflicted_p3()" that does
pretty much what I want the new public function to do.

This patch also includes returning the new conflict (if any) from the
function check_tree_conflict, so that the calling code can generate its
notification and skip further edits. I believe you needed that. How
about you commit that part of my patch to trunk - or, if you prefer, I
will in the morning - with all callers just passing NULL for that output
parameter.


> Am I being cranky? ;)

No, you're right that it's getting confusing. I'm feeling it too. I
don't know whether to just commit some partial updates or if that would
get in your way.

One thing I was about to commit was removing the per-parent
notifications from "merge". Here's a patch for that as well. It seems a
bit negative to just delete that notification without adding per-victim,
but might be a useful start. Again, feel free to commit if you like.

Have a good session tonight.

- Julian