You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Martin Pool <mb...@sourcefrog.net> on 2002/12/01 02:16:17 UTC

[patch] fix vc-svn for Subversion r3396

Subversion r3396 changed from using '_' as the status character for
"unchanged" to ' '.  This seems to have broken vc-svn.el, though
apparently not psvn.

I can't believe nobody else noticed... but here it is anyhow.

-- 
Martin
Please cc me on replies.


Index: vc-svn.el
===================================================================
--- vc-svn.el	(revision 3946)
+++ vc-svn.el	(working copy)
@@ -130,9 +130,9 @@
     (cond
      ((not state) nil)
      ;; A newly added file has no revision.
-     ((looking-at "\\S-+\\s-+\\(\\*\\s-+\\)?\\0\\s-+\\?")
+     ((looking-at "....\\s-+\\(\\*\\s-+\\)?\\0\\s-+\\?")
       (list state "0" nil))
-     ((looking-at "\\S-+\\s-+\\(\\*\\s-+\\)?\\([0-9]+\\)\\s-+\\([0-9]+\\)")
+     ((looking-at "....\\s-+\\(\\*\\s-+\\)?\\([0-9]+\\)\\s-+\\([0-9]+\\)")
       (list state
             (match-string 2)
             (match-string 3)))
@@ -154,12 +154,12 @@
    ;;                     user, but there is a more recent version
    ;;                     on the current branch stored in the
    ;;                     master file.
-   ((looking-at "_[_ ]..\\s-+\\*") 'needs-patch)
+   ((looking-at "  ..\\s-+\\*") 'needs-patch)
 
    ;; 'up-to-date         The working file is unmodified with
    ;;                     respect to the latest version on the
    ;;                     current branch, and not locked.
-   ((looking-at "_[_ ]") 'up-to-date)
+   ((looking-at "  ") 'up-to-date)
 
    ;; 'needs-merge        The file has been edited by the user,
    ;;                     and there is also a more recent version

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [patch] fix vc-svn for Subversion r3396

Posted by Matt Kraai <kr...@alumni.cmu.edu>.
On Sun, Dec 01, 2002 at 08:58:44PM -0800, Martin Pool wrote:
> > In the future, would you please include a log message?
> 
> Sure.  Do I just put it in the message body, or there some special way
> to mark it?

In short, the message body.  For the long answer, see HACKING.

Matt

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [patch] fix vc-svn for Subversion r3396

Posted by Martin Pool <mb...@sourcefrog.net>.
On  1 Dec 2002, Matt Kraai <kr...@alumni.cmu.edu> wrote:
> On Sat, Nov 30, 2002 at 07:11:38PM -0800, Martin Pool wrote:
> > This amended patch handles the case of finding a new file in a
> > Subversion-controlled directory.  In this case Subversion the file is
> > neither new nor edited, so svn status just gives a blank line.
> > 
> > Checking for exactly 40 spaces is a bit icky, but at the moment I
> > don't see an alternative that will work reliably.
> 
> I've committed this. 

Thanks!  I think there are still some problems in it; I'll try to send
more later.

I'm not sure if it's too late to change it, but it seems to me that it
might be better for "svn status" to print '?' for files which don't
exist in the repository or the wc.  To me, it seems strange that files
which exist in the wc get '?', but not ones which don't exist yet.  
' ' is documented as uptodate, which is not true in this case.  Making
it '?' might be overall less trouble for programs parsing the output.

> In the future, would you please include a log message?

Sure.  Do I just put it in the message body, or there some special way
to mark it?

-- 
Martin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [patch] fix vc-svn for Subversion r3396

Posted by Matt Kraai <kr...@alumni.cmu.edu>.
On Sat, Nov 30, 2002 at 07:11:38PM -0800, Martin Pool wrote:
> This amended patch handles the case of finding a new file in a
> Subversion-controlled directory.  In this case Subversion the file is
> neither new nor edited, so svn status just gives a blank line.
> 
> Checking for exactly 40 spaces is a bit icky, but at the moment I
> don't see an alternative that will work reliably.

I've committed this.  In the future, would you please include a log
message?

Matt

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [patch] fix vc-svn for Subversion r3396

Posted by Martin Pool <mb...@sourcefrog.net>.
This amended patch handles the case of finding a new file in a
Subversion-controlled directory.  In this case Subversion the file is
neither new nor edited, so svn status just gives a blank line.

Checking for exactly 40 spaces is a bit icky, but at the moment I
don't see an alternative that will work reliably.


Index: vc-svn.el
===================================================================
--- vc-svn.el	(revision 3946)
+++ vc-svn.el	(working copy)
@@ -130,12 +130,13 @@
     (cond
      ((not state) nil)
      ;; A newly added file has no revision.
-     ((looking-at "\\S-+\\s-+\\(\\*\\s-+\\)?\\0\\s-+\\?")
+     ((looking-at "....\\s-+\\(\\*\\s-+\\)?\\0\\s-+\\?")
       (list state "0" nil))
-     ((looking-at "\\S-+\\s-+\\(\\*\\s-+\\)?\\([0-9]+\\)\\s-+\\([0-9]+\\)")
+     ((looking-at "....\\s-+\\(\\*\\s-+\\)?\\([0-9]+\\)\\s-+\\([0-9]+\\)")
       (list state
             (match-string 2)
             (match-string 3)))
+     ((looking-at " \\{40\\}") nil)  ;; A file that is not in the wc nor in svn?
      (t (error "Couldn't parse output from `svn status -v'")))))
 
 
@@ -154,12 +155,17 @@
    ;;                     user, but there is a more recent version
    ;;                     on the current branch stored in the
    ;;                     master file.
-   ((looking-at "_[_ ]..\\s-+\\*") 'needs-patch)
+   ((looking-at "  ..\\s-+\\*") 'needs-patch)
 
    ;; 'up-to-date         The working file is unmodified with
    ;;                     respect to the latest version on the
    ;;                     current branch, and not locked.
-   ((looking-at "_[_ ]") 'up-to-date)
+   ;;     
+   ;;                     This is also returned for files which do not
+   ;;                     exist, as will be the case when finding a
+   ;;                     new file in a svn-controlled directory.  That
+   ;;                     case is handled in vc-svn-parse-status
+   ((looking-at "  ") 'up-to-date)
 
    ;; 'needs-merge        The file has been edited by the user,
    ;;                     and there is also a more recent version


-- 
Martin
please cc me on replies

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org