[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Re[4]: Slow "move" discourages refactoring.

From: Francois Beausoleil <fbos_at_users.sourceforge.net>
Date: 2003-11-28 14:14:01 CET

On Fri, 28 Nov 2003 09:30:53 +0300, "Lev Serebryakov"
<lev@serebryakov.spb.ru> said:
> Hello, GMane!
> Friday, November 28, 2003, 2:57:40 AM, you wrote:
>
> G> It sounds like the refactoring that led to this problem is like
> renaming a
> G> Java package, which is a very significant operation.
> BTW, here is a problem. To rename Java or PErl package your need to
> MOVE it and CHANGE FILE. And these operations could not be performed in
> ONE step (revision) now :( So, atomic renaming of package is
> impossible...

Yes, it is possible. But the changes to the files must be done *after*
the move is completed. Idea does this. I don't know about Eclipse.
Remember that a move is an Add + Delete. If Eclipse modifies the file to
be deleted, I don't know if Subversion will copy the modified file
contents. Let's see:

C:\>svn --version
svn, version 0.33.1 (r7789)
   compiled Nov 18 2003, 22:27:18
[snip]

C:\>svnadmin create repos

C:\>svn co file:///repos wc
Checked out revision 0.

C:\>cd wc

C:\wc>echo >a.txt this is a test

C:\wc>svn add a.txt
A a.txt

C:\wc>svn ci -m "First version"
Adding a.txt
Transmitting file data .
Committed revision 1.

C:\wc>echo >>a.txt another test, to see if it works

C:\wc>svn move a.txt b.txt
svn: Attempting restricted operation for modified resource
svn: Use --force to override this restriction
svn: Move will not be attempted unless forced
svn: 'a.txt' has local modifications

C:\wc>svn move --force a.txt b.txt
A b.txt
D a.txt

C:\wc>type b.txt
 this is a test
 another test, to see if it works

So, it looks like the CLI does copy modified text, but will not do so by
default, requiring --force before attempting the operation.

>
> Are here any plans to remove this restriction in future? FS Dump
> can contain two entries for one file (node) in one revision : copy
> and change after that. So, it seems to be possible on low level. But
> svn complains about restricted operation :(

Probably the --force parameter that's missing.

>
> --
> Lev Serebryakov

Hope that helps !
François
Developer of Java Gui Builder
http://jgb.sourceforge.net/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Nov 28 14:14:50 2003

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.