From: Dan Nicolaescu <dann@ics.uci.edu>
To: Glenn Morris <rgm@gnu.org>
Cc: 737@emacsbugs.donarmstrong.com
Subject: bug#737: vc-dir reports unregistered-then-deleted file is "up-to-date"
Date: Sun, 5 Oct 2008 08:40:11 -0700 (PDT) [thread overview]
Message-ID: <200810051540.m95FeBbj029915@mothra.ics.uci.edu> (raw)
In-Reply-To: <18664.8210.740690.11362@fencepost.gnu.org> (Glenn Morris's message of "Sat, 4 Oct 2008 22:01:54 -0400")
Glenn Morris <rgm@gnu.org> 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))
next prev parent reply other threads:[~2008-10-05 15:40 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-17 21:12 bug#737: vc-dir reports unregistered-then-deleted file is "up-to-date" Bob Rogers
2008-10-03 1:46 ` Glenn Morris
2008-10-03 5:19 ` Dan Nicolaescu
2008-10-03 7:07 ` Glenn Morris
2008-10-03 19:06 ` Dan Nicolaescu
2008-10-04 5:38 ` Dan Nicolaescu
2008-10-05 0:44 ` Glenn Morris
2008-10-05 1:04 ` Dan Nicolaescu
2008-10-05 1:27 ` Glenn Morris
2008-10-05 1:45 ` Glenn Morris
2008-10-05 2:01 ` Glenn Morris
2008-10-05 15:40 ` Dan Nicolaescu [this message]
2008-10-05 23:47 ` Glenn Morris
2008-10-05 2:24 ` Dan Nicolaescu
2008-10-05 2:10 ` Nick Roberts
2008-10-05 23:43 ` Glenn Morris
2008-10-06 0:33 ` Dan Nicolaescu
2008-10-06 6:26 ` Nick Roberts
2008-10-06 7:33 ` Glenn Morris
2008-10-06 7:53 ` Dan Nicolaescu
2008-10-06 9:12 ` Nick Roberts
2008-10-08 7:43 ` Glenn Morris
2008-10-09 4:52 ` Dan Nicolaescu
2008-10-10 1:39 ` Glenn Morris
2009-01-07 5:30 ` Stefan Monnier
2009-01-07 19:35 ` Dan Nicolaescu
2009-01-08 16:44 ` Stefan Monnier
2008-10-05 2:17 ` Nick Roberts
2009-01-07 5:33 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200810051540.m95FeBbj029915@mothra.ics.uci.edu \
--to=dann@ics.uci.edu \
--cc=737@emacsbugs.donarmstrong.com \
--cc=rgm@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.