From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dan Nicolaescu Newsgroups: gmane.emacs.bugs Subject: bug#737: vc-dir reports unregistered-then-deleted file is "up-to-date" Date: Sun, 5 Oct 2008 08:40:11 -0700 (PDT) Message-ID: <200810051540.m95FeBbj029915@mothra.ics.uci.edu> References: <18600.37952.844941.609726@rgrjr.rgrjr.dyndns.org> <200810040538.m945cRWl025789@mothra.ics.uci.edu> <200810050104.m9514rDt028153@mothra.ics.uci.edu> <18664.7250.598668.118510@fencepost.gnu.org> <18664.8210.740690.11362@fencepost.gnu.org> Reply-To: Dan Nicolaescu , 737@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 1223223025 27450 80.91.229.12 (5 Oct 2008 16:10:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 5 Oct 2008 16:10:25 +0000 (UTC) Cc: 737@emacsbugs.donarmstrong.com To: Glenn Morris Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Oct 05 18:11:22 2008 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 1KmWCM-0000Cj-QG for geb-bug-gnu-emacs@m.gmane.org; Sun, 05 Oct 2008 18:11:11 +0200 Original-Received: from localhost ([127.0.0.1]:48175 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KmWBJ-00007I-Ct for geb-bug-gnu-emacs@m.gmane.org; Sun, 05 Oct 2008 12:10:05 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KmWBG-00006t-Cr for bug-gnu-emacs@gnu.org; Sun, 05 Oct 2008 12:10:02 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KmWBD-00006L-LN for bug-gnu-emacs@gnu.org; Sun, 05 Oct 2008 12:10:02 -0400 Original-Received: from [199.232.76.173] (port=35187 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KmWBD-00006G-Hx for bug-gnu-emacs@gnu.org; Sun, 05 Oct 2008 12:09:59 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:43549) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KmWBD-0001Bu-00 for bug-gnu-emacs@gnu.org; Sun, 05 Oct 2008 12:09:59 -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 m95G9u76003177; Sun, 5 Oct 2008 09:09:56 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id m95Fo28h030130; Sun, 5 Oct 2008 08:50:02 -0700 X-Loop: don@donarmstrong.com Resent-From: Dan Nicolaescu Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sun, 05 Oct 2008 15:50:02 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 737 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 737-submit@emacsbugs.donarmstrong.com id=B737.122322123328843 (code B ref 737); Sun, 05 Oct 2008 15:50:02 +0000 Original-Received: (at 737) by emacsbugs.donarmstrong.com; 5 Oct 2008 15:40:33 +0000 Original-Received: from sallyv2.ics.uci.edu (sallyv2.ics.uci.edu [128.195.1.120]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m95FeU2v028831 for <737@emacsbugs.donarmstrong.com>; Sun, 5 Oct 2008 08:40:31 -0700 Original-Received: from mothra.ics.uci.edu (mothra.ics.uci.edu [128.195.6.93]) by sallyv2.ics.uci.edu (8.13.7+Sun/8.13.7) with ESMTP id m95FeCJQ005373; Sun, 5 Oct 2008 08:40:13 -0700 (PDT) Original-Received: (from dann@localhost) by mothra.ics.uci.edu (8.13.8+Sun/8.13.6/Submit) id m95FeBbj029915; Sun, 5 Oct 2008 08:40:11 -0700 (PDT) In-Reply-To: <18664.8210.740690.11362@fencepost.gnu.org> (Glenn Morris's message of "Sat, 4 Oct 2008 22:01:54 -0400") Original-Lines: 69 X-ICS-MailScanner-Information: Please contact the ISP for more information X-ICS-MailScanner-ID: m95FeCJQ005373 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (score=-1.44, required 5, autolearn=disabled, ALL_TRUSTED -1.44) X-ICS-MailScanner-From: dann@mothra.ics.uci.edu X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Sun, 05 Oct 2008 12:10:02 -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:21131 Archived-At: Glenn Morris writes: > Glenn Morris wrote (on Sat, 4 Oct 2008 at 21:45 -0400): > > > Whoops, I have local changes that may be affecting this. I will rebuild > > without them... > > I am still seeing this problem with CVS. Hmm, OK, I was testing with files several directories deep, and indeed they disappear from that directory, but they just get moved to the top directory. Oops. This patch vs vc-cvs.el 1.149 seems to fix it (sorry, I don't have time to deal with the stay-local breakage). --- vc-cvs.el.~1.149~ 2008-10-04 18:52:44.000000000 -0700 +++ vc-cvs.el 2008-10-05 08:37:30.000000000 -0700 @@ -832,13 +832,14 @@ state." (file nil) (result nil) (missing nil) + (ignore-next nil) (subdir default-directory)) (goto-char (point-min)) (while ;; Look for either a file entry, an unregistered file, or a ;; directory change. (re-search-forward - "\\(^=+\n\\([^=c?\n].*\n\\|\n\\)+\\)\\|\\(\\(^?? .*\n\\)+\\)\\|\\(^cvs status: Examining .*\n\\)" + "\\(^=+\n\\([^=c?\n].*\n\\|\n\\)+\\)\\|\\(\\(^?? .*\n\\)+\\)\\|\\(^cvs status: \\(Examining\\|nothing\\) .*\n\\)" nil t) ;; FIXME: get rid of narrowing here. (narrow-to-region (match-beginning 0) (match-end 0)) @@ -852,6 +853,21 @@ state." (expand-file-name (match-string 1) subdir))) (push (list file 'unregistered) result) (forward-line 1)) + (when (looking-at "cvs status: nothing known about") + ;; We asked about a non existent file. The output looks like this: + + ;; cvs status: nothing known about `lisp/v.diff' + ;; =================================================================== + ;; File: no file v.diff Status: Unknown + ;; + ;; Working revision: No entry for v.diff + ;; Repository revision: No revision control file + ;; + + ;; Due to narrowing in this iteration we only see the "cvs + ;; status:" line, so just set a flag so that we can ignore the + ;; file in the next iteration. + (setq ignore-next t)) ;; A file entry. (when (re-search-forward "^File: \\(no file \\)?\\(.*[^ \t]\\)[ \t]+Status: \\(.*\\)" nil t) (setq missing (match-string 1)) @@ -870,8 +886,10 @@ state." ((string-match "File had conflicts " status-str) 'conflict) ((string-match "Unknown" status-str) 'unregistered) (t 'edited))) - (unless (eq status 'up-to-date) - (push (list file status) result))) + (if ignore-next + (setq ignore-next nil) + (unless (eq status 'up-to-date) + (push (list file status) result)))) (goto-char (point-max)) (widen)) (funcall update-function result))