Moving Shared Project to New Repository
Moderator: SourceGear
Moving Shared Project to New Repository
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
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
Re: Moving Shared Project to New Repository
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
SourceGear Technical Support
Re: Moving Shared Project to New Repository
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.
Re: Moving Shared Project to New Repository
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
SourceGear Technical Support
Re: Moving Shared Project to New Repository
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?
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?
Re: Moving Shared Project to New Repository
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.
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.
Re: Moving Shared Project to New Repository
Thank you for the update. I'm happy to hear you are working again.
Beth Kieler
SourceGear Technical Support
SourceGear Technical Support