Subject: Re: bug#3860: vc-svn calls "svn resolved" without permission

From: "James Y Knight" <[email-masked]>
Date: Sun, 24 Jan 2021 17:36:27 -0500

On Thu, January 21, 2021 11:41 am, Lars Ingebrigtsen wrote:
> James Y Knight <[email-masked]> writes:
>
>> Hi, I recently just switched to from Emacs 21 to Emacs 22 (22.2.1, on
>> Debian Lenny), and was a bit disappointed to discover that vc-svn is
>> now automatically calling "svn resolved" on files when I save them
>> after removing conflict markers.
>
> (I'm going through old bug reports that unfortunately got no response at
> the time.)
>
> This behaviour still seems to be present in Emacs 28, as far as I can
> see.
>
>> I use svn's list of conflicted files while working on merges, and tend
>> to only call "resolved" on them when I'm *actually done* fixing a
>> group of files. I'll note that emacs automatically calling "svn
>> resolved" also destroys the .mine, .rOLD, and .rNEW files, which I
>> wasn't actually done with yet. Having them disappear out from under me
>> just because I've *partly* fixed things and saved is very
>> counterintuitive!
>
> I haven't used SVN myself in ages, and I don't even recall what my work
> flow used to be.  However, adding a variable to suppress
> `vc-svn-resolve-when-done' might make sense?  Anybody who actually uses
> SVN still got an opinion here?
>
> That this bug report is 11 years old and there doesn't seem to be any
> other bug reports about this does perhaps indicate that people are fine
> with how it works, and nothing should be done here.

I haven't used svn in years at this point, so I really don't care what
happens with vc-svn anymore. But I had personally long ago worked around
this bug with:
(defadvice vc-svn-resolve-when-done (around dont-svn-resolve activate)
  nil)

However, I will mention that I find the equivalent behavior in Emacs's Git
integration just as bad -- for the same reason of it discarding important
information! There's a reason that "git add" is a separate operation, and
having emacs silently run that when doing a "save" operation destroys
information, unexpectedly.

I really think this behavior should _never_ have been made default
behavior in _any_ VC mode. Discarding data is quite a bad default, and
extremely unexpected from "save". But, hey, at least vc-git can be
configured, so that's nice.

(And, I'll note that it took me at least a _year_ to figure out that the
broken behavior after resolving conflicts in Git was an emacs vc-git bug,
and not Git itself having lost the ability to 3-way-conflict-diff the
conflict resolution! It's incredibly non-obvious that emacs is breaking
this!)

I'm not the only one to complain about this, e.g.
https://emacs.stackexchange.com/questions/51206/disabling-automatic-add-after-resolving-git-conflict

For that matter, bug 20292 which added the emacs config option has
multiple complaints about this behavior, as well...