Moving Shared Project to New Repository

If you are having a problem using Vault, post a message here.

Moderator: SourceGear

Post Reply
sstough
Posts: 4
Joined: Mon Jan 10, 2011 1:43 pm

Moving Shared Project to New Repository

Post by sstough » Mon Jan 10, 2011 1:57 pm

I had a project, Project A, in Repository 1 that I created a share of called Project B-Share.

I wanted to move Project A into Repository 2 without the share.
Here's what I did:
1. Deleted Project B-Share, which appeared to have broken the share in Repository 1
2. Exported Project A from Repository 1
3. Imported Project A into Repository 2.
4. Created a branch of Project A, Project A-Branch, in Repository 2.
5. Set the working folder for Project A to c:\dev\Project A and the working folder for the branch to c:\dev\Project A-Branch.

This all seemed to be fine until I went to work on both Project A and Project A-Branch separately. I opened Project A and checked out a file. Then I opened Project A-Branch and the file I checked out in Project A shows 'checked out by another user' in the branch project. It's as if the share wasn't really broken. I followed the same steps with a different project that wasn't initially shared and the check-out process works as expected.

Why is that file showing checked out by another user? Did I not truly delete the share?

Thanks.
sstough

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: Moving Shared Project to New Repository

Post by Beth » Mon Jan 10, 2011 4:00 pm

Are you working in Visual Studio? If so, the bindings are hard coded to the .sln and project files. When you branched, you just made a copy of the same bindings. You will want to perform a fresh Open from Source Control or Open from Vault on the branch depending on if you are using the Vault Classic Client or Vault Enhanced Client.
Beth Kieler
SourceGear Technical Support

sstough
Posts: 4
Joined: Mon Jan 10, 2011 1:43 pm

Re: Moving Shared Project to New Repository

Post by sstough » Tue Jan 11, 2011 2:23 pm

I'm using VS 2008 and I actually DID open both Project A and Project A-Branch the way you mentioned through Open from Source Control. Sorry I didn't mention that detail.

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: Moving Shared Project to New Repository

Post by Beth » Tue Jan 11, 2011 2:42 pm

If the Open from Source Control didn't change the bindings, then with your project open, go to File - Source Control - Change Source Control. Select all lines in the window that comes up, click Unbind, then Ok. Then click Save All. Return to the Change Source Control window and select a line that is not the solution file. The line you select should be a project. Then click Bind. Another window will open to allow you to select the proper location to bind to. Bind each line in this way, but bind the solution file last. If each line has a status of valid, then click OK, and check in any changes to the.sln or project files.
Beth Kieler
SourceGear Technical Support

sstough
Posts: 4
Joined: Mon Jan 10, 2011 1:43 pm

Re: Moving Shared Project to New Repository

Post by sstough » Wed Jan 12, 2011 8:30 am

I tried those steps and still had the problem, so I started over again with the new repository.

1. Imported Project A into new repository
2. Set working folder and did Get Latest from Vault
3 Opened the solution file directly from Windows Explorer
4. Went through your binding steps to bind to Project A's folder in Vault and received the following:
The file in your project or solution may be different than those in the location you are binding to. What would you like to do about the local files that differ from their server versions?

x Protect these files against unwanted overwrites
Allow these files to be replaced by their server versions


I selected "Protect these files against unwanted overwrites" and then received this:

Some items at the new binding have different contents on your local disk than in the newly bound database. You should consult your administrator. Get Latest Version command may be able to resolve these issues, but you should exercise caution as this may cause you to lose any changes you have made.

I clicked OK to All.

5. Created my Project A-Branch
6. Set working folder to new directory
7. Get Latest of branch from Vault
8. Opened the solution file directly from Windows Explorer
9. Went through your binding steps to bind to branch folder in Vault and received the following:
The file in your project or solution may be different than those in the location you are binding to. What would you like to do about the local files that differ from their server versions?

x Protect these files against unwanted overwrites
Allow these files to be replaced by their server versions


I select "Protect these files against unwanted overwrites" and then received this:


Some items at the new binding have different contents on your local disk than in the newly bound database. You should consult your administrator. Get Latest Version command may be able to resolve these issues, but you should exercise caution as this may cause you to lose any changes you have made.

I clicked OK to All.

Note: I was never asked to Check In anything in either project.
10. Closed both soltuions.
11. I verified that both Project A and Project A-Branch still had the correct working folders in Vault
12. Found that all source control type files (.vssscc, .vspscc) and .vbproj files are now renegades in both projects in Vault.
13. Difference showed that nothiing was different
14. Get Latest of all Renegade files and forced Overwrite in both projects
15. Opened Project A and Checked Out files
16. Opened Project A-Branch and both files I checked out from Project A STILL show locked by another user.

I will try these steps all over again, but this time selecting "Allow these files to be replaced by their server versions" after I change the bindings. That doesn't seem like the correct response to the question, but clearly the default response didn't work.

I think the lack of anything being checked in is the problem. By overwriting the renegade files with those from Vault I believe I undid the bindings I just set.

What do you think? Do you see anything wrong in these steps?

sstough
Posts: 4
Joined: Mon Jan 10, 2011 1:43 pm

Re: Moving Shared Project to New Repository

Post by sstough » Wed Jan 12, 2011 9:23 am

This time it works, Beth.

Instead of overwriting the Renegade files, I just checked them out without overwrite. Then I checked the updated files back into their respective projects. That did the trick.

I can't thank you enough for your help, but thank you anyway.

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: Moving Shared Project to New Repository

Post by Beth » Wed Jan 12, 2011 10:35 am

Thank you for the update. I'm happy to hear you are working again.
Beth Kieler
SourceGear Technical Support

Post Reply