You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Josef Wolf <jw...@raven.inka.de> on 2002/07/21 09:29:21 UTC

Is this a bug?

The following seems to be a bug:

   jw@raven:~> svn cp http://svn.collab.net/repos/svn/trunk xx
   A  xx/CHANGES
   [ ... ]
   A  xx/packages/rpm/.rpmmacros
   _U xx
   Checked out revision 2603.
   
   /home/jw/subvers/src/svn/subversion/libsvn_wc/entries.c:625
   svn_error: #21041 : <Path is not a working copy directory>
     svn_wc_entry: . is not a working copy directory
   jw@raven:~>


BTW: when "svn cp" is invoked with only one argument, the error
     message is printed _twice_. Is this supposed to be that way?

-- 
-- Josef Wolf -- jw@raven.inka.de --

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

Re: Is this a bug?

Posted by Karl Fogel <kf...@newton.ch.collab.net>.
mark benedetto king <bk...@inquira.com> writes:
> > 1) bomb out early
> > 
> > or
> > 
> > 2) do exactly what svn export does
> > 
> > Rationale for 2) is this:  svn cp should get the contents of the files
> > from URL, but transfer version control to that of the destination,
> > right?  So in the case where the destination is not version
> > controlled, you should just get the files without version control.
> 
> There's another option, which is to skip the "add" phase, and let
> "svn cp" *replace* "svn co".  Aren't mostly orthogonal file-system
> analog operations nice?
> 
> I suggested this a few days ago, but my suggestion was met with
> no reponse.

We may eventually want to do that, yeah.  For now, that's too big a
change, both interface-wise and code-wise, so IMHO solution (1) is the
way to go.

I do think we should flesh the proposal out a bit (on this list) more
before filing it as an Enhancement issue.

-K

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

Re: Is this a bug?

Posted by mark benedetto king <bk...@inquira.com>.
On Sun, Jul 21, 2002 at 04:15:08PM +0200, Marcus Comstedt wrote:
> 
> Marcus Comstedt <ma...@mc.pp.se> writes:
> 
> > So in this case the error message is correct.  '.' isn't a working
> > copy directory.  Question is, if that's a problem, shouldn't the
> > command fail _before_ writing all the files to foobar?  And if it
> > isn't a problem (foobar seems to become a proper wc dir), then there
> > shouldn't be an angry message about it.
> 
> Hm, when I think about it a little more, I can see two correct ways of
> handling svn cp to a non-wc:
> 
> 1) bomb out early
> 
> or
> 
> 2) do exactly what svn export does
> 
> Rationale for 2) is this:  svn cp should get the contents of the files
> from URL, but transfer version control to that of the destination,
> right?  So in the case where the destination is not version
> controlled, you should just get the files without version control.
> 
> 

There's another option, which is to skip the "add" phase, and let
"svn cp" *replace* "svn co".  Aren't mostly orthogonal file-system
analog operations nice?

I suggested this a few days ago, but my suggestion was met with
no reponse.

--ben


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

Re: Is this a bug?

Posted by Marcus Comstedt <ma...@mc.pp.se>.
Garrett Rooney <ro...@electricjellyfish.net> writes:

> i'd say it should bomb out early.  if you want to export, you should
> use export.  overloading the meaning of copy just leads to a confusing
> interface. 

