You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by David Glasser <gl...@mit.edu> on 2006/07/25 20:25:49 UTC

[PATCH] clarify error message in svn add

If you do something like:

  svn mkdir dir-should-be-file
  svn ci -m "make dir"
  svn rm dir-should-be-file
  svn ci -m "oops, should be file"
  touch dir-should-be-file
  svn add dir-should-be-file

you get the error:
  svn: Can't replace 'dir-should-be-file' with a node of a differing
type; commit the deletion, update the parent, and then add
'dir-should-be-file'

When I came across this, I was pretty confused at first, since the
first thing it tells me to do is commit the deletion, and I already
did that.  Attached is a patch which changes the message slightly to
hopefully make it more clear that you might have done the first step
but not the second.

I can imagine that there's an even better way of wording this, and as
eh mentioned on IRC, it would better to just add the functionality;
this is a small improvement anyway.

[[[
* subversion/libsvn_wc/adm_ops.c
  Clarify node type change error message to not imply that the next step
  must be to "commit the deletion", which may have already occured.
]]]

--dave

-- 
David Glasser | glasser@mit.edu | http://www.davidglasser.net/

Re: [PATCH] clarify error message in svn add

Posted by Julian Foad <ju...@btopenworld.com>.
David Glasser wrote:
> On 7/27/06, Madan U Sreenivasan <ma...@collab.net> wrote:
> 
>> Please specify the function name in the log.
> 
> Oops:
> 
> [[[
> * subversion/libsvn_wc/adm_ops.c
>  (svn_wc_add2): Clarify node type change error message to not imply
> that the next step
>  must be to "commit the deletion", which may have already occured.
> ]]]

Thanks; I've fixed the log message.

>> Also, the new message extends the line to beyond 80 characters. I think
>> this should be fixed.
> 
> That's true, but the old one was too, and this isn't too much longer.

Madam meant the source code line, not the output.  I wrapped it before 
committing - no problem.

- Julian

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

Re: [PATCH] clarify error message in svn add

Posted by David Glasser <gl...@mit.edu>.
On 7/27/06, Madan U Sreenivasan <ma...@collab.net> wrote:

> Please specify the function name in the log.

Oops:

[[[
* subversion/libsvn_wc/adm_ops.c
  (svn_wc_add2): Clarify node type change error message to not imply
that the next step
  must be to "commit the deletion", which may have already occured.
]]]

> Also, the new message extends the line to beyond 80 characters. I think
> this should be fixed.

That's true, but the old one was too, and this isn't too much longer.

--dave

-- 
David Glasser | glasser@mit.edu

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

Re: [PATCH] clarify error message in svn add

Posted by Madan U Sreenivasan <ma...@collab.net>.
On Wed, 26 Jul 2006 01:55:49 +0530, David Glasser <gl...@mit.edu> wrote:

> If you do something like:
>
>   svn mkdir dir-should-be-file
>   svn ci -m "make dir"
>   svn rm dir-should-be-file
>   svn ci -m "oops, should be file"
>   touch dir-should-be-file
>   svn add dir-should-be-file
>
> you get the error:
>   svn: Can't replace 'dir-should-be-file' with a node of a differing
> type; commit the deletion, update the parent, and then add
> 'dir-should-be-file'
>
> When I came across this, I was pretty confused at first, since the
> first thing it tells me to do is commit the deletion, and I already
> did that.  Attached is a patch which changes the message slightly to
> hopefully make it more clear that you might have done the first step
> but not the second.
>
> I can imagine that there's an even better way of wording this, and as
> eh mentioned on IRC, it would better to just add the functionality;
> this is a small improvement anyway.
>
> [[[
> * subversion/libsvn_wc/adm_ops.c
>   Clarify node type change error message to not imply that the next step
>   must be to "commit the deletion", which may have already occured.

[snip]

Please specify the function name in the log.

Also, the new message extends the line to beyond 80 characters. I think  
this should be fixed.

Regards,
Madan U S
www.symonds.net/~madan

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

Re: [PATCH] clarify error message in svn add

Posted by Julian Foad <ju...@btopenworld.com>.
David Glasser wrote:
> * subversion/libsvn_wc/adm_ops.c
>  Clarify node type change error message to not imply that the next step
>  must be to "commit the deletion", which may have already occured.

Thanks.  Committed in r20885.

- Julian

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