GNU bug report logs - #1046
23.0.60; vc-dir with Subversion

Previous Next

Package: emacs;

Reported by: Nick Roberts <nickrob <at> snap.net.nz>

Date: Sun, 28 Sep 2008 07:40:03 UTC

Severity: normal

Tags: patch

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 1046 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: 1046 <at> debbugs.gnu.org
Cc: Nick Roberts <nickrob <at> gnu.org>
Subject: Re: bug#1046: 23.0.60; vc-dir with Subversion
Date: Wed, 01 Oct 2008 12:05:02 -0400
Slight revision to distinguish needs-update and needs-merge.
Perhaps there are other states.

*** vc-svn.el	7 Sep 2008 20:24:29 -0000	1.96
--- vc-svn.el	1 Oct 2008 16:00:28 -0000
***************
*** 146,152 ****
    "SVN-specific state heuristic."
    (vc-svn-state file 'local))
  
! (defun vc-svn-after-dir-status (callback)
    (let ((state-map '((?A . added)
                       (?C . conflict)
                       (?D . removed)
--- 146,152 ----
    "SVN-specific state heuristic."
    (vc-svn-state file 'local))
  
! (defun vc-svn-after-dir-status (callback &optional remote)
    (let ((state-map '((?A . added)
                       (?C . conflict)
                       (?D . removed)
***************
*** 156,166 ****
                       (?? . unregistered)
                       ;; This is what vc-svn-parse-status does.
                       (?~ . edited)))
         result)
      (goto-char (point-min))
!     (while (re-search-forward "^\\(.\\)..... \\(.*\\)$" nil t)
        (let ((state (cdr (assq (aref (match-string 1) 0) state-map)))
!            (filename (match-string 2)))
         (when state
           (setq result (cons (list filename state) result)))))
      (funcall callback result)))
--- 156,173 ----
                       (?? . unregistered)
                       ;; This is what vc-svn-parse-status does.
                       (?~ . edited)))
+ 	(re (if remote "^\\(.\\)..... \\([ *]\\) +[-0-9]+ +\\(.*\\)$"
+ 	      ;; Subexp 2 is a dummy in this case, so the numbers match.
+ 	      "^\\(.\\)....\\(.\\) \\(.*\\)$"))
         result)
      (goto-char (point-min))
!     (while (re-search-forward re nil t)
        (let ((state (cdr (assq (aref (match-string 1) 0) state-map)))
! 	    (filename (match-string 3)))
! 	(and remote (string-equal (match-string 2) "*")
! 	     (setq state (if (eq state 'edited)
! 			     'needs-merge
! 			   'needs-update)))
         (when state
           (setq result (cons (list filename state) result)))))
      (funcall callback result)))
***************
*** 169,177 ****
    "Run 'svn status' for DIR and update BUFFER via CALLBACK.
  CALLBACK is called as (CALLBACK RESULT BUFFER), where
  RESULT is a list of conses (FILE . STATE) for directory DIR."
!   (vc-svn-command (current-buffer) 'async nil "status")
    (vc-exec-after
!    `(vc-svn-after-dir-status (quote ,callback))))
  
  (defun vc-svn-status-extra-headers (dir)
    "Generate extra status headers for a Subversion working copy."
--- 176,187 ----
    "Run 'svn status' for DIR and update BUFFER via CALLBACK.
  CALLBACK is called as (CALLBACK RESULT BUFFER), where
  RESULT is a list of conses (FILE . STATE) for directory DIR."
!   ;; FIXME should this rather be all the files in dir?
!   (let ((remote (not (vc-stay-local-p dir))))
!     (vc-svn-command (current-buffer) 'async nil "status"
! 		    (if remote "-u"))
      (vc-exec-after
!      `(vc-svn-after-dir-status (quote ,callback) ,remote))))
  
  (defun vc-svn-status-extra-headers (dir)
    "Generate extra status headers for a Subversion working copy."




This bug report was last modified 16 years and 289 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.