GNU bug report logs -
#39380
26.3: Opening files in vc-dir-mode with differing root and working dir fails
Previous Next
Reported by: Wolfgang Scherer <Wolfgang.Scherer <at> gmx.de>
Date: Sat, 1 Feb 2020 00:14:01 UTC
Severity: normal
Found in version 26.3
Fixed in version 27.1
Done: Dmitry Gutov <dgutov <at> yandex.ru>
Bug is archived. No further changes may be made.
Full log
Message #41 received at 39380 <at> debbugs.gnu.org (full text, mbox):
On 07.02.2020 17:00, Eli Zaretskii wrote:
>> Cc: 39380 <at> debbugs.gnu.org, Wolfgang.Scherer <at> gmx.de
>> From: Dmitry Gutov <dgutov <at> yandex.ru>
>> Date: Fri, 7 Feb 2020 14:03:21 +0300
>>
>> On 07.02.2020 12:53, Eli Zaretskii wrote:
>>> I'll have to ask you to walk me through the change and explain how it
>>> solves the original issue.
>>
>> There are two changes:
>>
>> 1. Having the returned file names relative to the working dir instead of
>> the repository root. For that, we change 'hg status' to 'hg status re:'.
>
> Why do we want the file names to be relative? If default-directory of
> the buffer is set correctly, that shouldn't be necessary, and if the
> file names are absolute, then the default-directory doesn't even
> matter much.
They are already relative, but against the repository root.
And people want to open vc-dir buffers in any directory, not just in
repository roots.
We could force the file names to be absolute, and then pipe them through
file-relative-name, but that's just extra work.
>> 2. Only including the files inside the working dir in the output. That
>> happens by adding '-I .' to the arguments. Otherwise, Mercurial adds, in
>> the presented scenario, an entry like '../sub2/x', which is extraneous.
>
> This change should be in NEWS, IMO.
It's a bugfix for an older, unintended change. It's not a new behavior.
>>> the Mercurial documentation I've read seems
>>> to contradict what you are doing (e.g., it says "re:" should be
>>> immediately followed by a regexp).
>>
>> You can search the manual for "hg status re:".
>
> Which only finds a single example, where this notation is not
> explained at all (and which I already saw).
Not my fault.
>> I agree it's a bit unclear (it also mentions "hg help patterns" for some
>> reason), but here's an SO answer that got me this far:
>> https://stackoverflow.com/a/46743585/615245
>
> Isn't it disturbing that we are using a feature that doesn't seem to
> be documented?
It's been there for enough years, and it's the best choice I've found so
far.
> But to get to the issue at hand: you are saying that "C-x v d" in a
> subdirectory of the root of a Mercurial repository became broken in
> Emacs 25.1?
>
> Also, is DIR guaranteed to be the directory where FILES live?
Yes, see the description of dir-status-files in the top commentary in vc.el.
This bug report was last modified 5 years and 96 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.