From unknown Wed Aug 20 00:02:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#33129: 26.1; `vc-hg-find-file-hook' can never detect files with conflicts 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: To: 33129@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.15403106928776 (code B ref -1); Tue, 23 Oct 2018 16:05:02 +0000 Received: (at submit) by debbugs.gnu.org; 23 Oct 2018 16:04:52 +0000 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 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 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 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,HTML_MESSAGE autolearn=disabled version=3.3.2 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 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 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 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 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) MIME-Version: 1.0 From: Daniel Pittman Date: Tue, 23 Oct 2018 12:03:36 -0400 Message-ID: Content-Type: multipart/alternative; boundary="0000000000004fedf60578e7851c" 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-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) --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-- From unknown Wed Aug 20 00:02:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#33129: Acknowledgement (26.1; `vc-hg-find-file-hook' can never detect files with conflicts) Resent-From: Daniel Pittman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 23 Oct 2018 16:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33129 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 33129@debbugs.gnu.org Received: via spool by 33129-submit@debbugs.gnu.org id=B33129.15403110809424 (code B ref 33129); Tue, 23 Oct 2018 16:12:02 +0000 Received: (at 33129) by debbugs.gnu.org; 23 Oct 2018 16:11:20 +0000 Received: from localhost ([127.0.0.1]:38411 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gEzH6-0002Rv-FD for submit@debbugs.gnu.org; Tue, 23 Oct 2018 12:11:20 -0400 Received: from mail-ot1-f42.google.com ([209.85.210.42]:35092) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gEzH4-0002Ri-17 for 33129@debbugs.gnu.org; Tue, 23 Oct 2018 12:11:18 -0400 Received: by mail-ot1-f42.google.com with SMTP id 14so1951836oth.2 for <33129@debbugs.gnu.org>; Tue, 23 Oct 2018 09:11:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=SfiD07BzHPH2M9JLlkYV+0lwakQdXJhTl+JQan/pSPw=; b=aR4hNo8IwAv1ySdlZa1lrfYxSMwZ7KaOVCij1AVu3ejc1t4KbQcwfX1rrzJXfiQ4lF RxJoH4kIgZywIymFZAwGg/+rLFkMFO7wq/vcvjjVDU5uCIKNC5uEMZn6ldQp5xXoT7Uq Y95vjIkxOZ7AoCa5nuvfqxUyEELRY74xt5zKEKtLFOG0hiV/QQ+sDOQs31e0jUxl0GMr QEfSxQTtkP/qGbmXtsa2J8dnYGHNXvwJtA2tdchflHvCCNttZ4Hdtlp1PJZsfid+Fvd5 CFhM4Rz9Rj3OtdGvoYB5EWk1MHW3QVo+WSNsCv6szIGXwVZdExnOYsa+CclyG14/mEM6 A2SA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=SfiD07BzHPH2M9JLlkYV+0lwakQdXJhTl+JQan/pSPw=; b=EG6py/3UZIxS510ZWp21C61LG+DspNuiTU+7qZtGAjt0BixV2yMrrTTqd8+eY+BF/Y 1zw5RJIK1kh94juizBAjmzNpXoDVdZJc7YSnPSNDueKVKjMiEU5RPDBrR06+h7zzjIHZ Ek6/u/JJN3bab7FBu8cXPX7n+SvD7g15LwvsuBd+Q64R7KPlAJLJ7X47vPtUCLY6GKm8 HxH7taB31R9kHJAK1ISkjmvZoZmJ6LAU5Oce3niOFp3Qek+GV+ZkWdkP3gib/Y/xW172 AtvsIEqZ5ZmvRzpbZePTIiSFnOLveP8Kkd7LzH+LX83QGDvfXWYWHSSMOvxXfqZAU5RY AlEw== X-Gm-Message-State: ABuFfog8pT2m/EnF3CQCy8MKOHWfvMsjcbGU6t/ObCT2exMTJG/UWI48 /pC8OurzxLwvaq24yKHizWDe8LNKIVf005nVbPefUnPCUqs= X-Google-Smtp-Source: ACcGV600Cx/f+RLfAAZJuunvpE7v1YAX0Yuf1B7RrMRGZVZYgtNDYirFZBSC3ze+E45EMP0oP/Z8MPQM8BeEuwkGZgM= X-Received: by 2002:a9d:5024:: with SMTP id a36mr31136263oth.195.1540311071777; Tue, 23 Oct 2018 09:11:11 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Daniel Pittman Date: Tue, 23 Oct 2018 12:10:35 -0400 Message-ID: Content-Type: multipart/mixed; boundary="00000000000047b3a50578e79e96" X-Spam-Score: -8.0 (--------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -9.0 (---------) --00000000000047b3a50578e79e96 Content-Type: multipart/alternative; boundary="00000000000047b3a20578e79e94" --00000000000047b3a20578e79e94 Content-Type: text/plain; charset="UTF-8" Please find attached a patch fixing both the issues identified in this bug: --00000000000047b3a20578e79e94 Content-Type: text/html; charset="UTF-8"
Please find attached a patch fixing both the issues identified in this bug:

