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...@samba.org> on 2003/06/06 04:14:35 UTC

svn status -v on nonexistent files has changed

Hi,

I'm running Subversion 0.23 from Debian.  

The behaviour of "svn status -v" on a nonexistent file seems to have
changed in the last couple of releases. 

This breaks vc-svn, and as a result it is not possible in emacs to
open a new file in a svn-controlled directory, which is an annoying
failure.

For example:

$ ls -la
total 12
drwxr-sr-x    3 mbp      mbp          4096 Jun  6 14:08 .
drwxr-sr-x    4 mbp      mbp          4096 Jan  7 15:44 ..
drwxr-sr-x    8 mbp      mbp          4096 Jun  6 14:09 .svn
$ svn st nothere
$ svn st -v nothere
$ echo $?
0
$ svn st -vu nothere
svn: Can't find an entry
svn: svn_wc_is_wc_root: 'nothere' is not a versioned resource
$ touch notadded
$ svn st notadded
?      notadded
$ svn st -v notadded
?                                       notadded

Previously running 'svn st nothere' would produce an error message, or
at least say '?'.  I think an error message is probably better.

I guess if you really wanted to keep this behaviour then vc-svn could
be patched to accomodate it.  I couldn't see a changelog entry
indicating that it was intentional.

This looks like yet another variation on bug 1042, though it is not
the same as the previous one.  (Reporting bugs in svn st seems to be
as far as I ever get with helping svn :-)

Please cc me on replies.

-- 
Martin 

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

Re: svn status -v on nonexistent files has changed

Posted by kf...@collab.net.
Rob Weir <rw...@ertius.org> writes:
> version 0.23.0 (r5962) in Debian Sid, which fails and gives me this in
> *Messages*:
> 
> vc-svn-parse-status: Couldn't parse output from `svn status -v'
> 
> >    2. I get different errors or non-errors by running status on 'xxx',
> >       depending on the options and whether or not I'm inside a
> >       Subversion working copy:
> 
> [snip tests]
> 
> Oddly enough, I get the exact same output as you.  Well, aside from the
> line number/apr_err line, which are presumably debugging code.

Hmmm -- are you an Emacs Lisp programmer?  :-)

Since you can reproduce it, you might be in a better position to come
up with a patch.  I think just making `vc-svn-parse-status' treat no
status, and certain errors, as all meaning "This file is not under
revision control" would be a good solution.


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

Re: svn status -v on nonexistent files has changed

Posted by Rob Weir <rw...@ertius.org>.
On Fri, Jun 06, 2003 at 09:52:18AM -0500, kfogel@collab.net wrote:
> kfogel@collab.net writes:
> > I couldn't reproduce this with head (rev 6163) of vc-svn.el and of
> > Subversion.  I think 'svn status' has already been fixed back.
> 
> Wait, this is more complex than I thought.  Here is some more careful
> testing this time -- all with head (6163) of both vc-svn.el and
> Subversion, GNU Emacs 21.1.50.3, and 'xxx' is a non-existent file:
>
>    1. Using head of vc-svn.el and Subversion, I do *not* get an
>       error when I do "C-x C-f xxx RET" in Emacs.  It just brings up
>       the new buffer named 'xxx', no complaints.

I'm seeing the OP's problem too, with GNU Emacs 21.3.2 and Subversion
version 0.23.0 (r5962) in Debian Sid, which fails and gives me this in
*Messages*:

vc-svn-parse-status: Couldn't parse output from `svn status -v'

>    2. I get different errors or non-errors by running status on 'xxx',
>       depending on the options and whether or not I'm inside a
>       Subversion working copy:

[snip tests]

Oddly enough, I get the exact same output as you.  Well, aside from the
line number/apr_err line, which are presumably debugging code.

-- 
Rob Weir <rw...@ertius.org>  |   mlspam@ertius.org   |   http://www.ertius.org/
GPG keys: 1024D/1E73B7CD, 4096R/3ABDE5EC     |      Do I look like I want a CC?
Words of the day:     credit card Crypto AG Audiotel Ft. Knox Cocaine terrorist

Re: svn status -v on nonexistent files has changed

Posted by Martin Pool <mb...@samba.org>.
On  6 Jun 2003, kfogel@collab.net wrote:
> kfogel@collab.net writes:
> > I couldn't reproduce this with head (rev 6163) of vc-svn.el and of
> > Subversion.  I think 'svn status' has already been fixed back.
> 
> Wait, this is more complex than I thought.  Here is some more careful
> testing this time -- all with head (6163) of both vc-svn.el and
> Subversion, GNU Emacs 21.1.50.3, and 'xxx' is a non-existent file:
> 
>    1. Using head of vc-svn.el and Subversion, I do *not* get an
>       error when I do "C-x C-f xxx RET" in Emacs.  It just brings up
>       the new buffer named 'xxx', no complaints.

This seems to work for me using svn and vc-svn.el from trunk r6178,
although it was broken in 0.23.  I am using

  GNU Emacs 21.3.2 (i386-pc-linux-gnu, X toolkit, Xaw3d scroll bars) of 2003-04-25 on raven, modified by Debian

>    2. I get different errors or non-errors by running status on 'xxx',
>       depending on the options and whether or not I'm inside a
>       Subversion working copy:
> 
>          $ cd some-working-copy
>          $ svn st xxx
>          $ svn st -v xxx

