Mercurial > emacs
diff lisp/vc-svn.el @ 75233:e52e99fc4ca5
(vc-svn-parse-status): Trust the filename argument more
than the program's output.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Sun, 14 Jan 2007 14:49:28 +0000 |
parents | 299d3322c8be |
children | a8fd93a515a2 95d0cdf160ea |
line wrap: on
line diff
--- a/lisp/vc-svn.el Sun Jan 14 07:58:02 2007 +0000 +++ b/lisp/vc-svn.el Sun Jan 14 14:49:28 2007 +0000 @@ -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 <monnier@gnu.org> @@ -495,7 +495,7 @@ 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 @@ (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,