Yeah, the ideal behaviour would probably be to bomb out early with an
error message suggesting thay maybe you meant `export'.


  // Marcus



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

Re: Is this a bug?

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On Sun, Jul 21, 2002 at 04:15:08PM +0200, Marcus Comstedt wrote:
> 
> Marcus Comstedt <ma...@mc.pp.se> writes:
> 
> > So in this case the error message is correct.  '.' isn't a working
> > copy directory.  Question is, if that's a problem, shouldn't the
> > command fail _before_ writing all the files to foobar?  And if it
> > isn't a problem (foobar seems to become a proper wc dir), then there
> > shouldn't be an angry message about it.
> 
> Hm, when I think about it a little more, I can see two correct ways of
> handling svn cp to a non-wc:
> 
> 1) bomb out early
> 
> or
> 
> 2) do exactly what svn export does
> 
> Rationale for 2) is this:  svn cp should get the contents of the files
> from URL, but transfer version control to that of the destination,
> right?  So in the case where the destination is not version
> controlled, you should just get the files without version control.

i'd say it should bomb out early.  if you want to export, you should
use export.  overloading the meaning of copy just leads to a confusing
interface. 

-garrett

-- 
garrett rooney                    Remember, any design flaw you're 
rooneg@electricjellyfish.net      sufficiently snide about becomes  
http://electricjellyfish.net/     a feature.       -- Dan Sugalski

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

Re: Is this a bug?

Posted by Marcus Comstedt <ma...@mc.pp.se>.
Marcus Comstedt <ma...@mc.pp.se> writes:

> So in this case the error message is correct.  '.' isn't a working
> copy directory.  Question is, if that's a problem, shouldn't the
> command fail _before_ writing all the files to foobar?  And if it
> isn't a problem (foobar seems to become a proper wc dir), then there
> shouldn't be an angry message about it.

Hm, when I think about it a little more, I can see two correct ways of
handling svn cp to a non-wc:

1) bomb out early

or

2) do exactly what svn export does

Rationale for 2) is this:  svn cp should get the contents of the files
from URL, but transfer version control to that of the destination,
right?  So in the case where the destination is not version
controlled, you should just get the files without version control.


  // Marcus



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

Re: Is this a bug?

Posted by Marcus Comstedt <ma...@mc.pp.se>.
Ben Collins-Sussman <su...@collab.net> writes:

> How do you make this happen?  It seems to work fine for me in r2591:
> 
> $ svn cp file:///home/sussman/projects/test/repo/A/D wc/A/C
                                                       ^^
[...]

> By the way... I hope you're not trying to do 'svn cp URL wc-path'
> where the URL and wc-path are from two different repositories.  That's
> guaranteed to fail when you try to commit.  :-)

I believe he's trying to do 'svn cp URL path' where path is not a
wc-path at all.  Like this:

pelix:~% ls .svn foobar
.svn: No such file or directory
foobar: No such file or directory
pelix:~% svn cp http://svn.collab.net/repos/svn/trunk/subversion/svnadmin foobar
A  foobar/main.c
A  foobar/svnadmin.h
A  foobar/svnadmin.dsp
A  foobar/svnadmin.1
A  foobar/shell.c
Checked out revision 2608.

subversion/libsvn_wc/entries.c:625
svn_error: #21044 : <Path is not a working copy directory>
  svn_wc_entry: . is not a working copy directory
pelix:~% 


So in this case the error message is correct.  '.' isn't a working
copy directory.  Question is, if that's a problem, shouldn't the
command fail _before_ writing all the files to foobar?  And if it
isn't a problem (foobar seems to become a proper wc dir), then there
shouldn't be an angry message about it.


  // Marcus



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

Re: Is this a bug?

Posted by Ben Collins-Sussman <su...@collab.net>.
Josef Wolf <jw...@raven.inka.de> writes:

> The following seems to be a bug:
> 
>    jw@raven:~> svn cp http://svn.collab.net/repos/svn/trunk xx
>    A  xx/CHANGES
>    [ ... ]
>    A  xx/packages/rpm/.rpmmacros
>    _U xx
>    Checked out revision 2603.
>    
>    /home/jw/subvers/src/svn/subversion/libsvn_wc/entries.c:625
>    svn_error: #21041 : <Path is not a working copy directory>
>      svn_wc_entry: . is not a working copy directory
>    jw@raven:~>

How do you make this happen?  It seems to work fine for me in r2591:

$ svn cp file:///home/sussman/projects/test/repo/A/D wc/A/C
A  wc/A/C/D/gamma
A  wc/A/C/D/G
A  wc/A/C/D/G/rho
A  wc/A/C/D/G/pi
A  wc/A/C/D/G/tau
A  wc/A/C/D/H
A  wc/A/C/D/H/chi
A  wc/A/C/D/H/omega
A  wc/A/C/D/H/psi
Checked out revision 1.
A         wc/A/C/D

$ svn st wc
A  +   wc/A/C/D


By the way... I hope you're not trying to do 'svn cp URL wc-path'
where the URL and wc-path are from two different repositories.  That's
guaranteed to fail when you try to commit.  :-)

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