Converting Snapshots to Labels
Moderator: SourceGear
Converting Snapshots to Labels
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.
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
President
Sauper Associates, Inc.
221 County House Road
Suite D
Sewell, NJ 08080
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.
In any case, the basic procedure you outlined should work in the normal case.
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).
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.
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
President
Sauper Associates, Inc.
221 County House Road
Suite D
Sewell, NJ 08080
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
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
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.
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
President
Sauper Associates, Inc.
221 County House Road
Suite D
Sewell, NJ 08080
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.
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
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.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?
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