unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* vc-svn-after-dir-status
@ 2009-02-05  7:11 Nick Roberts
  2009-02-10  6:13 ` vc-svn-after-dir-status Nick Roberts
  0 siblings, 1 reply; 2+ messages in thread
From: Nick Roberts @ 2009-02-05  7:11 UTC (permalink / raw)
  To: emacs-devel


The regexp in vc-svn-after-dir-status is wrong for unregistered files in the
remote case as "svn status -u" doesn't output a revision number for such a
state.  This means that files in this state aren't displayed in this case.  I
think the patch below fixes it but couldn't test it as I encountered bugs which
stopped vc-dir from working.  These were in vc-dir-update in vc-dir.el, and
occurred because prev-node in (vc-dir-node-directory prev-node) was nil 
when files needed updating and expand-file-name somwhere had a nil argument
when there were no files that needed updating.

-- 
Nick                                           http://www.inet.net.nz/~nickrob


2009-02-05  Nick Roberts  <nickrob@snap.net.nz>

	*  (vc-svn-after-dir-status): Use shy group for revision number
        as it isn't present for unregistered files.


--- vc-svn.el.~1.111.~    2009-02-05 09:37:04.000000000 +1300
+++ vc-svn.el    2009-02-05 12:23:41.000000000 +1300
@@ -164,7 +164,7 @@ want to force an empty list of arguments
                      (?? . unregistered)
                      ;; This is what vc-svn-parse-status does.
                      (?~ . edited)))
-    (re (if remote "^\\(.\\)..... \\([ *]\\) +[-0-9]+ +\\(.*\\)$"
+    (re (if remote "^\\(.\\)..... \\([ *]\\) +\\(:?[-0-9]+\\)? +\\(.*\\)$"
           ;; Subexp 2 is a dummy in this case, so the numbers match.
           "^\\(.\\)....\\(.\\) \\(.*\\)$"))
        result)





^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: vc-svn-after-dir-status
  2009-02-05  7:11 vc-svn-after-dir-status Nick Roberts
@ 2009-02-10  6:13 ` Nick Roberts
  0 siblings, 0 replies; 2+ messages in thread
From: Nick Roberts @ 2009-02-10  6:13 UTC (permalink / raw)
  To: emacs-devel

 > I think the patch below fixes it but couldn't test it as I encountered bugs
 > which stopped vc-dir from working.  These were in vc-dir-update in
 > vc-dir.el, and occurred because prev-node in (vc-dir-node-directory
 > prev-node) was nil when files needed updating and expand-file-name somwhere
 > had a nil argument when there were no files that needed updating. >
 >...

 > --- vc-svn.el.~1.111.~    2009-02-05 09:37:04.000000000 +1300
 > +++ vc-svn.el    2009-02-05 12:23:41.000000000 +1300
 > @@ -164,7 +164,7 @@ want to force an empty list of arguments
 >                       (?? . unregistered)
 >                       ;; This is what vc-svn-parse-status does.
 >                       (?~ . edited)))
 > -    (re (if remote "^\\(.\\)..... \\([ *]\\) +[-0-9]+ +\\(.*\\)$"
 > +    (re (if remote "^\\(.\\)..... \\([ *]\\) +\\(:?[-0-9]+\\)? +\\(.*\\)$"

That should have been:

 > +    (re (if remote "^\\(.\\)..... \\([ *]\\) +\\(?:[-0-9]+\\)? +\\(.*\\)$"

which was why I was seeing errors.  I've committed this corrected change.

-- 
Nick                                           http://www.inet.net.nz/~nickrob




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-02-10  6:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-05  7:11 vc-svn-after-dir-status Nick Roberts
2009-02-10  6:13 ` vc-svn-after-dir-status Nick Roberts

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).