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

From: Mauro Aranda <[email-masked]>
Date: Sat, 29 Mar 2025 11:41:00 -0300

On 29/3/25 10:42, Eli Zaretskii wrote:
 >> Date: Mon, 17 Mar 2025 06:57:54 -0300
 >> From: Mauro Aranda <[email-masked]>
 >> Cc: [email-masked], [email-masked], [email-masked], 
[email-masked],
 >>  [email-masked]
 >>
 >> On 15/3/25 09:13, Eli Zaretskii wrote:
 >>  >> Date: Thu, 13 Mar 2025 12:11:21 -0300
 >>  >> Cc: [email-masked], [email-masked], [email-masked],
 >> [email-masked],
 >>  >>  [email-masked]
 >>  >> From: Mauro Aranda <[email-masked]>
 >>  >>
 >>  >> Thanks.  Revised patch attached.
 >>  >
 >>  > Thanks, this LGTM.
 >>
 >> Thanks.  Installed on master, and closing the bug.
 >
 > I've just been bitten by this change.  Its effect is that any package
 > that loads or 'require's vc-SOMETHING, without also loading 'vc', will
 > likely signal an error:
 >
 >   void variable vc-resolve-conflicts
 >
 > In my case, the victim was admin/gitmerge.el, which only loads
 > vc-git.el,

Ouch.  I mistakenly thought that this could work like the vc-*-switches
options, but now I see that, for example, vc-git.el autoloads
vc-switches.

 > The various vc-FOO.el files only 'require' vc when compiling, which
 > doesn't solve the run-time problem.
 >
 > So we will need either to make vc-resolve-conflicts autoloaded (which
 > is generally discouraged for defcustom's), or manually 'require' vc in
 > the various functions that reference vc-resolve-conflicts.
 >
 > Are there any other solutions?

I don't know.  Can the defcustom be moved to another file where there
are "generic" vc options, and that it gets loaded at run-time? I see
some options in vc-hooks.el, but I don't know if (featurep 'vc-hooks)
evaluates to t in the case you encountered.