--00000000000047b3a20578e79e94-- --00000000000047b3a50578e79e96 Content-Type: application/octet-stream; name="0001-Fix-interaction-between-vc-hg-find-file-hook-and-vc-.patch" Content-Disposition: attachment; filename="0001-Fix-interaction-between-vc-hg-find-file-hook-and-vc-.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_jnlxf47l0 RnJvbSBhZGU2MzdmYjg5NDYzM2ZkZmMxZWE2YmE1NGU0YjMxZDI2ZWMwMjhlIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBEYW5pZWwgUGl0dG1hbiA8c2xpcHB5Y2hlZXplQGdvb2dsZS5j b20+CkRhdGU6IFR1ZSwgMjMgT2N0IDIwMTggMTE6MjQ6MDQgLTA0MDAKU3ViamVjdDogW1BBVENI XSBGaXggaW50ZXJhY3Rpb24gYmV0d2VlbiB2Yy1oZyBmaW5kLWZpbGUtaG9vayBhbmQgdmMgc3Rh dGUKIGNhY2hpbmcKCkJhZCBhc3N1bXB0aW9ucyBpbiB0aGUgYHZjLWhnLWZpbmQtZmlsZS1ob29r JyBwcmV2ZW50ZWQgaXQgZnJvbQp3b3JraW5nLiBUaGlzIGNvcnJlY3RseSB0aGVtLiAgKEJ1ZyMz MzEyOSkuCgoyMDE4LTEwLTIzICBEYW5pZWwgUGl0dG1hbiAgPHNsaXBweWNoZWV6ZUBnb29nbGUu Y29tPgoKCSogbGlzcC92Yy92Yy1oZy5lbCAodmMtaGctZmluZC1maWxlLWhvb2spOiBUaGlzIGZ1 bmN0aW9uIG1hZGUgdHdvCglhc3N1bXB0aW9ucyBhYm91dCBjb25mbGljdGVkIGZpbGVzIHRoYXQg d2VyZSBub3QgYWNjdXJhdGUsCglwcmV2ZW50aW5nIGNvbmZsaWN0cyBpbiBmaWxlcyBldmVyIGJl aW5nIGRldGVjdGVkLgoKCVRoZSBmaXJzdCB3YXMgdGhhdCB0aGUgYHZjLXN0YXRlJyB3YXMgY2Fj aGUgYnkgdGhlIHRpbWUgdGhpcyB3YXMKCWludm9rZWQsIHdoaWNoIGl0IGlzIG5vdCAtIGF0IGxl YX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hdHVzLCBlZwogICAgICAgICAgICAgIDs7IGhnIGh0dHA6Ly9iei5zZWxlbmljLmNvbS9z aG93X2J1Zy5jZ2k/aWQ9MjcyNAotICAgICAgICAgICAgIChtZW1xICh2Yy1maWxlLWdldHByb3Ag YnVmZmVyLWZpbGUtbmFtZSAndmMtc3RhdGUpCi0gICAgICAgICAgICAgICAgICAgJyhlZGl0ZWQg Y29uZmxpY3QpKQorICAgICAgICAgICAgIChtZW1xICh2Yy1zdGF0ZSBidWZmZXItZmlsZS1uYW1l KSAnKGVkaXRlZCBjb25mbGljdCkpCiAgICAgICAgICAgICAgOzsgTWF5YmUgZ28gb24gdG8gY2hl Y2sgdGhhdCAiaGcgcmVzb2x2ZSAtbCIgc2F5cyAiVSI/CiAgICAgICAgICAgICAgOzsgSWYgImhn IHJlc29sdmUgLWwiIHNheXMgdGhlcmUncyBhIGNvbmZsaWN0IGJ1dCB0aGVyZSBhcmUgbm8KICAg ICAgICAgICAgICA7OyBjb25mbGljdCBtYXJrZXJzLCBpdCdzIG5vdCBjbGVhciB3aGF0IHdlIHNo b3VsZCBkby4KLS0gCjIuMTkuMQoK --00000000000047b3a50578e79e96-- From unknown Wed Aug 20 00:02:33 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Daniel Pittman Subject: bug#33129: closed (Re: bug#33129: Acknowledgement (26.1; `vc-hg-find-file-hook' can never detect files with conflicts)) Message-ID: References: <83in1eften.fsf@gnu.org> X-Gnu-PR-Message: they-closed 33129 X-Gnu-PR-Package: emacs Reply-To: 33129@debbugs.gnu.org Date: Sat, 03 Nov 2018 08:39:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1541234342-27083-1" This is a multi-part message in MIME format... ------------=_1541234342-27083-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #33129: 26.1; `vc-hg-find-file-hook' can never detect files with conflicts which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 33129@debbugs.gnu.org. --=20 33129: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D33129 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1541234342-27083-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 33129-done) by debbugs.gnu.org; 3 Nov 2018 08:38:15 +0000 Received: from localhost ([127.0.0.1]:60571 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gIrRf-00071j-2L for submit@debbugs.gnu.org; Sat, 03 Nov 2018 04:38:15 -0400 Received: from eggs.gnu.org ([208.118.235.92]:50502) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gIrRd-00071W-AO for 33129-done@debbugs.gnu.org; Sat, 03 Nov 2018 04:38:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gIrRS-0004Am-Ea for 33129-done@debbugs.gnu.org; Sat, 03 Nov 2018 04:38:07 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:35163) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gIrRS-0004Ai-At; Sat, 03 Nov 2018 04:38:02 -0400 Received: from [176.228.60.248] (port=1712 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1gIrRR-0008Um-U6; Sat, 03 Nov 2018 04:38:02 -0400 Date: Sat, 03 Nov 2018 10:37:52 +0200 Message-Id: <83in1eften.fsf@gnu.org> From: Eli Zaretskii To: Daniel Pittman In-reply-to: (message from Daniel Pittman on Tue, 23 Oct 2018 12:10:35 -0400) Subject: Re: bug#33129: Acknowledgement (26.1; `vc-hg-find-file-hook' can never detect files with conflicts) References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 33129-done Cc: 33129-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) > From: Daniel Pittman > Date: Tue, 23 Oct 2018 12:10:35 -0400 > > Please find attached a patch fixing both the issues identified in this bug: Thanks, pushed to the master branch. ------------=_1541234342-27083-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 23 Oct 2018 16:04:52 +0000 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 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 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 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,HTML_MESSAGE autolearn=disabled version=3.3.2 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 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 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 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 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) MIME-Version: 1.0 From: Daniel Pittman Date: Tue, 23 Oct 2018 12:03:36 -0400 Message-ID: Subject: 26.1; `vc-hg-find-file-hook' can never detect files with conflicts To: bug-gnu-emacs@gnu.org Content-Type: multipart/alternative; boundary="0000000000004fedf60578e7851c" 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-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) --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-- ------------=_1541234342-27083-1--