unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dgutov@yandex.ru>
To: Andrii Kolomoiets <andreyk.mad@gmail.com>
Cc: 43464@debbugs.gnu.org
Subject: bug#43464: 28.0.50; vc: Error calling vc-revert for repo root
Date: Mon, 5 Oct 2020 01:32:10 +0300	[thread overview]
Message-ID: <7b4d0bcf-c622-b2db-34d6-e587fe516f8d@yandex.ru> (raw)
In-Reply-To: <m28sczwsqe.fsf@gmail.com>

On 24.09.2020 10:15, Andrii Kolomoiets wrote:

>> On 18.09.2020 18:45, Andrii Kolomoiets wrote:
>>> BTW vc-revert is also works fine in Git repo when point is on
>>> subdirectory.  So for the vc-git only reverting repo root is not
>>> working.
>>
>> That's an interesting observation.
> 
> And the most interest part of that observation is that I can't reproduce
> it :)

Oh well. :-)

>>> Please see attached patch which make it possible for vc-hg to revert
>>> directory.
>>
>> Could you explain both changes in that patch?
> 
> The idea is to make the 'vc-backend' function to return backend for
> directory.  'vc-backend' function uses the 'vc-registered' function.
> The change for vc-hg.el makes 'vc-hg-registered' return t for directory.
> The change to vc.el makes the 'vc-register' function called on directory
> to not error with "already registered" message.

Thanks.

Where is that vc-backend called from, in our scenario?

Could we make do with changing that code to use vc-responsible-backend 
instead of vc-backend instead? If it's not a function called frequently.

I'm not 100% sure about the original design, but vc-responsible-backend 
*does* work on directories.

Its downside is it doesn't cache the result to VC properties (hence it 
would be unwise to use it everywhere). But it's also an upside, because 
said properties are invalidated in a few strategic places like 
find-file-hook, and that never happens for directories (hence that cache 
will tend to get out of date, sooner or later).

>> And also: how does it change, or not change, the behavior of vc-revert
>> in backends that are not Git or Hg?
> 
> Looks like everybody is ready for reverting dirs.
> 
> bzr, mtn, svn - Should be fine reverting directory
> dav - do nothing on vc-revert
> rcs - reverting directory is added in c22b0a7da32360e34f6f0ff86a886c9028b3d863
> sccs - reverting directory is added in e7290559824406d111d306069b36dde8ced847f9
> src - reverting directory is supported initially 1e81f6769013e1a0df9e10d7c5d0a3e3ca131143
> cvs - passing directory to 'unedit' command should be fine

Very good.





  parent reply	other threads:[~2020-10-04 22:32 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-17  7:29 bug#43464: 28.0.50; vc: Error calling vc-revert for repo root Andrii Kolomoiets
2020-09-17 16:10 ` Lars Ingebrigtsen
2020-09-18  9:00 ` Dmitry Gutov
2020-09-18  9:30   ` Andrii Kolomoiets
2020-09-18 13:30     ` Dmitry Gutov
2020-09-18 15:45       ` Andrii Kolomoiets
2020-09-22 19:48         ` Dmitry Gutov
2020-09-24  7:15           ` Andrii Kolomoiets
2020-09-30  9:13             ` Andrii Kolomoiets
2020-10-04 22:32             ` Dmitry Gutov [this message]
2020-10-05  6:02               ` Andrii Kolomoiets
2020-10-05 10:19                 ` Dmitry Gutov
2020-10-07 13:16                   ` Andrii Kolomoiets
2020-10-07 22:47                     ` Dmitry Gutov
2020-10-11 20:28                       ` Andrii Kolomoiets
2020-10-13 11:59                         ` Dmitry Gutov
2020-09-18 13:18   ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7b4d0bcf-c622-b2db-34d6-e587fe516f8d@yandex.ru \
    --to=dgutov@yandex.ru \
    --cc=43464@debbugs.gnu.org \
    --cc=andreyk.mad@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).