GNU bug report logs - #33129
26.1; `vc-hg-find-file-hook' can never detect files with conflicts

Previous Next

Package: emacs;

Reported by: Daniel Pittman <slippycheeze <at> google.com>

Date: Tue, 23 Oct 2018 16:05:02 UTC

Severity: normal

Found in version 26.1

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 33129 in the body.
You can then email your comments to 33129 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#33129; Package emacs. (Tue, 23 Oct 2018 16:05:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Daniel Pittman <slippycheeze <at> google.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 23 Oct 2018 16:05:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Daniel Pittman <slippycheeze <at> google.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 26.1; `vc-hg-find-file-hook' can never detect files with conflicts
Date: Tue, 23 Oct 2018 12:03:36 -0400
[Message part 1 (text/plain, inline)]
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.
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#33129; Package emacs. (Tue, 23 Oct 2018 16:12:02 GMT) Full text and rfc822 format available.

Message #8 received at 33129 <at> debbugs.gnu.org (full text, mbox):

From: Daniel Pittman <slippycheeze <at> google.com>
To: 33129 <at> debbugs.gnu.org
Subject: Re: bug#33129: Acknowledgement (26.1; `vc-hg-find-file-hook' can
 never detect files with conflicts)
Date: Tue, 23 Oct 2018 12:10:35 -0400
[Message part 1 (text/plain, inline)]
Please find attached a patch fixing both the issues identified in this bug:
[Message part 2 (text/html, inline)]
[0001-Fix-interaction-between-vc-hg-find-file-hook-and-vc-.patch (application/octet-stream, attachment)]

Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Sat, 03 Nov 2018 08:39:02 GMT) Full text and rfc822 format available.

Notification sent to Daniel Pittman <slippycheeze <at> google.com>:
bug acknowledged by developer. (Sat, 03 Nov 2018 08:39:02 GMT) Full text and rfc822 format available.

Message #13 received at 33129-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Daniel Pittman <slippycheeze <at> google.com>
Cc: 33129-done <at> debbugs.gnu.org
Subject: Re: bug#33129: Acknowledgement (26.1;
 `vc-hg-find-file-hook' can never detect files with conflicts)
Date: Sat, 03 Nov 2018 10:37:52 +0200
> From: Daniel Pittman <slippycheeze <at> google.com>
> 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.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 01 Dec 2018 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 6 years and 263 days ago.

Previous Next


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