Silent success in these cases seems wrong to me.  Unless there is some
countervailing reason why it really has to happen this way I would
rather get an error.

>          $ svn st -u xxx
>          subversion/libsvn_wc/update_editor.c:2250: (apr_err=150000)
>          svn: Can't find an entry
>          svn: svn_wc_is_wc_root: 'xxx' is not a versioned resource
>          $ svn st -uv xxx
>          subversion/libsvn_wc/update_editor.c:2250: (apr_err=150000)
>          svn: Can't find an entry
>          svn: svn_wc_is_wc_root: 'xxx' is not a versioned resource
> 
>          $ cd outside-a-working-copy
>          $ svn st xxx
>          subversion/libsvn_wc/lock.c:306: (apr_err=155007)
>          svn: Path is not a working copy directory
>          svn: '.' is not a working copy
>          $ svn st -v xxx
>          subversion/libsvn_wc/lock.c:306: (apr_err=155007)
>          svn: Path is not a working copy directory
>          svn: '.' is not a working copy
>          $ svn st -u xxx
>          subversion/libsvn_wc/lock.c:306: (apr_err=155007)
>          svn: Path is not a working copy directory
>          svn: '.' is not a working copy
>          $ svn st -uv xxx
>          subversion/libsvn_wc/lock.c:306: (apr_err=155007)
>          svn: Path is not a working copy directory
>          svn: '.' is not a working copy
>          $ 

> All those different status results in (2) are disturbingly
> inconsistent, and maybe should get an issue ("svn status behaves
> inconsistently" or something).  But (1) is the bug you originally
> reported, and it's strange that I can't reproduce it.

It does seem inconsistent to me too.

-- 
Martin 

Re: svn status -v on nonexistent files has changed

Posted by kf...@collab.net.
kfogel@collab.net writes:
> I couldn't reproduce this with head (rev 6163) of vc-svn.el and of
> Subversion.  I think 'svn status' has already been fixed back.

Wait, this is more complex than I thought.  Here is some more careful
testing this time -- all with head (6163) of both vc-svn.el and
Subversion, GNU Emacs 21.1.50.3, and 'xxx' is a non-existent file:

   1. Using head of vc-svn.el and Subversion, I do *not* get an
      error when I do "C-x C-f xxx RET" in Emacs.  It just brings up
      the new buffer named 'xxx', no complaints.

   2. I get different errors or non-errors by running status on 'xxx',
      depending on the options and whether or not I'm inside a
      Subversion working copy:

         $ cd some-working-copy
         $ svn st xxx
         $ svn st -v xxx
         $ svn st -u xxx
         subversion/libsvn_wc/update_editor.c:2250: (apr_err=150000)
         svn: Can't find an entry
         svn: svn_wc_is_wc_root: 'xxx' is not a versioned resource
         $ svn st -uv xxx
         subversion/libsvn_wc/update_editor.c:2250: (apr_err=150000)
         svn: Can't find an entry
         svn: svn_wc_is_wc_root: 'xxx' is not a versioned resource

         $ cd outside-a-working-copy
         $ svn st xxx
         subversion/libsvn_wc/lock.c:306: (apr_err=155007)
         svn: Path is not a working copy directory
         svn: '.' is not a working copy
         $ svn st -v xxx
         subversion/libsvn_wc/lock.c:306: (apr_err=155007)
         svn: Path is not a working copy directory
         svn: '.' is not a working copy
         $ svn st -u xxx
         subversion/libsvn_wc/lock.c:306: (apr_err=155007)
         svn: Path is not a working copy directory
         svn: '.' is not a working copy
         $ svn st -uv xxx
         subversion/libsvn_wc/lock.c:306: (apr_err=155007)
         svn: Path is not a working copy directory
         svn: '.' is not a working copy
         $ 

All those different status results in (2) are disturbingly
inconsistent, and maybe should get an issue ("svn status behaves
inconsistently" or something).  But (1) is the bug you originally
reported, and it's strange that I can't reproduce it.

What's the exact error you're seeing, and the version of Emacs?

-Karl

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

Re: svn status -v on nonexistent files has changed

Posted by kf...@collab.net.
Martin Pool <mb...@samba.org> writes:
> I'm running Subversion 0.23 from Debian.  
> 
> The behaviour of "svn status -v" on a nonexistent file seems to have
> changed in the last couple of releases. 
> 
> This breaks vc-svn, and as a result it is not possible in emacs to
> open a new file in a svn-controlled directory, which is an annoying
> failure.

I couldn't reproduce this with head (rev 6163) of vc-svn.el and of
Subversion.  I think 'svn status' has already been fixed back.

> For example:
> 
> $ ls -la
> total 12
> drwxr-sr-x    3 mbp      mbp          4096 Jun  6 14:08 .
> drwxr-sr-x    4 mbp      mbp          4096 Jan  7 15:44 ..
> drwxr-sr-x    8 mbp      mbp          4096 Jun  6 14:09 .svn
> $ svn st nothere
> $ svn st -v nothere
> $ echo $?
> 0
> $ svn st -vu nothere
> svn: Can't find an entry
> svn: svn_wc_is_wc_root: 'nothere' is not a versioned resource

In 6163, Subversion behaves like this

   $ svn st -vu nothere
   $ 

...which vc-svn.el handles just fine.

-Karl

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