You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Quentin Narferao <qn...@yahoo.com> on 2007/01/23 18:16:33 UTC

Subversion Copy (copied_from)

Hello again,

Info:
Sun Solaris SPARC 9
subversion-1.4.2 using standalone

I'm not entirely sure if this is a bug but it seems to me that it might be.

[repos]/dir1/dir2/file.txt

where dir1 is copied or moved to: /dirX
and the resulting subdirectories are also copied/moved so that the new access would be:
[repos]/dirX/dir2/file.txt

In the repository dirX will return the fact that it was copied (even if it was moved--that's possibly another bug) but everything below (dir2 and file.txt) will not report the fact that they were copied (or moved) from their original location under [repos]/dir1. This is according to fs.copied_from API (as seen through ViewVC and even the TortoiseSVN client show log feature).

Please note that files DO maintain the full history and that revisions prior to the revision where they were copied/moved indicate the original path, but the revision that they were actually copied/moved in does not contain the extra info about where it came from at that point (but the main directory does).

First of all, is this intended or is this a bug? I cannot see a reason that the files underneath the primary directory being copied/moved would gain a new revision number but not have the copied_from field present--especially given the fact that the primary directory that was the argument for the copy/move did receive this field.

The good news is that this isn't really a show stopper--showing the full log reveals the obviousness that the directory or files beneath the primary were in fact copied from another location originally (by noting that @rev-1 has a path field that differs from the current path), but I do believe it to be a bug that should be fixed someday unless there's a specific reason for it.

-Q





 
____________________________________________________________________________________
Looking for earth-friendly autos? 
Browse Top Cars by "Green Rating" at Yahoo! Autos' Green Center.
http://autos.yahoo.com/green_center/

Re: Subversion Copy (copied_from)

Posted by "B. Smith-Mannschott" <be...@gmail.com>.
On Jan 23, 2007, at 19:16, Quentin Narferao wrote:

> I'm not entirely sure if this is a bug but it seems to me that it  
> might be.
>
> [repos]/dir1/dir2/file.txt
>
> where dir1 is copied or moved to: /dirX
> and the resulting subdirectories are also copied/moved so that the  
> new access would be:
> [repos]/dirX/dir2/file.txt
>
> In the repository dirX will return the fact that it was copied  
> (even if it was moved--that's possibly another bug)

This is normal behavior.  The move (aka rename) operation is  
implemented as copy + delete.  See also <http://subversion.tigris.org/ 
issues/show_bug.cgi?id=898>

> but everything below (dir2 and file.txt) will not report the fact  
> that they were copied (or moved) from their original location under  
> [repos]/dir1. This is according to fs.copied_from API (as seen  
> through ViewVC and even the TortoiseSVN client show log feature).

That's because they have not been moved or copied.  The only thing  
that's happened is that dir1 has been renamed (to dirX).

> First of all, is this intended or is this a bug? I cannot see a  
> reason that the files underneath the primary directory being copied/ 
> moved would gain a new revision number but not have the copied_from  
> field present--especially given the fact that the primary directory  
> that was the argument for the copy/move did receive this field.

The revision number applies to the repository as a whole.  The  
revision number next to the entries shown in status is the revision  
of that item's last modification.

   alden:/tmp/r bsmith$ svn status --verbose
                 0        0  ?           .
                 1        1 bsmith       a
                 1        1 bsmith       a/b
                 1        1 bsmith       a/b/c

   alden:/tmp/r bsmith$ svn mv a z
   A         z
   D         a/b/c
   D         a/b
   D         a

   alden:/tmp/r bsmith$ svn ci -m '' .
   Deleting       a
   Adding         z

   Committed revision 2.

   alden:/tmp/r bsmith$ svn status --verbose
                 0        0  ?           .
                 2        2 bsmith       z
                 2        2 bsmith       z/b
                 2        2 bsmith       z/b/c


But, you are correct, the rename operation on appears to rewrite the  
subdirectories too, which is probably a symptom of the way that  
subversion works internally.

Perhaps perusing <http://svnbook.red-bean.com/nightly/en/svn.basic.in- 
action.html#svn.basic.in-action.wc.dia-1> near Figure 1.7 (section  
"Revisions") will shed some light.


// Ben

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