From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Daniel Pittman Newsgroups: gmane.emacs.bugs Subject: bug#33129: 26.1; `vc-hg-find-file-hook' can never detect files with conflicts Date: Tue, 23 Oct 2018 12:03:36 -0400 Message-ID: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000004fedf60578e7851c" X-Trace: blaine.gmane.org 1540310641 5374 195.159.176.226 (23 Oct 2018 16:04:01 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 23 Oct 2018 16:04:01 +0000 (UTC) To: 33129@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Oct 23 18:03:57 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gEz9w-0001HS-E6 for geb-bug-gnu-emacs@m.gmane.org; Tue, 23 Oct 2018 18:03:56 +0200 Original-Received: from localhost ([::1]:42960 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gEzC2-0001vl-Rm for geb-bug-gnu-emacs@m.gmane.org; Tue, 23 Oct 2018 12:06:06 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48468) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gEzB4-000115-E7 for bug-gnu-emacs@gnu.org; Tue, 23 Oct 2018 12:05:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gEzB2-0003CK-Be for bug-gnu-emacs@gnu.org; Tue, 23 Oct 2018 12:05:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:34145) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gEzB0-0003BF-LF for bug-gnu-emacs@gnu.org; Tue, 23 Oct 2018 12:05:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gEzB0-0002Hx-DS for bug-gnu-emacs@gnu.org; Tue, 23 Oct 2018 12:05:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Daniel Pittman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 23 Oct 2018 16:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 33129 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.15403106928776 (code B ref -1); Tue, 23 Oct 2018 16:05:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 23 Oct 2018 16:04:52 +0000 Original-Received: from localhost ([127.0.0.1]:38403 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gEzAp-0002HT-ML for submit@debbugs.gnu.org; Tue, 23 Oct 2018 12:04:51 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:38631) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gEzAo-0002HF-6b for submit@debbugs.gnu.org; Tue, 23 Oct 2018 12:04:50 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gEzAf-0002vU-GR for submit@debbugs.gnu.org; Tue, 23 Oct 2018 12:04:43 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:52928) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gEzAX-0002rF-8y for submit@debbugs.gnu.org; Tue, 23 Oct 2018 12:04:35 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48124) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gEzAW-0000UM-3D for bug-gnu-emacs@gnu.org; Tue, 23 Oct 2018 12:04:33 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gEzAN-0002lY-8e for bug-gnu-emacs@gnu.org; Tue, 23 Oct 2018 12:04:28 -0400 Original-Received: from mail-oi1-x22e.google.com ([2607:f8b0:4864:20::22e]:44067) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gEzAL-0002d1-Ln for bug-gnu-emacs@gnu.org; Tue, 23 Oct 2018 12:04:22 -0400 Original-Received: by mail-oi1-x22e.google.com with SMTP id u74-v6so1539005oia.11 for ; Tue, 23 Oct 2018 09:04:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=ARgU5krGDw594Rei7WWdmAsdYaqxowQesGC9Jl8FekY=; b=tS06sQ/DSGG1mu4zlfqU11TZ/pVAaIZdZwrA5hA8dxeYcA7oeZiISo3sJM1fl8vJuY Rr/4hebKXz+A7SZcrN0Rrfl7R69SIJQMZFRf2MYb5C5rYLn3txxpvH9ogddqsT5fPpgC ROzQVoN/4VJjKupTq0Y4EJKp9391TB7kkkjjPhgpI00bXKB+o024TizYt9bNvfKM7HG3 cqgllb28dMTvFM2vXLzcpuYhmc3KKHOYZUGW0+DZmoV2nTUtFb+tglVYUQOsOVj25X0O 5LH0bbdhJBMs9lsjjK96eWN/T1tmSFdO+ko6fvs0zHlvUa9eWUCyQXSQHmNwbMHBlvLu I69Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=ARgU5krGDw594Rei7WWdmAsdYaqxowQesGC9Jl8FekY=; b=i0JKq1kqcXRvB2nFzEwMNQKN3KjusdMMqzILRxrLUhx4bRq4AH0BnMk1IFPyfgtSdZ SSX/37J/z5IW7ReFKo302/W0wa0zrkZzmzuKFcPUSmZSVbBI4yL2DodR4h0a9DHLUsZX U5s64eeuh4nJeZxmp+Jb93VAzZoT9jEStZehy8lMVvK2PAd8LGeEioe6cAuG3DuUoj7Q VRvIv+dmjT/8PODJOsKiWtHC3Rxiy4kPpYVi69lWm6moxKFhRori+7XSSScn9SumvM6t iuc/dw1rs5ztL/otrBDcqFDqIMwHbrKHaVcAn7uCTDhx061gpRnqJLO4zvqrhEWHAwI5 PyDw== X-Gm-Message-State: ABuFfojm8H32WIVXldoggR/XFKScl64NYRZIfuvl+TfWG0sy4+pmgtVP y3XhFF8vXc10lEgpqyg5g0+Hh1UoJDfxLbttd+YLOSt6+Ho= X-Google-Smtp-Source: ACcGV61iEWbkdzASIkXRWhSvdfST707Y9vDeUBOGtO6Hp0dwcWWGInGBanpiOoTasLqYllEiBBJ472KnPgZyXwpBVS4= X-Received: by 2002:aca:b04:: with SMTP id 4-v6mr27361984oil.192.1540310652903; Tue, 23 Oct 2018 09:04:12 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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" Xref: news.gmane.org gmane.emacs.bugs:151521 Archived-At: --0000000000004fedf60578e7851c Content-Type: text/plain; charset="UTF-8" The `vc-hg-find-file-hook' tries to automatically invoke `smerge-mode' when a file with conflicts is visited. Unfortunately, due to incorrect assumptions, it rarely -- possibly never -- actually manages to detect the files. There are two incorrect assumptions in the code that prevent this: First, that `vc-state' will already be cached by the backend, which is not true in at least the cases of visiting the file, reverting the file, or using `vc-refresh-state'. It is certainly possible that in some case or other the hook works, this assumption means that it is almost never going to behave as intended. Second, it assumes that a ".orig" backup file is created by Mercurial next to the current file, which is only true by default: these files can be redirected to an alternate path, or disabled entirely, by the user. This is especially common when working on a network file-system, since additional file operations can slow down the Mercurial merge process, or when users have some other mechanism to handle the failure case. --0000000000004fedf60578e7851c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
The `vc-hg-find-file-hook' tries to automatically invo= ke `smerge-mode'
when a file with conflicts is visited.=C2=A0 Unfort= unately, due to incorrect
assumptions, it rarely -- possibly never -- ac= tually manages to detect
the files.

There are two incorrect assum= ptions in the code that prevent this:

First, that `vc-state' wil= l already be cached by the backend, which is
not true in at least the ca= ses of visiting the file, reverting the file,
or using `vc-refresh-state= '.

It is certainly possible that in some case or other the hook = works, this
assumption means that it is almost never going to behave as = intended.

Second, it assumes that a ".orig" backup file is= created by Mercurial
next to the current file, which is only true by de= fault: these files can
be redirected to an alternate path, or disabled e= ntirely, by the user.

This is especially common when working on a ne= twork file-system, since
additional file operations can slow down the Me= rcurial merge process, or
when users have some other mechanism to handle= the failure case.
--0000000000004fedf60578e7851c--