From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#23436: [PATCH] Attemp to use the true name of a file to determine responsible vc if the genuine name does not work. Date: Thu, 20 Oct 2016 09:58:13 +0300 Message-ID: <837f93v75m.fsf@gnu.org> References: <1462311145-5959-1-git-send-email-hong@topbug.net> <85f11f8a-1799-befd-3e5b-f7d7a6eac660@topbug.net> <072a649f-d11a-7c82-b3ae-32d9a92c8f8b@topbug.net> <5d653522-49bd-8b48-e3d6-0c09d1c65fae@yandex.ru> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1476946778 5296 195.159.176.226 (20 Oct 2016 06:59:38 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 20 Oct 2016 06:59:38 +0000 (UTC) Cc: dgutov@yandex.ru, 23436@debbugs.gnu.org To: Hong Xu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Oct 20 08:59:33 2016 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 1bx7Jp-0006pd-5O for geb-bug-gnu-emacs@m.gmane.org; Thu, 20 Oct 2016 08:59:13 +0200 Original-Received: from localhost ([::1]:52781 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bx7Jr-0007Ps-ET for geb-bug-gnu-emacs@m.gmane.org; Thu, 20 Oct 2016 02:59:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34806) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bx7Jh-0007OV-28 for bug-gnu-emacs@gnu.org; Thu, 20 Oct 2016 02:59:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bx7Jd-0002J3-WC for bug-gnu-emacs@gnu.org; Thu, 20 Oct 2016 02:59:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:34063) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1bx7Jd-0002Iv-So for bug-gnu-emacs@gnu.org; Thu, 20 Oct 2016 02:59:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bx7Jd-0000Bu-KH for bug-gnu-emacs@gnu.org; Thu, 20 Oct 2016 02:59:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 20 Oct 2016 06:59:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23436 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 23436-submit@debbugs.gnu.org id=B23436.1476946716699 (code B ref 23436); Thu, 20 Oct 2016 06:59:01 +0000 Original-Received: (at 23436) by debbugs.gnu.org; 20 Oct 2016 06:58:36 +0000 Original-Received: from localhost ([127.0.0.1]:40253 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bx7JE-0000BC-36 for submit@debbugs.gnu.org; Thu, 20 Oct 2016 02:58:36 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:43747) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bx7JD-0000Ay-3Y for 23436@debbugs.gnu.org; Thu, 20 Oct 2016 02:58:35 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bx7J4-00025o-SC for 23436@debbugs.gnu.org; Thu, 20 Oct 2016 02:58:30 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:39241) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bx7J4-00025e-Oy; Thu, 20 Oct 2016 02:58:26 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4649 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bx7J3-0000nl-Ni; Thu, 20 Oct 2016 02:58:26 -0400 In-reply-to: (message from Hong Xu on Wed, 19 Oct 2016 17:16:58 -0700) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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:124707 Archived-At: > From: Hong Xu > Date: Wed, 19 Oct 2016 17:16:58 -0700 > > >>>> + (dolist (file-path (list file (file-truename file))) > >>> > >>> Why not just use the true name? > >> > >> Because sometimes we track symlinks specifically. The symlink files may > >> link to a file in a different repo, for example a git submodule. > > > > I'm not sure I understand. Please outline a problem scenario. > > mkdir my-repo && cd my-repo > hg init > git clone git://git.savannah.gnu.org/emacs.git > ln -s emacs/README README_emacs > hg add README_emacs > > README_emacs is tracked in the repo "my-repo" but README is tracked in > the emacs repo. If true name is directly used, we would fail to obtain > the correct responsible backend. What is the correct backend in this case? You seem to assume it's the one that maintains the symlink, but why is that assumption true? The backend is determined for certain operations. Did you make sure all of them will indeed want the backend of my-repo and not the other one. And what is the semantics of such a situation, anyway?