From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: owner@emacsbugs.donarmstrong.com (Emacs bug Tracking System) Newsgroups: gmane.emacs.bugs Subject: bug#2991: marked as done (23.2: remove vc-backend calls from vc-stay-local-p) Date: Wed, 26 Aug 2009 18:45:06 +0000 Message-ID: References: <200908261837.n7QIbhVG023418@godzilla.ics.uci.edu> <200904140157.n3E1vwLO007494@godzilla.ics.uci.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----------=_1251312306-17393-0" X-Trace: ger.gmane.org 1251314798 12562 80.91.229.12 (26 Aug 2009 19:26:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 26 Aug 2009 19:26:38 +0000 (UTC) To: Dan Nicolaescu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Aug 26 21:26:32 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MgO8b-0002Ev-VG for geb-bug-gnu-emacs@m.gmane.org; Wed, 26 Aug 2009 21:26:32 +0200 Original-Received: from localhost ([127.0.0.1]:45135 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MgO8b-0000C0-CN for geb-bug-gnu-emacs@m.gmane.org; Wed, 26 Aug 2009 15:26:29 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MgNWT-00009s-Ls for bug-gnu-emacs@gnu.org; Wed, 26 Aug 2009 14:47:05 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MgNWN-0008Vg-Ox for bug-gnu-emacs@gnu.org; Wed, 26 Aug 2009 14:47:04 -0400 Original-Received: from [199.232.76.173] (port=54713 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MgNWM-0008VM-Pm for bug-gnu-emacs@gnu.org; Wed, 26 Aug 2009 14:46:58 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:36973) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MgNWL-00011w-Qp for bug-gnu-emacs@gnu.org; Wed, 26 Aug 2009 14:46:58 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7QIkrIM017784; Wed, 26 Aug 2009 11:46:53 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n7QIj6UA017425; Wed, 26 Aug 2009 11:45:06 -0700 X-Mailer: MIME-tools 5.427 (Entity 5.427) X-Loop: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: closed 2991 X-Emacs-PR-Package: emacs X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:30593 Archived-At: This is a multi-part message in MIME format... ------------=_1251312306-17393-0 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Your message dated Wed, 26 Aug 2009 11:37:43 -0700 (PDT) with message-id <200908261837.n7QIbhVG023418@godzilla.ics.uci.edu> and subject line Re: bug#2991: 23.2: remove vc-backend calls from vc-stay-l= ocal-p has caused the Emacs bug report #2991, regarding 23.2: remove vc-backend calls from vc-stay-local-p to be marked as done. This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact owner@emacsbugs.donarmstrong.com immediately.) --=20 2991: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=3D2991 Emacs Bug Tracking System Contact owner@emacsbugs.donarmstrong.com with problems ------------=_1251312306-17393-0 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by emacsbugs.donarmstrong.com; 14 Apr 2009 01:59:58 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.9 required=4.0 tests=FOURLA,FVGT_m_MULTI_ODD, MURPHY_DRUGS_REL8,X_DEBBUGS_NO_ACK autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n3E1xoKC001890 for ; Mon, 13 Apr 2009 18:59:51 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LtXwE-0000pX-5L for bug-gnu-emacs@gnu.org; Mon, 13 Apr 2009 21:59:50 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LtXw9-0000pC-Hs for bug-gnu-emacs@gnu.org; Mon, 13 Apr 2009 21:59:49 -0400 Received: from [199.232.76.173] (port=40681 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LtXw9-0000p9-Bt for bug-gnu-emacs@gnu.org; Mon, 13 Apr 2009 21:59:45 -0400 Received: from barrelv2.ics.uci.edu ([128.195.1.114]:40688) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA1:24) (Exim 4.60) (envelope-from ) id 1LtXw8-0000Cf-Nz for bug-gnu-emacs@gnu.org; Mon, 13 Apr 2009 21:59:45 -0400 Received: from godzilla.ics.uci.edu (godzilla.ics.uci.edu [128.195.10.101]) by barrelv2.ics.uci.edu (8.13.8+Sun/8.13.8) with ESMTP id n3E1vwjZ006533 for ; Mon, 13 Apr 2009 18:57:58 -0700 (PDT) Received: (from dann@localhost) by godzilla.ics.uci.edu (8.13.8+Sun/8.13.6/Submit) id n3E1vwLO007494; Mon, 13 Apr 2009 18:57:58 -0700 (PDT) Date: Mon, 13 Apr 2009 18:57:58 -0700 (PDT) Message-Id: <200904140157.n3E1vwLO007494@godzilla.ics.uci.edu> From: Dan Nicolaescu To: bug-gnu-emacs Subject: 23.2: remove vc-backend calls from vc-stay-local-p X-Debbugs-No-Ack: yes Lines: 169 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-ICS-MailScanner-Information: Please contact the ISP for more information X-ICS-MailScanner-ID: n3E1vwjZ006533 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (score=-0.263, required 5, autolearn=disabled, ALL_TRUSTED -1.44, FM_MULTI_ODD2 1.10, TW_SV 0.08) X-ICS-MailScanner-From: dann@godzilla.ics.uci.edu X-detected-operating-system: by monty-python.gnu.org: Solaris 10 (beta) We need to eliminate these redundant calls, the backend can be passed down. Archive the patch here until it can be applied. Index: vc-cvs.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/vc-cvs.el,v retrieving revision 1.163 diff -u -3 -p -r1.163 vc-cvs.el --- vc-cvs.el 5 Jan 2009 03:19:51 -0000 1.163 +++ vc-cvs.el 13 Apr 2009 16:43:24 -0000 @@ -216,7 +216,7 @@ See also variable `vc-cvs-sticky-date-fo (defun vc-cvs-state (file) "CVS-specific version of `vc-state'." - (if (vc-stay-local-p file) + (if (vc-stay-local-p file 'CVS) (let ((state (vc-file-getprop file 'vc-state))) ;; If we should stay local, use the heuristic but only if ;; we don't have a more precise state already available. @@ -496,7 +496,7 @@ Will fail unless you have administrative ;; It's just the catenation of the individual logs. (vc-cvs-command buffer - (if (vc-stay-local-p files) 'async 0) + (if (vc-stay-local-p files 'CVS) 'async 0) files "log")) (defun vc-cvs-comment-history (file) @@ -506,7 +506,7 @@ Will fail unless you have administrative (defun vc-cvs-diff (files &optional oldvers newvers buffer) "Get a difference report using CVS between two revisions of FILE." (let* ((async (and (not vc-disable-async-diff) - (vc-stay-local-p files))) + (vc-stay-local-p files 'CVS))) (invoke-cvs-diff-list nil) status) ;; Look through the file list and see if any files have backups @@ -559,7 +559,7 @@ Will fail unless you have administrative "Execute \"cvs annotate\" on FILE, inserting the contents in BUFFER. Optional arg REVISION is a revision to annotate from." (vc-cvs-command buffer - (if (vc-stay-local-p file) + (if (vc-stay-local-p file 'CVS) 'async 0) file "annotate" (if revision (concat "-r" revision))) @@ -681,8 +681,9 @@ If UPDATE is non-nil, then update (resyn ;;; Miscellaneous ;;; -(defalias 'vc-cvs-make-version-backups-p 'vc-stay-local-p - "Return non-nil if version backups should be made for FILE.") +(defun vc-cvs-make-version-backups-p (file) + "Return non-nil if version backups should be made for FILE." + (vc-stay-local-p file 'CVS)) (defun vc-cvs-check-headers () "Check if the current file has any headers in it." @@ -706,7 +707,8 @@ and that it passes `vc-cvs-global-switch (append vc-cvs-global-switches flags)))) -(defalias 'vc-cvs-stay-local-p 'vc-stay-local-p) ;Back-compatibility. +(defun vc-cvs-stay-local-p (file) + (vc-stay-local-p file 'CVS)) (defun vc-cvs-repository-hostname (dirname) "Hostname of the CVS server associated to workarea DIRNAME." @@ -965,7 +967,7 @@ state." (defun vc-cvs-dir-status (dir update-function) "Create a list of conses (file . state) for DIR." ;; FIXME check all files in DIR instead? - (let ((local (vc-stay-local-p dir))) + (let ((local (vc-stay-local-p dir 'CVS))) (if (and local (not (eq local 'only-file))) (vc-cvs-dir-status-heuristic dir update-function) (vc-cvs-command (current-buffer) 'async dir "-f" "status") Index: vc-hooks.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/vc-hooks.el,v retrieving revision 1.277 diff -u -3 -p -r1.277 vc-hooks.el --- vc-hooks.el 1 Apr 2009 15:42:12 -0000 1.277 +++ vc-hooks.el 13 Apr 2009 16:43:24 -0000 @@ -168,15 +168,15 @@ by these regular expressions." :version "23.1" :group 'vc) -(defun vc-stay-local-p (file) +(defun vc-stay-local-p (file &optional backend) "Return non-nil if VC should stay local when handling FILE. This uses the `repository-hostname' backend operation. If FILE is a list of files, return non-nil if any of them individually should stay local." (if (listp file) - (delq nil (mapcar 'vc-stay-local-p file)) - (let* ((backend (vc-backend file)) - (sym (vc-make-backend-sym backend 'stay-local)) + (delq nil (mapcar (lambda (arg) (vc-stay-local-p arg backend)) file)) + (setq backend (or backend (vc-backend file))) + (let* ((sym (vc-make-backend-sym backend 'stay-local)) (stay-local (if (boundp sym) (symbol-value sym) vc-stay-local))) (if (symbolp stay-local) stay-local (let ((dirname (if (file-directory-p file) Index: vc-svn.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/vc-svn.el,v retrieving revision 1.112 diff -u -3 -p -r1.112 vc-svn.el --- vc-svn.el 10 Feb 2009 05:59:14 -0000 1.112 +++ vc-svn.el 13 Apr 2009 16:43:25 -0000 @@ -142,7 +142,7 @@ want to force an empty list of arguments (defun vc-svn-state (file &optional localp) "SVN-specific version of `vc-state'." - (setq localp (or localp (vc-stay-local-p file))) + (setq localp (or localp (vc-stay-local-p file 'SVN))) (with-temp-buffer (cd (file-name-directory file)) (vc-svn-command t 0 file "status" (if localp "-v" "-u")) @@ -176,7 +176,7 @@ want to force an empty list of arguments ;; FIXME are there other possible combinations? (cond ((eq state 'edited) (setq state 'needs-merge)) ((not state) (setq state 'needs-update)))) - (when state + (when (and state (not (string= "." filename))) (setq result (cons (list filename state) result))))) (funcall callback result))) @@ -189,7 +189,7 @@ RESULT is a list of conses (FILE . STATE ;; calling synchronously (vc-svn-registered DIR) => calling svn status -v DIR ;; which is VERY SLOW for big trees and it makes emacs ;; completely unresponsive during that time. - (let* ((local (and nil (vc-stay-local-p dir))) + (let* ((local (and nil (vc-stay-local-p dir 'SVN))) (remote (or t (not local) (eq local 'only-file)))) (vc-svn-command (current-buffer) 'async nil "status" (if remote "-u")) @@ -470,7 +470,7 @@ or svn+ssh://." (vc-svn-command buffer 'async - ;; (if (and (= (length files) 1) (vc-stay-local-p file)) 'async 0) + ;; (if (and (= (length files) 1) (vc-stay-local-p file 'SVN)) 'async 0) (list file) "log" ;; By default Subversion only shows the log up to the @@ -502,7 +502,7 @@ or svn+ssh://." (list "--diff-cmd=diff" "-x" (mapconcat 'identity (vc-switches nil 'diff) " ")))) (async (and (not vc-disable-async-diff) - (vc-stay-local-p files) + (vc-stay-local-p files 'SVN) (or oldvers newvers)))) ; Svn diffs those locally. (apply 'vc-svn-command buffer (if async 'async 0) @@ -543,8 +543,9 @@ NAME is assumed to be a URL." ;;; ;; Subversion makes backups for us, so don't bother. -;; (defalias 'vc-svn-make-version-backups-p 'vc-stay-local-p -;; "Return non-nil if version backups should be made for FILE.") +;; (defun vc-svn-make-version-backups-p (file) +;; "Return non-nil if version backups should be made for FILE." +;; (vc-stay-local-p file 'SVN)) (defun vc-svn-check-headers () "Check if the current file has any headers in it." ------------=_1251312306-17393-0 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 2991-done) by emacsbugs.donarmstrong.com; 26 Aug 2009 18:38:06 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-6.7 required=4.0 tests=AWL,HAS_BUG_NUMBER, X_DEBBUGS_NO_ACK autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from barrelv2.ics.uci.edu (barrelv2.ics.uci.edu [128.195.1.114]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7QIc5C1015713 for <2991-done@emacsbugs.donarmstrong.com>; Wed, 26 Aug 2009 11:38:06 -0700 Received: from godzilla.ics.uci.edu (godzilla.ics.uci.edu [128.195.10.101]) by barrelv2.ics.uci.edu (8.13.8+Sun/8.13.8) with ESMTP id n7QIbhVn006328 for <2991-done@emacsbugs.donarmstrong.com>; Wed, 26 Aug 2009 11:37:43 -0700 (PDT) Received: (from dann@localhost) by godzilla.ics.uci.edu (8.13.8+Sun/8.13.6/Submit) id n7QIbhVG023418; Wed, 26 Aug 2009 11:37:43 -0700 (PDT) Date: Wed, 26 Aug 2009 11:37:43 -0700 (PDT) Message-Id: <200908261837.n7QIbhVG023418@godzilla.ics.uci.edu> From: Dan Nicolaescu To: 2991-done@emacsbugs.donarmstrong.com Subject: Re: bug#2991: 23.2: remove vc-backend calls from vc-stay-local-p References: <200904140157.n3E1vwLO007494@godzilla.ics.uci.edu> X-Debbugs-No-Ack: yes In-Reply-To: <200904140157.n3E1vwLO007494@godzilla.ics.uci.edu> (Dan Nicolaescu's message of "Mon, 13 Apr 2009 18:57:58 -0700 (PDT)") Lines: 1 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-ICS-MailScanner-Information: Please contact the ISP for more information X-ICS-MailScanner-ID: n7QIbhVn006328 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (score=-1.44, required 5, autolearn=disabled, ALL_TRUSTED -1.44) X-ICS-MailScanner-From: dann@godzilla.ics.uci.edu Closing, this has been checked in a while ago. ------------=_1251312306-17393-0--