From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Hong Xu 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: Wed, 19 Oct 2016 12:33:58 -0700 Message-ID: References: <1462311145-5959-1-git-send-email-hong@topbug.net> <85f11f8a-1799-befd-3e5b-f7d7a6eac660@topbug.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="G4vG15uRQI0NcsSKmMSTGBUXAmv5UCJuG" X-Trace: blaine.gmane.org 1476905725 4855 195.159.176.226 (19 Oct 2016 19:35:25 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 19 Oct 2016 19:35:25 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.4.0 To: 23436@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Oct 19 21:35:22 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 1bwwe1-0000qk-6R for geb-bug-gnu-emacs@m.gmane.org; Wed, 19 Oct 2016 21:35:21 +0200 Original-Received: from localhost ([::1]:50589 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bwwe3-0003f7-CM for geb-bug-gnu-emacs@m.gmane.org; Wed, 19 Oct 2016 15:35:23 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:32782) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bwwdn-0003Zu-BY for bug-gnu-emacs@gnu.org; Wed, 19 Oct 2016 15:35:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bwwdi-00076P-Fi for bug-gnu-emacs@gnu.org; Wed, 19 Oct 2016 15:35:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:33865) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1bwwdi-00076F-Bx for bug-gnu-emacs@gnu.org; Wed, 19 Oct 2016 15:35:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bwwdi-0007SN-43 for bug-gnu-emacs@gnu.org; Wed, 19 Oct 2016 15:35:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Hong Xu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 19 Oct 2016 19:35:02 +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 X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.147690566228612 (code B ref -1); Wed, 19 Oct 2016 19:35:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 19 Oct 2016 19:34:22 +0000 Original-Received: from localhost ([127.0.0.1]:40055 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bwwd4-0007RQ-ET for submit@debbugs.gnu.org; Wed, 19 Oct 2016 15:34:22 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:41411) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bwwd2-0007RE-LR for submit@debbugs.gnu.org; Wed, 19 Oct 2016 15:34:20 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bwwcw-0006ee-C1 for submit@debbugs.gnu.org; Wed, 19 Oct 2016 15:34:15 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:50052) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1bwwcw-0006ea-9I for submit@debbugs.gnu.org; Wed, 19 Oct 2016 15:34:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60600) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bwwcv-0003Am-7q for bug-gnu-emacs@gnu.org; Wed, 19 Oct 2016 15:34:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bwwcq-0006bT-7L for bug-gnu-emacs@gnu.org; Wed, 19 Oct 2016 15:34:13 -0400 Original-Received: from sender163-mail.zoho.com ([74.201.84.163]:21365) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1bwwcp-0006ZS-W3 for bug-gnu-emacs@gnu.org; Wed, 19 Oct 2016 15:34:08 -0400 Original-Received: from [192.168.88.2] (cpe-104-32-170-214.socal.res.rr.com [104.32.170.214]) by mx.zohomail.com with SMTPS id 1476905643330943.9877149837293; Wed, 19 Oct 2016 12:34:03 -0700 (PDT) In-Reply-To: <85f11f8a-1799-befd-3e5b-f7d7a6eac660@topbug.net> X-Zoho-Virus-Status: 1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x 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:124690 Archived-At: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --G4vG15uRQI0NcsSKmMSTGBUXAmv5UCJuG Content-Type: multipart/mixed; boundary="XeEbISOOg1QV1kFk5T0aVGKIcWQk1I1FQ"; protected-headers="v1" From: Hong Xu To: bug-gnu-emacs@gnu.org Message-ID: Subject: Re: [PATCH] Attemp to use the true name of a file to determine responsible vc if the genuine name does not work. References: <1462311145-5959-1-git-send-email-hong@topbug.net> <85f11f8a-1799-befd-3e5b-f7d7a6eac660@topbug.net> In-Reply-To: <85f11f8a-1799-befd-3e5b-f7d7a6eac660@topbug.net> --XeEbISOOg1QV1kFk5T0aVGKIcWQk1I1FQ Content-Type: multipart/mixed; boundary="------------D092460B30549E804886345A" This is a multi-part message in MIME format. --------------D092460B30549E804886345A Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Another updated version... --------------D092460B30549E804886345A Content-Type: text/x-patch; name="vc.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="vc.patch" diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index af875e89907f..db9b0db39c6b 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -962,11 +962,13 @@ vc-responsible-backend responsible for FILE is returned." (or (and (not (file-directory-p file)) (vc-backend file)) (catch 'found - ;; First try: find a responsible backend. If this is for registration,= - ;; it must be a backend under which FILE is not yet registered. - (dolist (backend vc-handled-backends) - (and (vc-call-backend backend 'responsible-p file) - (throw 'found backend)))) + ;; First try: find a responsible backend. If this is for + ;; registration, it must be a backend under which FILE is not + ;; yet registered. + (dolist (file-path (list file (file-truename file))) + (dolist (backend vc-handled-backends) + (and (vc-call-backend backend 'responsible-p file-path) + (throw 'found backend))))) (error "No VC backend is responsible for %s" file))) =20 (defun vc-expand-dirs (file-or-dir-list backend) --------------D092460B30549E804886345A-- --XeEbISOOg1QV1kFk5T0aVGKIcWQk1I1FQ-- --G4vG15uRQI0NcsSKmMSTGBUXAmv5UCJuG Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJYB8qqAAoJECZsfTOCL4R4vRQP/2wwIYf32FltfZK154TceZXT MU9BlrVMCXPXMUN3a8qd8ICxo5wkNPs1IA7bLuwlc4ddLsXwAviA3tNRpI2scRRY GzPwB6MHRdfiJFQLvHGdPaRT+tOyPHcUTzQ8bwhmaBkBbXLQmRNqsr3wyYxWu2/v jEfG68Z2sywOfvDux3Xc7J2hUWff3Nffr60tOG3ZKStl783x7PxfHYgW4tCXSgPc 2v8ga6xY/pnJAA4OgJBIyCusaewIfdUIoMwD2gj5BCk1OyEfRw/Ay7a9X0n8uFuJ Rs1GKMNYy9AuxeJCzPONNm14gcNUCkFRcmTUobW4Ok1V+Le7VwDt/hFUjsK1sQxj TfiHWweJe4wOVzmzF0BE1Tc5MASILfkfU4O58lvGwpBqdu5jPLJJFB4rIRiKaJFS m+Hisrm97ZxSgZ3Pf8mlTmZjEX0RvyHp+r5wdHWQ+HJ3tdksy85qA1suigvuvRLu E7x3HHAZM1A8IMqtRIxe1/zfmxmcsLJijOvrwMz0FnrAMqjoxv5Eq0bCzcZzgbKP 6FRjpP+hYiB8wDUrKjKN4lYS5njUtTxCBUZ7cR1pV3LKHBE0j8QEx0JTkKvbOsPq K1P8UDRgtX+ixnEOQyAVImz4WDeyAck44O1j8LJ1IJMROt1qbyIr44GChiVggYkz 91TLhEOsOkMDRI39ZMbk =Wzgb -----END PGP SIGNATURE----- --G4vG15uRQI0NcsSKmMSTGBUXAmv5UCJuG--