From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ben Gamari Newsgroups: gmane.emacs.bugs Subject: bug#21559: 25.0.50; auto-revert-mode breaks git rebase Date: Mon, 28 Sep 2015 16:11:16 +0200 Message-ID: <87612uzla3.fsf@smart-cactus.org> References: <87wpvebraz.fsf@smart-cactus.org> <83mvw9hbks.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Trace: ger.gmane.org 1443471158 32040 80.91.229.3 (28 Sep 2015 20:12:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 28 Sep 2015 20:12:38 +0000 (UTC) Cc: 21559@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Sep 28 22:12:23 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Zgema-0002Ki-Mb for geb-bug-gnu-emacs@m.gmane.org; Mon, 28 Sep 2015 22:12:20 +0200 Original-Received: from localhost ([::1]:40624 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZgemV-0007E2-10 for geb-bug-gnu-emacs@m.gmane.org; Mon, 28 Sep 2015 16:12:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58246) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZgZ9y-0000SP-Hk for bug-gnu-emacs@gnu.org; Mon, 28 Sep 2015 10:12:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZgZ9v-0003LR-Aw for bug-gnu-emacs@gnu.org; Mon, 28 Sep 2015 10:12:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:57825) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZgZ9v-0003LL-6Z for bug-gnu-emacs@gnu.org; Mon, 28 Sep 2015 10:12:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZgZ9u-0008Hf-FI for bug-gnu-emacs@gnu.org; Mon, 28 Sep 2015 10:12:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ben Gamari Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 28 Sep 2015 14:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21559 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 21559-submit@debbugs.gnu.org id=B21559.144344949531808 (code B ref 21559); Mon, 28 Sep 2015 14:12:02 +0000 Original-Received: (at 21559) by debbugs.gnu.org; 28 Sep 2015 14:11:35 +0000 Original-Received: from localhost ([127.0.0.1]:46796 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZgZ9S-0008Gx-FA for submit@debbugs.gnu.org; Mon, 28 Sep 2015 10:11:34 -0400 Original-Received: from mail.smart-cactus.org ([54.187.36.80]:40880) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZgZ9P-0008Go-8l for 21559@debbugs.gnu.org; Mon, 28 Sep 2015 10:11:32 -0400 Original-Received: from localhost.localdomain (HSI-KBW-109-193-204-037.hsi7.kabel-badenwuerttemberg.de [109.193.204.37]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: ben@smart-cactus.org) by mail.smart-cactus.org (Postfix) with ESMTPSA id E813D74CFA; Mon, 28 Sep 2015 14:00:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mail.smart-cactus.org; s=mail; t=1443448830; bh=0Jx5+ZfSpWrXmvGzxINmxt1PIg7P3IOWc2zWLHaC1J0=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=Ci3ESV39j6IAoI5Fc6B7qZB1WgskCqnP5oT6Z2vQi4yljUr8qnFuDVLH1JTWX6FSk chW2JOQTEUgXnT5Z/6KupqSPX9o3JRzNyK4OeEPu3kFKjHBbCTkP/8JBvJQ9H6RBH4 8IFsdv8Z265tyNKmmG/65lbK4M5XPjxfH++A3HMI= In-Reply-To: <83mvw9hbks.fsf@gnu.org> User-Agent: Notmuch/0.20.2+73~gd432116 (http://notmuchmail.org) Emacs/25.0.50.1 (x86_64-pc-linux-gnu) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:107010 Archived-At: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Eli Zaretskii writes: >> From: Ben Gamari >> Date: Fri, 25 Sep 2015 14:45:56 +0200 >>=20 >> One imperfect workaround would be to instead schedule a worker to call >> `vc-fine-file-hook` at some point in the future when the repository is >> more likely to be idle (for instance, when there have been no change >> events for a second or so). > > But autorevert already does exactly that: it doesn't act on file > changes immediately, only once every N seconds. N defaults to 5, > perhaps you could try customizing auto-revert-interval to a larger > value to see if that solves the problem. > This is not true is auto-revert-use-notify is enabled. If I'm not mistaken, your suggestion amounts to increasing the poll interval. This will never solve the problem, it will only mean that the race has fewer opportunities to pop up. Of course, the same can be said of my suggestion, which only narrows the race window, not remove it altogether (which is sadly not possible without fixing git rebase). As an aside, it came as quite a surprise that autorevert (if I understand the code correctly) still polls even if auto-revert-use-notify is set. It seems to me that this is itself a bug. As a laptop user who often works on battery, I keep tabs on which processes eat CPU time and I have noticed that emacs is consistently behind only firefox and Xorg in CPU time demanded at idle. > In any case, the issue here is that Emacs doesn't know when "the > repository is idle". If someone can suggest how to tell that, > autorevert could be augmented not to revert VC files while the > repository is "busy". From your description I understand that just > looking at index.lock is not good enough, since Git releases it more > than once in this scenario, while the rebase operation is still > on-going. > Right. I threw together a patch [1] implementing the suggestion I presented above. I have yet to rigorously test it but I have yet to experience the issue since starting to use it. > Btw, what is your value of auto-revert-check-vc-info? If it's > non-nil, perhaps resetting it to nil will also avoid these problems. It is nil but this doesn't matter as vc-find-file-hook is called if either auto-revert-check-vc-info or the revert flag are set. Cheers, =2D Ben [1] https://github.com/bgamari/emacs/compare/master...auto-revert-vc-idle --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJWCUqEAAoJEHPt6ejPuu8BjmcH/itu1+tEqHE2VuxGasJ+4Ajw kl9z/VMvZYoHDr3Kam10YlJusBalXuh3zp9gLl+KEBb4nTZ3BFRkOMVa7M3sHT6B m8KbhtvgL9Rb88LlB6o7rfsRP+jDnrvOy6gy4krFQbmEfe7sO/IOTLR8gCzJCa9G 9KBptMm9F7RJaMcQBm+W3VpSI7fR1Nvq5Y3LcZ1cmfLaL8NCh/WrGG+HeSiRs3iS fyOVZIbE3jaRyQFXq1PbxdGzkSEtBNWkg0A8rEwcATA5XGLTYEzDgXRp7mH/HLsj Mjk18WjrjAE9lXEsqp9zobGljOVd1Ltm13TJnsxM5DWM8gd7pQ1lNJTu9RfqEZQ= =oXeF -----END PGP SIGNATURE----- --=-=-=--