You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by John Szakmeister <jo...@szakmeister.net> on 2005/02/26 22:26:46 UTC

Causing export to fail on nonexistant or unversioned targets.

r13151 made the export code stop walking the working copy area, and start 
using the administrative information instead to do the export.  With 
that, we can no error out on targets that are either unversioned, or 
don't exist (whereas we just silently skipped over them before).  My 
question to the community is should we do that?  Right now, if you try 
export a bogus directory (i.e., 'svn export /path/to/wc/bogus-dir'), it 
simply comes back and says it was successful.  I think it should return 
an error ('bogus-dir' is unversioned or doesn't exist).  I believe this 
would be a change to the way the command line tool works, so I held back 
making that change until we reached a consensus about whether or not it 
was a 'bug' that needed to be fixed.

Thanks!

-John

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

Re: Causing export to fail on nonexistant or unversioned targets.

Posted by kf...@collab.net.
John Szakmeister <jo...@szakmeister.net> writes:
> Thanks.  I've got patches in my working copy for this, and I'm putting 
> together a couple of test for these conditions as well.  I hope to have 
> them committed by tomorrow night.
> 
> Here's another thought.  What if a file or directory is missing?  In both 
> cases (before my fix and after it), we'd skip right over a missing 
> directory or file.  It seems to me that if the idea is to export a tree, 
> then we should probably error out when part of the tree is unknowingly 
> absent.  Any thoughts about that?

Agreed.

If it were 'svn rm'd, that would be different.  But missing?  That's
just an error in the source data, like doing plain 'cp' and
discovering a corrupted inode.

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

Re: Causing export to fail on nonexistant or unversioned targets.

Posted by John Szakmeister <jo...@szakmeister.net>.
On Sunday 27 February 2005 15:02, kfogel@collab.net wrote:
> John Szakmeister <jo...@szakmeister.net> writes:
> > r13151 made the export code stop walking the working copy area, and
> > start using the administrative information instead to do the export. 
> > With that, we can no error out on targets that are either
> > unversioned, or don't exist (whereas we just silently skipped over
> > them before).  My question to the community is should we do that? 
> > Right now, if you try export a bogus directory (i.e., 'svn export
> > /path/to/wc/bogus-dir'), it simply comes back and says it was
> > successful.  I think it should return an error ('bogus-dir' is
> > unversioned or doesn't exist).  I believe this would be a change to
> > the way the command line tool works, so I held back making that
> > change until we reached a consensus about whether or not it was a
> > 'bug' that needed to be fixed.
>
> IMHO, we can consider it a bug when we fail to error on an explicitly
> named target that we cannot meaningfully process.  So your proposed
> change (to return an error saying that bogus-dir is unversioned or
> doesn't exist) seems right, and doesn't raise any compatibility
> concerns in my mind at least.

Thanks.  I've got patches in my working copy for this, and I'm putting 
together a couple of test for these conditions as well.  I hope to have 
them committed by tomorrow night.

Here's another thought.  What if a file or directory is missing?  In both 
cases (before my fix and after it), we'd skip right over a missing 
directory or file.  It seems to me that if the idea is to export a tree, 
then we should probably error out when part of the tree is unknowingly 
absent.  Any thoughts about that?

-John

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

Re: Causing export to fail on nonexistant or unversioned targets.

Posted by kf...@collab.net.
Julian Foad <ju...@btopenworld.com> writes:
> While you're at it, am I sane in wanting "svn status blah" to return
> some error or status code when "blah" is both unversioned and not on
> the disk?  (It is silent, which implies to me that "blah" is versioned
> and present and unmodified.)

Huh.

That sounds sane to me.  Some little voice at the back of my head is
whispering that there's a reason we behave that way, but it's very
small and I can't hear it very clearly.  I think I'll ignore it.

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

Re: Causing export to fail on nonexistant or unversioned targets.

Posted by Julian Foad <ju...@btopenworld.com>.
> John Szakmeister <jo...@szakmeister.net> writes:
>> [Should "export"]  error out on targets that are either unversioned, or
>> don't exist (whereas we just silently skipped over them before)

kfogel@collab.net wrote:
> IMHO, we can consider it a bug when we fail to error on an explicitly
> named target that we cannot meaningfully process.  So your proposed
> change (to return an error saying that bogus-dir is unversioned or
> doesn't exist) seems right, and doesn't raise any compatibility
> concerns in my mind at least.

While you're at it, am I sane in wanting "svn status blah" to return some error 
or status code when "blah" is both unversioned and not on the disk?  (It is 
silent, which implies to me that "blah" is versioned and present and unmodified.)

- Julian

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

Re: Causing export to fail on nonexistant or unversioned targets.

Posted by kf...@collab.net.
John Szakmeister <jo...@szakmeister.net> writes:
> r13151 made the export code stop walking the working copy area, and start 
> using the administrative information instead to do the export.  With 
> that, we can no error out on targets that are either unversioned, or 
> don't exist (whereas we just silently skipped over them before).  My 
> question to the community is should we do that?  Right now, if you try 
> export a bogus directory (i.e., 'svn export /path/to/wc/bogus-dir'), it 
> simply comes back and says it was successful.  I think it should return 
> an error ('bogus-dir' is unversioned or doesn't exist).  I believe this 
> would be a change to the way the command line tool works, so I held back 
> making that change until we reached a consensus about whether or not it 
> was a 'bug' that needed to be fixed.

IMHO, we can consider it a bug when we fail to error on an explicitly
named target that we cannot meaningfully process.  So your proposed
change (to return an error saying that bogus-dir is unversioned or
doesn't exist) seems right, and doesn't raise any compatibility
concerns in my mind at least.




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