You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by William Uther <wi...@cs.cmu.edu> on 2002/06/21 01:36:05 UTC

Is this supposed to work?

Hi,
  Is this supposed to work, or is it one of those "we don't handle this"
cases:

svn mv b c; svn mv a b

I've included sample output below (with a svn built this week, not sure of
the exact revision).

Keep up the good work :),

\x/ill         :-}

% mkdir svntest
[will@BATFISH:~:Thu 20, 9:26PM]
% svnadmin create repos
[will@BATFISH:~:Thu 20, 9:26PM]
% svn co file://`pwd`/repos -d root
Checked out revision 0.
[will@BATFISH:~:Thu 20, 9:26PM]
% cd root
[will@BATFISH:~/root:Thu 20, 9:27PM]
% touch a b
[will@BATFISH:~/root:Thu 20, 9:27PM]
% svn add a b
A         a
A         b
[will@BATFISH:~/root:Thu 20, 9:27PM]
% svn commit a -m "adding A"
Adding         a
Transmitting file data .
Committed revision 1.
[will@BATFISH:~/root:Thu 20, 9:27PM]
[will@BATFISH:~/root:Thu 20, 9:27PM]
[will@BATFISH:~/root:Thu 20, 9:27PM]
% svn commit b -m "adding B"
Adding         b
Transmitting file data .
Committed revision 2.
[will@BATFISH:~/root:Thu 20, 9:27PM]
% svn mv b c
A         c
D  b
[will@BATFISH:~/root:Thu 20, 9:27PM]
% svn mv a b

subversion/libsvn_subr/io.c:205
apr_error: #13, src_err 0 : <Permission denied>
  svn_io_copy_file: copying .svn/text-base/a.svn-base to
.svn/text-base/b.svn-base
[will@BATFISH:~/root:Thu 20, 9:28PM]
% ls -la
total 0
drwxr-xr-x   6 will  staff   160 Jun 20 21:28 .
drwxr-xr-x  71 will  staff  2370 Jun 20 21:26 ..
drwxr-xr-x  12 will  staff   364 Jun 20 21:27 .svn
-rw-r--r--   1 will  staff     0 Jun 20 21:27 a
-rw-r--r--   1 will  staff     0 Jun 20 21:28 b
-rw-r--r--   1 will  staff     0 Jun 20 21:27 c


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

Re: Is this supposed to work?

Posted by Kevin Pilch-Bisson <ke...@pilch-bisson.net>.
On Thu, Jun 20, 2002 at 09:36:05PM -0400, William Uther wrote:
> Hi,
>   Is this supposed to work, or is it one of those "we don't handle this"
> cases:
> 
> svn mv b c; svn mv a b

Not sure whether it should work or not, but Sander and I were thinking of some
of these types of problems a while back on IRC.  The problem is that we are
trying to overwrite the text-base for the file.  Even if permission wasn't
denied it would be a problem, because it would then become a non-revertable
change.  

I don't know how committed to the idea that all local mods should be
revertable with svn revert (although personally I think it is awesome!).  To
do it however, there are at least a couple of cases where the likely only way
to do it is to change the text-bases to use a unique id for the file name, and
store that id in the entries file.  This would be actually not be that big a
change to libsvn_wc, since there are already functions to retrieve the
text-base version's name, but it would be big, and would impact performance,
since it would mean a bunch more entries parsing (which is already ~70% of
client time during a checkout).
> 
> I've included sample output below (with a svn built this week, not sure of
> the exact revision).
> 
> Keep up the good work :),
> 
> \x/ill         :-}
>
> snip

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Kevin Pilch-Bisson                    http://www.pilch-bisson.net
     "Historically speaking, the presences of wheels in Unix
     has never precluded their reinvention." - Larry Wall
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Re: Is this supposed to work?

Posted by Ben Collins-Sussman <su...@collab.net>.
William Uther <wi...@cs.cmu.edu> writes:

> Hi,
>   Is this supposed to work, or is it one of those "we don't handle this"
> cases:
> 
> svn mv b c; svn mv a b

Remember that 'mv' == 'cp (add) + rm'.

This is a bug (?) that I discovered a couple weeks ago.  Well, I think
it's a bug.  The simpler form of this problem is:

$ svn rm b;  svn cp a b

subversion/libsvn_subr/io.c:205
apr_error: #13, src_err 0 : <Permission denied>
  svn_io_copy_file: copying .svn/text-base/a.svn-base to .svn/text-base/b.svn-base

That's the *real* bug.  Something silly with read-only textbases.  I'm
not sure I understand why we're trying to copy a's text-base on top of
b's text-base at all?  If we allowed this to happen, the 'rm' wouldn't
be revertible...

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