From: Stefan Monnier Date: Sun, 14 Jan 2007 14:49:28 +0000 (+0000) Subject: (vc-svn-parse-status): Trust the filename argument more X-Git-Tag: emacs-pretest-22.0.93~140 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c45b3be32d410984a9767c876024b348442333c5;p=emacs.git (vc-svn-parse-status): Trust the filename argument more than the program's output. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 793c014b670..ee6561fdd23 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2007-01-14 Stefan Monnier + + * vc-svn.el (vc-svn-parse-status): Trust the filename argument more + than the program's output. + 2007-01-14 Juanma Barranquero * kmacro.el (kmacro-insert-counter, kmacro-set-counter) @@ -27,8 +32,8 @@ 2007-01-11 Michael Albinus - * net/tramp.el (tramp-handle-file-local-copy): Set - `enable-multibyte-characters' to nil. Reported by Chris Moore + * net/tramp.el (tramp-handle-file-local-copy): + Set `enable-multibyte-characters' to nil. Reported by Chris Moore . 2007-01-11 Stefan Monnier diff --git a/lisp/vc-svn.el b/lisp/vc-svn.el index 0394c11b8de..916930ffde2 100644 --- a/lisp/vc-svn.el +++ b/lisp/vc-svn.el @@ -1,6 +1,6 @@ ;;; vc-svn.el --- non-resident support for Subversion version-control -;; Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +;; Copyright (C) 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. ;; Author: FSF (see vc.el for full credits) ;; Maintainer: Stefan Monnier @@ -495,7 +495,7 @@ and that it passes `vc-svn-global-switches' to it before FLAGS." dirname))) (goto-char (point-min)) (when (re-search-forward - ;; Old `svn' used name="svn:dir", newer use just name="". + ;; Old `svn' used name="svn:this_dir", newer use just name="". (concat "name=\"\\(?:svn:this_dir\\)?\"[\n\t ]*" "\\(?:[-a-z]+=\"[^\"]*\"[\n\t ]*\\)*?" "url=\"\\([^\"]+\\)\"") nil t) @@ -511,9 +511,13 @@ information about FILENAME and return its status." (let (file status) (goto-char (point-min)) (while (re-search-forward - "^[ ADMCI?!~][ MC][ L][ +][ S]..\\([ *]\\) +\\([-0-9]+\\) +\\([0-9?]+\\) +\\([^ ]+\\) +" nil t) - (setq file (expand-file-name - (buffer-substring (point) (line-end-position)))) + ;; Ignore the files with status in [IX?]. + "^[ ACDGMR!~][ MC][ L][ +][ S]..\\([ *]\\) +\\([-0-9]+\\) +\\([0-9?]+\\) +\\([^ ]+\\) +" nil t) + ;; If the username contains spaces, the output format is ambiguous, + ;; so don't trust the output's filename unless we have to. + (setq file (or filename + (expand-file-name + (buffer-substring (point) (line-end-position))))) (setq status (char-after (line-beginning-position))) (unless (eq status ??) ;; `vc-BACKEND-registered' must not set vc-backend,