Checkout appears twice in Pending Change Set

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

Moderator: SourceGear

Post Reply
stanyork
Posts: 21
Joined: Thu Apr 30, 2009 5:09 pm

Checkout appears twice in Pending Change Set

Post by stanyork » Thu Aug 19, 2010 11:04 am

[8/19/2010 8:56:33 AM] Version Check: This Vault client is version 5.0.4.18845
[8/19/2010 8:56:33 AM] Version Check: Your Vault server is version 5.0.4.18845

Certainly not urgent, just messy….

I am fairly certain this was caused by branching a shared file while it was checked out. I do this often, but generally I split the branch from the side of the share that was not checked out. Different working folder, etc.

So, here are the steps:

1) Check out a file in VS2008 and make changes
2) Observe in vault the file is checked out and modified and shared
3) Branch
4) Observe in Vault the file is now renegade.
5) Observe the other side of the branch is “checked out”, but not really (menu offers check out, not check in or undo) . I would love to undo, but can’t
6) Manage to iterate and get new version checked in on the new side.
7) Observe the other side is still checked out.
8) Observe that if you check the file out again on the new side, it shows up twice in the Pending Change Set
9) Delete the files from the old side of the branch.
10) Reshare from the new side to the old
11) Unshare from the old side
12) Use the history to roll back the old side to the correct prior version.
13) Re-checkout the new side….still shows up twice in the pending change set

Check ins seem to work fine – just shows up twice in the pending change set while checked out.

I managed to do this to a second file….

I’m thinking there is an orphan record for the “lost” checkout before the original branch and that the orphan record is causing the duplicate through a JOIN.

Sorry for the mess. Any idea how to clean this up?

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

Re: Checkout appears twice in Pending Change Set

Post by Beth » Thu Aug 19, 2010 4:07 pm

It sounds like after branching that you need to reset your bindings on the new project. Try the following:

1) Prior to branching, close Visual Studio.
2) Perform the branch.
3) Get the branch to disk, but not to the same location as it was branched from.
4) Open the branch.
5) Rebind the branch.
  • a) Go to File - Source Control - Change Source Control, or File - Vault Source Control - Change Vault Bindings. Which path you have depends on whether you are using the Vault Classic Client or Vault Enhanced Client.
    b) Select all lines in the window that opens and click Unbind.
    c) Click OK and Save All.
    d) Go to File - Vault Source Control - Change Vault Bindings or Vault Source Control - Change Vault Bindings.
    e) Select one line and click Bind.
    f) When the binding window opens, select the folder that element resides in and click OK.
    g) Check that the status for that line is Valid.
    h) Repeat on each line. When all are Valid, click OK.
6) Check in the changes to the .sln and project files.

Now you can either work in the branch, or open the original location to continue your work there.
Beth Kieler
SourceGear Technical Support

stanyork
Posts: 21
Joined: Thu Apr 30, 2009 5:09 pm

Re: Checkout appears twice in Pending Change Set

Post by stanyork » Mon Aug 23, 2010 9:55 am

Tried rebinding the project. Did not change anything.

To help clarify, I have included an image. There are many files in the project, but the "double checkout" only occurs for two specific files (one shown) -- the two "broken" files are the ones that I branched "backwards" from the rest. The image shows one okay and one broken.

So, in the image you see both dbDropDown.vb and BaseGrid are checked out. Both were shared in their past (with sfPMS_Root_v4p0/WebControls/DBControls). dbDropDown was branched "correctly": while checked out in sfPM_Root, I find the file in the sfPMS_Root_v4p0 project and branch. That side then becomes "not checked out" and everything stays great.

My slip-up for the two "broken" files (including BaseGrid.vb) was that I branched in Vault using the actual currently-checked-out side (sfPM_Root). This made the file I was working on no longer be checked out (renegade in fact) and left the version in sfPMS_Root_v4p0/WebControls/DBControls sort of checked out visually, but the right click context menu didn't think so. It was easy to fix the renegade – but eventually to fix the sfPMS_Root_v4p0/WebControls/DBControls side I deleted the file and readded (by re-sharing and re-branching correctly).

Henceforth, every checkout for the two “bad” files is listed twice. The double-listing occurs whether I check the file out in VS2008 or in Vault.
Attachments
vaultdc.png
image shoing symptom in vs and vault
vaultdc.png (143.66 KiB) Viewed 5797 times

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Re: Checkout appears twice in Pending Change Set

Post by lbauer » Mon Aug 23, 2010 2:52 pm

Vault thinks the formerly shared file is still checked out. I was able to reproduce this based on your steps above.
I've logged this behavior as bug 15530.
Observe the other side of the branch is “checked out”, but not really (menu offers check out, not check in or undo) .
To fix the problem, undo the checkout of the file that was branched, and/or the file that's "not really checked out" using the Vault Admin Web Client. This setting is in the Admin Web Client under Source Control Repositories->(Repository name)->Undo Checkout. You may need to undelete the file to do this.
Linda Bauer
SourceGear
Technical Support Manager

stanyork
Posts: 21
Joined: Thu Apr 30, 2009 5:09 pm

Re: Checkout appears twice in Pending Change Set

Post by stanyork » Mon Aug 23, 2010 4:09 pm

Thanks, this did the trick.

And, FWIW, it was not necessary to undelete the file first.

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Re: Checkout appears twice in Pending Change Set

Post by lbauer » Mon Aug 23, 2010 4:18 pm

Glad that worked for you. We hope to fix the bug in a future release.
Linda Bauer
SourceGear
Technical Support Manager

Post Reply