You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Julian Foad <ju...@apache.org> on 2017/07/11 15:33:37 UTC

Conflict resolver: say what status the Resolved option will give

I got an add-vs-add tree conflict during update, after applying a patch 
which I had also separately committed to the repo from a different WC.

Here is how it looked:

> $ svn up
> Updating '.':
> G    subversion/svn/svn.c
>    C subversion/svn/shelve-cmd.c
> Updated to revision 1801596.
> Summary of conflicts:
>   Tree conflicts: 1
> Searching tree conflict details for 'subversion/libsvn_client/shelve.c' in repository:
> Checking r1801595... done
> Tree conflict on 'subversion/libsvn_client/shelve.c':
> A new file appeared during update to r1801596; it was added by julianfoad in r1801595.
> A file scheduled to be added to the repository in the next commit was found in the working copy.
> Select: (p) Postpone, (r) Mark as resolved, (m) Merge the files, (h) Help,
>         (q) Quit resolution: r
> Tree conflict at 'subversion/libsvn_client/shelve.c' marked as resolved.

> $ svn st
> M       subversion/svn/svn.c
> RM      subversion/svn/shelve-cmd.c

The "Replaced" status is a possible resolution, but not the one I 
wanted, and I could not tell that is what I was going to get.

An improvement would be to show the pending status, perhaps like this:

...
> A file scheduled to be added to the repository in the next commit was found in the working copy.
> Pending status of the file is:
> RM      subversion/svn/shelve-cmd.c
> Select: (p) Postpone, (r) Mark as resolved, (m) Merge the files, (h) Help,
...

Certainly for tree conflicts I expect seeing the pending status would 
always be useful; also for non-tree conflicts I expect it would often be 
useful.

(Other improvements might include that the default resolution for 
add-vs-add during update should not be "replaced", but I'd like to 
discuss that elsewhere and keep this thread focused on showing the 
pending status.)

- Julian

Re: Conflict resolver: say what status the Resolved option will give

Posted by Julian Foad <ju...@apache.org>.
Stefan Sperling wrote:
> On Tue, Jul 11, 2017 at 04:33:37PM +0100, Julian Foad wrote:
>> An improvement would be to show the pending status, perhaps like this:
>>
>> ...
>>> A file scheduled to be added to the repository in the next commit was found in the working copy.
>>> Pending status of the file is:
>>> RM      subversion/svn/shelve-cmd.c
>>> Select: (p) Postpone, (r) Mark as resolved, (m) Merge the files, (h) Help,
>> ...
>>
>> Certainly for tree conflicts I expect seeing the pending status would always
>> be useful; also for non-tree conflicts I expect it would often be useful.
> 
> Sure. I like the idea.
> 
> Perhaps 'pending' is not the best way to describe this status, though.
> I think there should be a clear connection between the '(r) Mark as resolved'
> option and this status.

Ack. Perhaps "The current/working resolution (which you can accept with 
(r)) is: ..."?

> BTW, why didn't you pick the 'm' option? The new resolver is set up so
> that 'm' will usually do what you want :-)

Because I didn't know that, and because I wanted to choose an option as 
close as possible to "do nothing, just let the file be as it is or was".

- Julian


Re: Conflict resolver: say what status the Resolved option will give

Posted by Stefan Sperling <st...@elego.de>.
On Tue, Jul 11, 2017 at 04:33:37PM +0100, Julian Foad wrote:
> An improvement would be to show the pending status, perhaps like this:
> 
> ...
> > A file scheduled to be added to the repository in the next commit was found in the working copy.
> > Pending status of the file is:
> > RM      subversion/svn/shelve-cmd.c
> > Select: (p) Postpone, (r) Mark as resolved, (m) Merge the files, (h) Help,
> ...
> 
> Certainly for tree conflicts I expect seeing the pending status would always
> be useful; also for non-tree conflicts I expect it would often be useful.

Sure. I like the idea.

Perhaps 'pending' is not the best way to describe this status, though.
I think there should be a clear connection between the '(r) Mark as resolved'
option and this status.

BTW, why didn't you pick the 'm' option? The new resolver is set up so
that 'm' will usually do what you want :-)