From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Glenn Morris Newsgroups: gmane.emacs.bugs Subject: bug#1046: 23.0.60; vc-dir with Subversion Date: Wed, 01 Oct 2008 12:05:02 -0400 Message-ID: References: <18655.13103.295021.779321@kahikatea.snap.net.nz> Reply-To: Glenn Morris , 1046@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1222878954 15097 80.91.229.12 (1 Oct 2008 16:35:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 1 Oct 2008 16:35:54 +0000 (UTC) Cc: Nick Roberts To: 1046@emacsbugs.donarmstrong.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Oct 01 18:36:43 2008 connect(): Connection refused Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Kl4bc-00038M-2k for geb-bug-gnu-emacs@m.gmane.org; Wed, 01 Oct 2008 18:31:16 +0200 Original-Received: from localhost ([127.0.0.1]:34271 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kl4aZ-0007Vu-4d for geb-bug-gnu-emacs@m.gmane.org; Wed, 01 Oct 2008 12:30:11 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kl4aS-0007SR-Un for bug-gnu-emacs@gnu.org; Wed, 01 Oct 2008 12:30:05 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kl4aP-0007O3-2Z for bug-gnu-emacs@gnu.org; Wed, 01 Oct 2008 12:30:02 -0400 Original-Received: from [199.232.76.173] (port=41952 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kl4aO-0007NN-DI for bug-gnu-emacs@gnu.org; Wed, 01 Oct 2008 12:30:00 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:56255) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Kl4aM-0006qb-BB for bug-gnu-emacs@gnu.org; Wed, 01 Oct 2008 12:29:58 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m91GTtDr029405; Wed, 1 Oct 2008 09:29:55 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id m91GF3BG025872; Wed, 1 Oct 2008 09:15:03 -0700 X-Loop: don@donarmstrong.com Resent-From: Glenn Morris Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Wed, 01 Oct 2008 16:15:03 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 1046 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 1046-submit@emacsbugs.donarmstrong.com id=B1046.122287724024538 (code B ref 1046); Wed, 01 Oct 2008 16:15:03 +0000 Original-Received: (at 1046) by emacsbugs.donarmstrong.com; 1 Oct 2008 16:07:20 +0000 Original-Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m91G7HQB024531 for <1046@emacsbugs.donarmstrong.com>; Wed, 1 Oct 2008 09:07:18 -0700 Original-Received: from rgm by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1Kl4CE-0003RB-Lf; Wed, 01 Oct 2008 12:05:02 -0400 X-Spook: CID Roswell kibo bootleg Semtex pipeline military NWO X-Ran: ;@8.lG3h#Uzy!x_m@34Xz9bdx:!)EyR~uKS-$]GL]5z_@EBeWC5[t~][3y/O4B:m9|afqq X-Hue: blue X-Attribution: GM In-Reply-To: (Glenn Morris's message of "Wed, 01 Oct 2008 03:28:39 -0400") User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Wed, 01 Oct 2008 12:30:01 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:20962 Archived-At: 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."