GNU bug report logs - #43464
28.0.50; vc: Error calling vc-revert for repo root

Previous Next

Package: emacs;

Reported by: Andrii Kolomoiets <andreyk.mad <at> gmail.com>

Date: Thu, 17 Sep 2020 07:30:02 UTC

Severity: normal

Tags: confirmed

Merged with 37310

Found in versions 27.0.50, 28.0.50

Done: Sean Whitton <spwhitton <at> spwhitton.name>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Andrii Kolomoiets <andreyk.mad <at> gmail.com>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: 43464 <at> debbugs.gnu.org
Subject: bug#43464: 28.0.50; vc: Error calling vc-revert for repo root
Date: Thu, 24 Sep 2020 10:15:21 +0300
Dmitry Gutov <dgutov <at> yandex.ru> writes:

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

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

Chances that the patch is completely wrong.  Perhaps `vc-backend` should
return correct backend for directory and the behavior of `vc-registered`
must be kept unchanged.

> 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




This bug report was last modified 144 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.