From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thien-Thi Nguyen Newsgroups: gmane.emacs.devel Subject: Re: vc-revert broken for Subversion files Date: Sun, 22 Jul 2007 23:50:46 +0200 Message-ID: <87d4ykt8eh.fsf@ambire.localdomain> References: <18083.30192.743099.875105@rgrjr.dyndns.org> <200707221859.l6MIxbA9014188@oogie-boogie.ics.uci.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1185141108 23061 80.91.229.12 (22 Jul 2007 21:51:48 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 22 Jul 2007 21:51:48 +0000 (UTC) Cc: Bob Rogers , emacs-devel@gnu.org To: Dan Nicolaescu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jul 22 23:51:47 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1ICjL3-0003pE-UI for ged-emacs-devel@m.gmane.org; Sun, 22 Jul 2007 23:51:42 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ICjL3-00006U-G1 for ged-emacs-devel@m.gmane.org; Sun, 22 Jul 2007 17:51:41 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1ICjKl-0008OC-VN for emacs-devel@gnu.org; Sun, 22 Jul 2007 17:51:24 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1ICjKk-0008MG-5N for emacs-devel@gnu.org; Sun, 22 Jul 2007 17:51:23 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ICjKj-0008Lt-Vd for emacs-devel@gnu.org; Sun, 22 Jul 2007 17:51:22 -0400 Original-Received: from ppp-138-32.21-151.libero.it ([151.21.32.138] helo=ambire.localdomain) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1ICjKj-0003ZL-DU for emacs-devel@gnu.org; Sun, 22 Jul 2007 17:51:21 -0400 Original-Received: from ttn by ambire.localdomain with local (Exim 4.63) (envelope-from ) id 1ICjKA-0002KN-5I; Sun, 22 Jul 2007 23:50:46 +0200 In-Reply-To: <200707221859.l6MIxbA9014188@oogie-boogie.ics.uci.edu> (Dan Nicolaescu's message of "Sun\, 22 Jul 2007 11\:59\:37 -0700") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux) X-detected-kernel: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:75328 Archived-At: () Dan Nicolaescu () Sun, 22 Jul 2007 11:59:37 -0700 This is a problem introduced a few days ago by changes to VC. vc now uses remove-if-not which is a function in cl-seq.el You can work around this by doing: M-x load-library RET cl RET M-x load-library RET cl-seq RET Hopefully someone will fix the code soon... a quick scan shows another problem in the same func where remove-if-not was introduced (vc-stay-local-p): docstrings sez "return non-nil", but if FILE is a list, the function returns a symbol, either `yes' or `no'. furthermore, the docstring makes no mention of the case when FILE is a list. furthermore, there is no ChangeLog entry. this last problem is very grave, causing the quick scan mentioned at the beginning of this paragraph to balloon into lots of time-wasting C-x v g digging. grrr. below is a patch. here is a ChangeLog entry: * vc-hooks.el (vc-stay-local-p): Fix bug: Avoid remove-if-not. Also, when FILE is a list, return non-nil if any of the files are should stay local. Update docstring. note to whoever really understands the intent of vc-stay-local-p: the opposite sense for FILE as list may be what you really want; please review carefully. thi ____________________________________________________________ *** vc-hooks.el 22 Jul 2007 19:04:10 -0000 1.195 --- vc-hooks.el 22 Jul 2007 21:42:22 -0000 *************** *** 159,167 **** (defun vc-stay-local-p (file) "Return non-nil if VC should stay local when handling FILE. ! This uses the `repository-hostname' backend operation." (if (listp file) ! (if (remove-if-not (lambda (x) (not (vc-stay-local-p x))) file) 'no 'yes) (let* ((backend (vc-backend file)) (sym (vc-make-backend-sym backend 'stay-local)) (stay-local (if (boundp sym) (symbol-value sym) t))) --- 159,169 ---- (defun vc-stay-local-p (file) "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)) (stay-local (if (boundp sym) (symbol-value sym) t)))