Shared file is not on latest version

This forum is now locked, since Gold Support is no longer offered.

Moderator: SourceGear

Locked
kasti
Posts: 108
Joined: Tue Apr 20, 2004 4:21 am
Location: Austria

Shared file is not on latest version

Post by kasti » Tue Feb 21, 2006 4:05 am

Hi,

I have a problem that a "get latest version" of a shared file does not return the latest version of the file.

Let me try and give an example:

ProjectA
---- fileA


ProjectB
---- fileA (shared from projectA)


In ProjectA, fileA was checked in. Its remote version has increased, getting the file from ProjectA will yield the correct latest version. However, getting fileA from ProjectB will yield the previous version.

Other info:

1. There are no pins involved on fileA (or parent project) that I can see
2. Showing the history of fileA in ProjectB will show all changes to fileA. Getting the latest version in the show history dialog will return the correct latest version.

3. Remote Version of fileA is different in ProjectA and ProjectB
4. Pinning fileA in projectB and unpinning it again will increase the remote Version to the correct latest one. A subsequent get will then retrieve the latest version.


Thanks,
Herbert.

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

Post by lbauer » Tue Feb 21, 2006 8:35 am

What version of Vault are you using? Are you seeing this in the Vault GUI Client or when using Visual Studio?

If you're using Visual Studio, what version?
Linda Bauer
SourceGear
Technical Support Manager

kasti
Posts: 108
Joined: Tue Apr 20, 2004 4:21 am
Location: Austria

Post by kasti » Tue Feb 21, 2006 9:09 am

Oops, sorry, version 3.1.5. Only using GUI client, never VS integration.

Thanks,
Herbert.

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

Post by lbauer » Tue Feb 21, 2006 10:48 am

This might be an easy fix:

First, back up your database.

Next, delete the file with the version problem. Then undelete it.
Linda Bauer
SourceGear
Technical Support Manager

kasti
Posts: 108
Joined: Tue Apr 20, 2004 4:21 am
Location: Austria

Post by kasti » Thu Feb 23, 2006 4:05 am

Thanks for the help, it is a bit tough since this happened with many files and they are shared to many locations.

I think we know how to reproduce this though, we did something a bit strange that older versions of vault obviously "handled" in our favour, but the latest one does not:

LibA
---- Source
----------Debug
--------------fileA
---- exports
----------LibA
--------------fileA (shared from Debug)

We have got the above structure and a script that
1. gets latest version LibA
2. Builds LibA
3. commits LibA (CVS style)

So we guess the problem is as follows:

fileA in Debug is new after the build in Step2, fileA in exports\LibA however is still the old version on the build PC. So committing this shared file (at different versions) in 1 transaction most likely causes the problem.


Bye,
Herbert.

dan
Posts: 2448
Joined: Wed Dec 17, 2003 5:03 pm
Location: SourceGear
Contact:

Post by dan » Thu Feb 23, 2006 7:36 am

If you try to check in the same file twice in the same transaction (which includes different share links of the same file), it should fail on the commit with the error message: "A modification to this item was requested earlier in the same transaction"

Are you saying the checkin succeeds if you include both $/LibA/Source/Debug/fileA and $/LibA/exports/LibA/fileA, and fileA is shared to both folders? Can you double check that perhaps fileA's share links actually point someplace else? (see the file properties, Share Links tab).

Locked