From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andrii Kolomoiets Newsgroups: gmane.emacs.bugs Subject: bug#43464: 28.0.50; vc: Error calling vc-revert for repo root Date: Thu, 24 Sep 2020 10:15:21 +0300 Message-ID: References: <0b1c72d0-f8fb-a256-1563-1c43296c8edb@yandex.ru> <11761d79-1893-fdf3-843d-bea4a026fc7f@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34211"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (darwin) Cc: 43464@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Sep 24 09:16:11 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kLLUA-0008nm-C1 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 24 Sep 2020 09:16:10 +0200 Original-Received: from localhost ([::1]:44380 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kLLU9-00047P-Dw for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 24 Sep 2020 03:16:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37574) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kLLU2-00047F-CD for bug-gnu-emacs@gnu.org; Thu, 24 Sep 2020 03:16:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55198) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kLLU2-0006vO-2U for bug-gnu-emacs@gnu.org; Thu, 24 Sep 2020 03:16:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kLLU1-0005cA-Tn for bug-gnu-emacs@gnu.org; Thu, 24 Sep 2020 03:16:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Andrii Kolomoiets Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 24 Sep 2020 07:16:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43464 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed Original-Received: via spool by 43464-submit@debbugs.gnu.org id=B43464.160093173321548 (code B ref 43464); Thu, 24 Sep 2020 07:16:01 +0000 Original-Received: (at 43464) by debbugs.gnu.org; 24 Sep 2020 07:15:33 +0000 Original-Received: from localhost ([127.0.0.1]:38511 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kLLTY-0005bU-Qy for submit@debbugs.gnu.org; Thu, 24 Sep 2020 03:15:33 -0400 Original-Received: from mail-lf1-f45.google.com ([209.85.167.45]:41945) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kLLTV-0005bC-QX for 43464@debbugs.gnu.org; Thu, 24 Sep 2020 03:15:31 -0400 Original-Received: by mail-lf1-f45.google.com with SMTP id y17so2703206lfa.8 for <43464@debbugs.gnu.org>; Thu, 24 Sep 2020 00:15:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=rOi2ZzvehkYUxKcd1z9+OxUJP6pMj6G9VNfGODpNF+s=; b=BzJ7xmRw1sokWT5kefPa9TztNUcLHHtkz5QJxjIGWBJvQP61iK7aCDLa4MLbNmsnbc HEbKVwu0yBiRFseotuaEz25Y7UpaD/f38CbycneTP25Clr3cLotrSgsbEWALLNS5yoIV /5+sFHafdsEQZzLTZiUlzJ9e4qOV5aIWwQEr2xU3Hh23bVpe3gDNbwhotF1Mu8XrFUmM v2LJMF4MlDWo8B0O0M4Ykx8LQQ6FxO9S125hAC+tnU09T7XIbgXZfAQCf9wb1OTaRbMW 4kJFpPFxG6DMaXmpqaLx4nwZRYHp9uiiYZAtst+r/2WDGNxZFfuXV5/7Zcr616Ng88k5 gq4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=rOi2ZzvehkYUxKcd1z9+OxUJP6pMj6G9VNfGODpNF+s=; b=Kl6JbAzo0FnG/1INdBBi/7Wqh+keWWnFPpoOqJOGHhitNLq5CFWUFTB8nnreL8AzRo bgJoFQA2imCiZVwzxMF8bCGYCy8N+b7hh12BH+S5Wxq4ROKQM+uKs3MvtTv7h9UVZQD3 u6vrF65bs1XyZymI+ZBJVQ4vs2N+W7qeS1FwDJkXPNM2DFTNa0b/huqXXH0myMu9Aosb wNDZ9oJC/JFAl1V7la5IcOMp92MMLxNaftizsBUWsc/C44OP5PecLHzItlossVIuiYlc X0jX7wC90+9UOF6eQuNZk/wmuqxj3iG1Nor1cZkj82yFsl/y+VjHw2+Qtt/5QK7VtiHg Gx7A== X-Gm-Message-State: AOAM531QNoOz6ld2HgZTR2kvGUKjojiYkycNYrNxtmuBDMv1DezDDQhy hqnLBUAIc1GeoVsi3wnOM17gdc5YF6Y= X-Google-Smtp-Source: ABdhPJzj/NnCzdUuEanu13qUWFuiiniaoDhE1NbZNqAZD0Hoh91VFTqEReztlDWMdeCtubIkldN43A== X-Received: by 2002:ac2:5333:: with SMTP id f19mr1283199lfh.339.1600931723313; Thu, 24 Sep 2020 00:15:23 -0700 (PDT) Original-Received: from muffinmac ([91.206.110.141]) by smtp.gmail.com with ESMTPSA id n2sm835429lji.97.2020.09.24.00.15.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Sep 2020 00:15:22 -0700 (PDT) In-Reply-To: <11761d79-1893-fdf3-843d-bea4a026fc7f@yandex.ru> (Dmitry Gutov's message of "Tue, 22 Sep 2020 22:48:32 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:188842 Archived-At: Dmitry Gutov 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