From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tom Tromey Newsgroups: gmane.emacs.devel Subject: Re: Introducing 'unrecognized and 'ignored Date: Sun, 06 Jan 2008 13:00:33 -0700 Message-ID: References: <17EA38DF-BCC1-4565-8510-5DD10DD667E3@mac.com> <20071229114551.GD9794@thyrsus.com> <20080102021907.GA15494@thyrsus.com> <200801020445.m024jWU2008538@oogie-boogie.ics.uci.edu> <200801031805.m03I5SBf022748@oogie-boogie.ics.uci.edu> <200801050901.m0591mQj011970@oogie-boogie.ics.uci.edu> <20080105143415.GG30869@thyrsus.com> <200801061037.m06AbIRD004966@oogie-boogie.ics.uci.edu> Reply-To: Tom Tromey NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1199651505 27014 80.91.229.12 (6 Jan 2008 20:31:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 6 Jan 2008 20:31:45 +0000 (UTC) Cc: esr@thyrsus.com, emacs-devel@gnu.org, rms@gnu.org, monnier@iro.umontreal.ca, harsanyi@mac.com To: Dan Nicolaescu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jan 06 21:32:04 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JBcA5-0006FU-3x for ged-emacs-devel@m.gmane.org; Sun, 06 Jan 2008 21:32:01 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JBc9i-0003C6-8D for ged-emacs-devel@m.gmane.org; Sun, 06 Jan 2008 15:31:38 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JBc9e-0003Bc-Pd for emacs-devel@gnu.org; Sun, 06 Jan 2008 15:31:34 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JBc9d-0003BQ-Qp for emacs-devel@gnu.org; Sun, 06 Jan 2008 15:31:34 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JBc9d-0003BN-L1 for emacs-devel@gnu.org; Sun, 06 Jan 2008 15:31:33 -0500 Original-Received: from mx1.redhat.com ([66.187.233.31]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JBc9Z-00061H-Q4; Sun, 06 Jan 2008 15:31:29 -0500 Original-Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id m06KVSkh016390; Sun, 6 Jan 2008 15:31:28 -0500 Original-Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [10.11.255.20]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id m06KVSX9031876; Sun, 6 Jan 2008 15:31:28 -0500 Original-Received: from opsy.redhat.com (ton.yyz.redhat.com [10.15.16.15]) by pobox.corp.redhat.com (8.13.1/8.13.1) with ESMTP id m06KVRGG004780; Sun, 6 Jan 2008 15:31:27 -0500 Original-Received: by opsy.redhat.com (Postfix, from userid 500) id E007F508021; Sun, 6 Jan 2008 13:00:33 -0700 (MST) X-Attribution: Tom In-Reply-To: <200801061037.m06AbIRD004966@oogie-boogie.ics.uci.edu> (Dan Nicolaescu's message of "Sun\, 06 Jan 2008 02\:37\:18 -0800") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.990 (gnu/linux) X-Scanned-By: MIMEDefang 2.58 on 172.16.52.254 X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) 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:86384 Archived-At: >>>>> "Dan" == Dan Nicolaescu writes: Dan> I checked in some code to do that. I whipped it out quickly, so it's not Dan> complete in any way. It provides a M-x vc-status command which is the Dan> replacement for vc-dired. Dan> It can only be used with Mercurial for now. Appended is a patch to make it work with svn. This patch is kind of a hack in that, if vc-status ever wants to support "non-terse" mode, then the function will have to be rewritten (since "svn status" and "svn status -v" have different formats). I don't understand how the 'dir' argument works with the existing vc-hg-dir-status. The argument is never used in the function. When I tried vc-status on a mercurial working directory, I got results for the whole tree, not the particular subdirectory I requested, which is also weird. The resulting buffer is always called *vc-status*, which is unfriendly. Perhaps it should be named after the requested directory. I think it would be best to make vc-status work asynchronously from the very beginning. That is what pcl-cvs and psvn do, and it is nicer to use on larger trees. I think this is important to do first because it is simpler to redesign the back end hooks now, if needed. Tom 2008-01-06 Tom Tromey * vc-svn.el (vc-svn-dir-status): New function. *** vc-svn.el 02 Jan 2008 12:34:31 -0700 1.59 --- vc-svn.el 06 Jan 2008 12:39:14 -0700 *************** *** 1,6 **** ;;; vc-svn.el --- non-resident support for Subversion version-control ! ;; Copyright (C) 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. ;; Author: FSF (see vc.el for full credits) ;; Maintainer: Stefan Monnier --- 1,6 ---- ;;; vc-svn.el --- non-resident support for Subversion version-control ! ;; Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. ;; Author: FSF (see vc.el for full credits) ;; Maintainer: Stefan Monnier *************** *** 157,162 **** --- 157,185 ---- (vc-svn-command t 0 nil "status" (if localp "-v" "-u")) (vc-svn-parse-status)))) + (defun vc-svn-dir-status (dir) + "Return a list of conses (FILE . STATE) for DIR." + (with-temp-buffer + (let ((default-directory (file-name-as-directory dir)) + (state-map '((?A . added) + (?C . edited) + (?D . removed) + (?I . ignored) + (?M . edited) + (?R . removed) + (?? . unregistered) + ;; This is what vc-svn-parse-status does. + (?~ . edited))) + result) + (vc-svn-command t 0 nil "status") + (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 (cons filename state) result))))) + result))) + (defun vc-svn-working-revision (file) "SVN-specific version of `vc-working-revision'." ;; There is no need to consult RCS headers under SVN, because we