From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#39380: 26.3: Opening files in vc-dir-mode with differing root and working dir fails Date: Sat, 8 Feb 2020 04:20:26 +0300 Message-ID: References: <8eea69d2-46ed-0c41-b516-0120251dcc96@gmx.de> <504aedd0-54e5-aa62-b19f-41fbafa9aa17@gmx.de> <09ef5fcb-80b7-3b43-243a-2278b46281ba@yandex.ru> <5c7d9eab-59d1-21c1-c8e5-1c820cb2946b@gmx.de> <25183dd6-10b3-c3c4-0910-262c70434161@gmx.de> <0a8b11c8-1c5c-33ed-e5a1-e7ad5b090929@yandex.ru> <834kw2g1ur.fsf@gnu.org> <38ea415e-9993-806c-3006-85e6e435fbd5@yandex.ru> <83v9oiebu3.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="8578"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 Cc: 39380@debbugs.gnu.org, Wolfgang.Scherer@gmx.de To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Feb 08 02:21:18 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1j0EoA-00027Z-AW for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 08 Feb 2020 02:21:18 +0100 Original-Received: from localhost ([::1]:36860 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j0Eo9-0006UM-0i for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 07 Feb 2020 20:21:17 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48608) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j0Enw-0006Mi-9U for bug-gnu-emacs@gnu.org; Fri, 07 Feb 2020 20:21:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j0Enu-0003po-Pf for bug-gnu-emacs@gnu.org; Fri, 07 Feb 2020 20:21:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44529) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j0Enu-0003pV-M5 for bug-gnu-emacs@gnu.org; Fri, 07 Feb 2020 20:21:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1j0Enu-0008MM-FH for bug-gnu-emacs@gnu.org; Fri, 07 Feb 2020 20:21:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 08 Feb 2020 01:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39380 X-GNU-PR-Package: emacs Original-Received: via spool by 39380-submit@debbugs.gnu.org id=B39380.158112483632077 (code B ref 39380); Sat, 08 Feb 2020 01:21:02 +0000 Original-Received: (at 39380) by debbugs.gnu.org; 8 Feb 2020 01:20:36 +0000 Original-Received: from localhost ([127.0.0.1]:50502 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j0EnU-0008LI-4b for submit@debbugs.gnu.org; Fri, 07 Feb 2020 20:20:36 -0500 Original-Received: from mail-lj1-f180.google.com ([209.85.208.180]:45292) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j0EnS-0008L6-1N for 39380@debbugs.gnu.org; Fri, 07 Feb 2020 20:20:34 -0500 Original-Received: by mail-lj1-f180.google.com with SMTP id f25so1200236ljg.12 for <39380@debbugs.gnu.org>; Fri, 07 Feb 2020 17:20:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=WOHn+rIkEBxfKC4Q/Brk1IonDpehMREEWbGH9D8yo/k=; b=mP1wjbWldwgo3H2f+LPrOeD15NtyGl8JClwD/984NNbvqPqePahWDl3EhDyeBgdGch 8uqHW7E3ml1OoPIAcfmXDjdhw/Ozv4HPGRlE/291vFnT3TpM4liYDQdHXKhKoNrSDkkh zfUDy2BvOJuAe6RBA8lG+6ey0DMI+HAZlNyGUo3vQ+c46YIs5+fJv6g8oGCv4APe2Sw0 5AkyUs9DTwE7+iRan9Ws342Ig7BVniQSD45Ju9tnleItzwzZtUMM26CceT/V7m0By8Ih fDQGnOEaN+CTy92qtmFVC7+2707gUvHFTfQ7aONmPdlCcY6CRcVQwEA5NeeZXZdfUmJo k4mw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=WOHn+rIkEBxfKC4Q/Brk1IonDpehMREEWbGH9D8yo/k=; b=Ar0LAlRoGp3FnSZiS4whUcadC++jl1C+ewBXIQQ5CVskQ4f5y6lbx/u48ZdsGXJQ1I 8PN9/O79ouLRNxRQLuVNSEoFscrwrIvXlwPte5SSSOQamxH365RMQvJJwh6HvlDD6/fG 1DpFT/kjv/rOOl0mTSlby6yVUMA7MpJv2T2VqI8X6ag9hCzVVb0/e6sLfEMscz7FzsJA 6mlXF4k9qXknFZasiMvOtCO4xsptTqdI0+9JhueF12RevjwE55/OZvd38fBF1hxLy2JM /Hkkr7OQN4R+BgVB5vsHjyLiSpwnK5hzc9bYK9Q4VX2potgrhsn/fN+YIdMCd0vqvCz2 qXQw== X-Gm-Message-State: APjAAAWpLd7uOzj5DI54fRadPfqkrB18Pt7Lu7v++Z/tEfcscUCu3wru Qm+C9k02VDhOXlWb9ITt+bc= X-Google-Smtp-Source: APXvYqyh4NoSfOq8cABZvfqCmBKythh1zNth/9yvAp4NHUJxSBCL5KaiOb2xQ2VYFLWhADH9PkirMw== X-Received: by 2002:a2e:99da:: with SMTP id l26mr1117315ljj.272.1581124828020; Fri, 07 Feb 2020 17:20:28 -0800 (PST) Original-Received: from [192.168.1.142] ([178.252.127.239]) by smtp.googlemail.com with ESMTPSA id t1sm2094714lji.98.2020.02.07.17.20.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 07 Feb 2020 17:20:26 -0800 (PST) In-Reply-To: <83v9oiebu3.fsf@gnu.org> Content-Language: en-US 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: 209.51.188.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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:175767 Archived-At: On 07.02.2020 17:00, Eli Zaretskii wrote: >> Cc: 39380@debbugs.gnu.org, Wolfgang.Scherer@gmx.de >> From: Dmitry Gutov >> 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.