Converting Snapshots to Labels

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

Moderator: SourceGear

Post Reply
msauper
Posts: 17
Joined: Fri Jan 02, 2004 3:45 pm
Location: Philadelphia , USA (EST)
Contact:

Converting Snapshots to Labels

Post by msauper » Tue Feb 24, 2004 11:56 pm

Now that we have installed 2.0 and are comfortable with it, I'd like to convert our version Snapshots into Labels to improve the performance.

What I'd like to get is confirmation that the procedure I am going to do is correct.

Pre 2.0, we would label (now snapshot) the root directory of the solution whenever we distributed a new version of the software.

What I would like to do is as follows:

1. display a history of the root directory.
2. for each snapshot that shows, right click on that entry and create a label with the same name as the snapshot.
3. Delete all of the snapshots.
4. Obliterate all of the deleted snapshots.

Does this sound correct?

Best regards,

Metro.
Metro Sauper
President
Sauper Associates, Inc.
221 County House Road
Suite D
Sewell, NJ 08080

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

Post by dan » Wed Feb 25, 2004 8:19 am

Yes, that is correct, assuming you didn't modify the 1.x labels after you created them. If you did, then they are really branches rather than labels, and you would be out of luck, unless there is version in the trunk that matches the version in the branch - then you could use label promotion.

In any case, the basic procedure you outlined should work in the normal case.

msauper
Posts: 17
Joined: Fri Jan 02, 2004 3:45 pm
Location: Philadelphia , USA (EST)
Contact:

Post by msauper » Wed Feb 25, 2004 8:32 am

Dan,

Sure, that makes sense. Just to confirm, in the future, if we need to modify the solution at a particular label, we will be able to branch from the label?

Best regards,

Metro.
Metro Sauper
President
Sauper Associates, Inc.
221 County House Road
Suite D
Sewell, NJ 08080

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

Post by dan » Wed Feb 25, 2004 8:53 am

Yes, branching from a label is supported, as long as you don't promote the label. A branch has to be done at a specific version of a folder, and once you promote a label, it loses that association with a specific folder version (because the label will then contain items or versions that the folder version does not contain).

msauper
Posts: 17
Joined: Fri Jan 02, 2004 3:45 pm
Location: Philadelphia , USA (EST)
Contact:

Post by msauper » Wed Feb 25, 2004 9:46 am

Dan,

But to follow this thought about promoting labels, I had expect that if I promote a label on a folder, it would be associated with a NEW version for the folder. Why is there this restriction on label promotion?

Best regards,

Metro.
Metro Sauper
President
Sauper Associates, Inc.
221 County House Road
Suite D
Sewell, NJ 08080

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

Post by dan » Wed Feb 25, 2004 11:13 am

The problem is that there is no guarantee that an actual version of a folder contains the same contents as a promoted label.

For example:

$/foo at version 10 contains
$/foo/a.b at version 3
$/foo/a.c at version 4

You check in a change to a.b:

$/foo at version 11 contains
$/foo/a.b at version 4
$/foo/a.c at version 4

Then checkin a change to a.c:
$/foo at version 12 contains
$/foo/a.b at version 4
$/foo/a.c at version 5

If you labeled $/foo at version 10 to label "foo beta", and then promoted "foo beta" to contain a.c at version 5 instead of version 4, then there is no version of $/foo where a.b is at version 3 and a.c is at version 5.

It's the same when you add or delete a file from a label. The file may be deleted from the label, but that doesn't delete it from the folder.

Hope this helps

msauper
Posts: 17
Joined: Fri Jan 02, 2004 3:45 pm
Location: Philadelphia , USA (EST)
Contact:

Post by msauper » Wed Feb 25, 2004 6:38 pm

Dan,

I think I need to go back to "Labels 101" :) From your example, it has become obvious to me that I don't really understand labels.

In your example, when I label $/foo at version 10, I expected that the label would only exist on $/foo. When I promote the label, I would have expected to only promote it to $/foo version 11, or $/foo version 12.

From your example it appears that when you label a folder, it also labels each object within the folder. Is this correct? So when you promote the label on $/foo/a.c you are only affecting that one label and not the label on other items.

Thinking about this, promoting the label on a specific file does not seem like a very good thing to do.

So let me ask another question. If I label $/foo at version 10 and then promote the label of $/foo to version 11, will it correctly promote the labels of all files and subfolders within $/foo? Will files that exist in $/foo at version 10 but not in $/foo at version 11 loose their label?

Best regards,

Metro.
Metro Sauper
President
Sauper Associates, Inc.
221 County House Road
Suite D
Sewell, NJ 08080

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

Post by dan » Wed Feb 25, 2004 9:18 pm

Your understanding of label promotion is how we would have liked to implement it, as it would have made life soooo much easier. But, that isn't how VSS handles it, and we were trying to be compatible.
msauper wrote:
Thinking about this, promoting the label on a specific file does not seem like a very good thing to do.

So let me ask another question. If I label $/foo at version 10 and then promote the label of $/foo to version 11, will it correctly promote the labels of all files and subfolders within $/foo? Will files that exist in $/foo at version 10 but not in $/foo at version 11 loose their label?
Yes, I actually would not recommend using label promotion, even though we just implemented it. It is only there to provide compatibility with VSS labels.

Also, with Vault labels, you can't a promote a folder version - only a file version. If you want to "promote" the folder itself, you'd simply delete the label and then create another label of the same name for a different version of the folder. Cheesy, yes, but simple to implement :)

Post Reply