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

Re: problem when moving a directory under SVN control

From: James Wilson <jrguitar21_at_gmail.com>
Date: Sat, 19 Jan 2008 19:30:27 -0500

I find Tortoise's Repo Browser the best tool to move folders and
reorganize. Here I'm assuming you want to move a folder to a new
location, keeping the same name of the original folder. Theres two
ways in the Repo Browser to do this. In both cases, you'll need to
first ensure the new_location/ folder exists. (eg Create folder >
specify file name "new_location" ).

1) drag and drop the existing folder to the new_location/
2) right click the original folder and "copy to.." the new folder,
then delete the original folder.

Finally, go back to your local version and do an update, and continue editing.

Now, that being said, it doesn't solve your situation. You've
already moved the folder locally and (possibly) made changes to the
contained files locally. Then you'll need to:

1) make a backup (zip) of your folder you moved in your local version
(scripts, in this case). Be sure when you make the zip, the .svn
folder DOES NOT get included. By default the windows zip doesnt
include hidden files but other apps like winzip and winrar do, so be
careful. (Right click on folder > Send To... > Compressed (zipped)
folder. Move the zip somewhere outside your project.
2) delete the moved folder.
3) go back to main folder and instead of trying to commit, do an
update (this effectively restores the moved folder to its original
location again, and cleans up the general state of your local copy).
4) go follow the instructions (above) to move the folder on the
remote server using in the Repo Browser to its new_location/.
5) execute another update on your local version to get the new_location/folder/
6) extract your backup into the new location, and commit the changed
files within.

If you didn't make any changes to the files then step 1 and 6 aren't necessary.

The reason (more or less) you get problems is because if you move a
folder (already under revision control) into another folder in your
project without doing it the SVN way, then the ".svn" folder gets
moved with it, and it is still trying to commit to the original
location on the repository (which you are also trying to delete at the
same time).

On Jan 19, 2008 6:51 PM, <msorens_at_softhome.net> wrote:
> I moved a directory 'scripts' that was at main/scripts to
> main/webpages/scripts but I suspect I did not do it properly. I did the move
> a couple weeks ago and just noticed the following issues when I went to
> commit any uncommitted work.
> Right-clicking on main and selecting SVN Commit shows
> scripts--deleted
> webpages/scripts--added
> plus one file under webpages/scripts that has been modified.
> If I try to commit all 3 of those, it says:
> "Working copy .../main locked; please execute the cleanup command".
> When I execute the cleanup command, it says "Subversion reported an error
> while doing a cleanup! In directory ...\webpages\scripts
> Error processing ccommand 'committed' in ...\webpages\scripts
> Working copy ...\webpages locked."
> I then went into the repo-browser and deleted the ...\scripts directory to
> see if that was related but apparently not, since the error still appears.
> How could I truly clean this up?
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_tortoisesvn.tigris.org
> For additional commands, e-mail: users-help_at_tortoisesvn.tigris.org

To unsubscribe, e-mail: users-unsubscribe_at_tortoisesvn.tigris.org
For additional commands, e-mail: users-help_at_tortoisesvn.tigris.org
Received on 2008-01-20 01:30:39 CET

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

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