From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Leo Newsgroups: gmane.emacs.devel Subject: Re: Is this a bug in vc-svn? Date: Fri, 20 Oct 2006 19:35:36 +0100 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1161379815 2868 80.91.229.2 (20 Oct 2006 21:30:15 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 20 Oct 2006 21:30:15 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 20 23:30:12 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Gb1wR-0003Ww-6W for ged-emacs-devel@m.gmane.org; Fri, 20 Oct 2006 23:30:11 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Gb1wQ-00032m-O5 for ged-emacs-devel@m.gmane.org; Fri, 20 Oct 2006 17:30:10 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GazDn-0007oJ-7o for emacs-devel@gnu.org; Fri, 20 Oct 2006 14:35:55 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GazDl-0007jD-EL for emacs-devel@gnu.org; Fri, 20 Oct 2006 14:35:54 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GazDl-0007j1-5q for emacs-devel@gnu.org; Fri, 20 Oct 2006 14:35:53 -0400 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1GazDk-00011D-UV for emacs-devel@gnu.org; Fri, 20 Oct 2006 14:35:53 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1GazDU-0008Az-V6 for emacs-devel@gnu.org; Fri, 20 Oct 2006 20:35:36 +0200 Original-Received: from sl392.st-edmunds.cam.ac.uk ([131.111.223.202]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 20 Oct 2006 20:35:36 +0200 Original-Received: from sdl.web by sl392.st-edmunds.cam.ac.uk with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 20 Oct 2006 20:35:36 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: emacs-devel@gnu.org Original-Lines: 87 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: sl392.st-edmunds.cam.ac.uk Face: iVBORw0KGgoAAAANSUhEUgAAAC0AAAAtBAMAAADINP+pAAAAMFBMVEUALGQLNGsEPX4ePG4M S5EvT30XVqJTa5E/erhrgaKKnriouczCzt3W3+fl6+/9//y5jpouAAAAAWJLR0QAiAUdSAAAAAlw SFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9YJAhUPOvTTW44AAAIMSURBVDjLddQxaBNRGAfw/8u1 hBSRCDXgpII4n4gVxUAHucmhgyAUraaUj44FtyK4uThYkSKKmtukghoQO7RDBhEUtCk4FNHQwUFc zIGIVJN7vu97791dir7lcr+8++d7774XaDc+3Q1xYnHD3SWw1/RxCB77Hwx5ugw3gmtFf1lF9sWj 3D+iMEbb3gdT3i7cM4EHvf/0EQ/NzetqxXkaOu9x5oAmx6x/dVyREvrUCDrisfPL5tHv6RuaxQz7 wMe0ud7zRHM4wP7LcbnHiapGdCjoGH/l3PzabXNRRJNoGl9yvkf3ZdVHqYF6giy+rn/D+1iCP8h8 R6414+UEO/9ytYkfu51zVAsfcrcVR3QFiPFi1/ySqR9YQGvYVURUZZfdCU/df/JM91dWlo/wPgBT 7EE077tCrxLHI2SfoPme43SV5njVkmMit73foMNwPk5EN993ezrtdt+e3SdFLBmf4B0ELnE9JWWL ayE2G9sorlc6YBNxQDay6KMJ4hEpeNgr//EzxsdtvKrrb5lfl/mz8nkm6wAEbZlvc5pZP6KsbT6v XHX0l3xrE6mfl3Va6+xVtMUjfoC7fsFXmbJjhG7Jng3yxhNH9Fx8y/le7bwm3nenJmiKm/YsneOU O276RXvueDHB4ru1q46ne9b5cZVv8PS2P79bx5SqyqsOjp98Wvgf+Lxux9r6Rpp6/wujf5KPYInm gAAAAABJRU5ErkJggg== User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/23.0.0 (gnu/linux) Cancel-Lock: sha1:uq+jO+JKN0MqfEwq5xMdtbFSInc= 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:60963 Archived-At: On Fri, 20/10/06, Stefan Monnier wrote: [...] > > The patch below should fix it. > > > Stefan > > > Index: lisp/vc-svn.el > =================================================================== > RCS file: /sources/emacs/emacs/lisp/vc-svn.el,v > retrieving revision 1.27 > diff -u -r1.27 vc-svn.el > --- lisp/vc-svn.el 9 Feb 2006 03:47:00 -0000 1.27 > +++ lisp/vc-svn.el 20 Oct 2006 07:51:17 -0000 > @@ -125,8 +125,7 @@ > ;; an `error' by vc-do-command. > (error nil)))) > (when (eq 0 status) > - (vc-svn-parse-status t) > - (eq 'SVN (vc-file-getprop file 'vc-backend))))))) > + (vc-svn-parse-status file)))))) > > (defun vc-svn-state (file &optional localp) > "SVN-specific version of `vc-state'." > @@ -134,8 +133,7 @@ > (with-temp-buffer > (cd (file-name-directory file)) > (vc-svn-command t 0 file "status" (if localp "-v" "-u")) > - (vc-svn-parse-status localp) > - (vc-file-getprop file 'vc-state))) > + (vc-svn-parse-status file))) > > (defun vc-svn-state-heuristic (file) > "SVN-specific state heuristic." > @@ -149,7 +147,7 @@ > ;; enough. Otherwise it might fail with remote repositories. > (with-temp-buffer > (vc-svn-command t 0 nil "status" (if localp "-v" "-u")) > - (vc-svn-parse-status localp)))) > + (vc-svn-parse-status)))) > > (defun vc-svn-workfile-version (file) > "SVN-specific version of `vc-workfile-version'." > @@ -488,10 +486,10 @@ > ;; behavior for different modules on the same server. > (match-string 1)))) > > -(defun vc-svn-parse-status (localp) > +(defun vc-svn-parse-status (&optional filename) > "Parse output of \"svn status\" command in the current buffer. > -Set file properties accordingly. Unless FULL is t, parse only > -essential information." > +Set file properties accordingly. Unless FILENAME is non-nil, parse only > +information about FILENAME and return its status." > (let (file status) > (goto-char (point-min)) > (while (re-search-forward > @@ -500,7 +498,9 @@ > (buffer-substring (point) (line-end-position)))) > (setq status (char-after (line-beginning-position))) > (unless (eq status ??) > - (vc-file-setprop file 'vc-backend 'SVN) > + ;; `vc-BACKEND-registered' must not set vc-backend, > + ;; which is instead set in vc-registered. > + (unless filename (vc-file-setprop file 'vc-backend 'SVN)) > ;; Use the last-modified revision, so that searching in vc-print-log > ;; output works. > (vc-file-setprop file 'vc-workfile-version (match-string 3)) > @@ -522,7 +522,8 @@ > (if (eq (char-after (match-beginning 1)) ?*) > 'needs-merge > 'edited)) > - (t 'edited))))))) > + (t 'edited))))) > + (if filename (vc-file-getprop filename 'vc-state)))) > > (defun vc-svn-dir-state-heuristic (dir) > "Find the SVN state of all files in DIR, using only local information." Yes, it's fixed. -- Leo