Sponsors

News

Jobping Laurent Kempé MVP JetBrains Academy Member Certified ScrumMaster

Contact

My status

View Laurent Kempé's profile on LinkedIn
XING
twitter
facebook


Xbox 360



Map

Locations of visitors to this page

.NET Dudes

Family

French .NET Dudes

Friends

Jobping

Links

Tech Head Brothers

VisualSvn, TortoiseSvn and relocating a working copy

Whenever you have to relocate your svn working copy because the svn server url or protocol as changed, you need to use TortoiseSvn relocate. If, like me, you use VisualSvn plugin then you would need to quit Visual Studio and come back to Windows Explorer and TortoiseSvn, right click your project folder then find Relocate command:

4311387612_f21c311484_o[1]

Type in the dialog which open the new url of the svn repository, then click Ok.

TortoiseSvn will then do it works and the next time you open Visual Studio you will have your working copy pointing to the new server.

Read the documentation on the following page:

If your repository has for some reason changed it's location (IP/URL). Maybe you're even stuck and can't commit and you don't want to checkout your working copy again from the new location and to move all your changed data back into the new working copy, TortoiseSVN → Relocate is the command you are looking for. It basically does very little: it scans all entries files in the .svn folder and changes the URL of the entries to the new value.

You may be surprised to find that TortoiseSVN contacts the repository as part of this operation. All it is doing is performing some simple checks to make sure that the new URL really does refer to the same repository as the existing working copy.

Warning

This is a very infrequently used operation. The relocate command isonly used if the URL of the repository root has changed. Possible reasons are:

  • The IP address of the server has changed.

  • The protocol has changed (e.g. http:// to https://).

  • The repository root path in the server setup has changed.

Put another way, you need to relocate when your working copy is referring to the same location in the same repository, but the repository itself has moved.

It does not apply if:

  • You want to move to a different Subversion repository. In that case you should perform a clean checkout from the new repository location.

  • You want to switch to a different branch or directory within the same repository. To do that you should use TortoiseSVN →Switch.... Read the section called “To Checkout or to Switch...” for more information.

If you use relocate in either of the cases above, it will corrupt your working copy and you will get many unexplainable error messages while updating, committing, etc. Once that has happened, the only fix is a fresh checkout.

Posted: Jan 28 2010, 12:04 PM by lkempe | with 4 comment(s)
Filed under:

Comments

Ivan Zhakov said:

You may use Disk Browser command in VisualSVN menu to open Windows Explorer.

# January 28, 2010 9:14 AM

lkempe said:

Ivan: Right ! But as I was not sure how VisualSvn will react to the relocation I preferred to close Visual Studio. And it works like that.

# January 28, 2010 10:05 AM

Ivan Zhakov said:

@lkempe: VisualSVN monitors solution folder for changes and will notice any changes even outside Visual Studio.

# January 31, 2010 4:14 PM

VisualSvn, TortoiseSvn and relocating a working copy | 007Nova Articles said:

Pingback from  VisualSvn, TortoiseSvn and relocating a working copy | 007Nova Articles

# February 8, 2010 3:31 PM
Leave a Comment

(required) 

(required) 

(optional)

(required)