Question regarding Labels, Branching and folder renaming
Moderator: SourceGear
Question regarding Labels, Branching and folder renaming
Vault 5.0.2.18753
I'm having a couple of problems and wondering if perhaps I did something wrong and if I can somehow correct it.
After importing our source from VSS I took the oppourtunity to rearrange things a bit and this included renmaing some folders.
What I'm finding is that now I cannot reference the labels since the folder names changed. The organization under those folders is still the same, just the main folder name changed.
Then I also created a branch and that branch has none of the labels from the branch I branched from. Is that normal? I was expecting all the labels up to the point I branched from to follow the new branch.
Thanks,
J
I'm having a couple of problems and wondering if perhaps I did something wrong and if I can somehow correct it.
After importing our source from VSS I took the oppourtunity to rearrange things a bit and this included renmaing some folders.
What I'm finding is that now I cannot reference the labels since the folder names changed. The organization under those folders is still the same, just the main folder name changed.
Then I also created a branch and that branch has none of the labels from the branch I branched from. Is that normal? I was expecting all the labels up to the point I branched from to follow the new branch.
Thanks,
J
Re: Question regarding Labels, Branching and folder renaming
Are you trying to pull the labels from the Vault GUI client, or are you trying to use them in a script?
Branching does not make a copy of the history. The history stays with the original location, and that includes the labels. You can see the history from the branch, but that history is still actually part of the original location and not the branch.
Labels are specifically tied to the location where they were applied at, so as long as you refer to that application location, you can get the label.
Branching does not make a copy of the history. The history stays with the original location, and that includes the labels. You can see the history from the branch, but that history is still actually part of the original location and not the branch.
Labels are specifically tied to the location where they were applied at, so as long as you refer to that application location, you can get the label.
Beth Kieler
SourceGear Technical Support
SourceGear Technical Support
Re: Question regarding Labels, Branching and folder renaming
I'm doing this all from the client UI. The name changes and that breaking the labels concerns me most, I understand, somewhat, why it's breaking it but I was hoping for someway to correct it, like from Label Promotion, which I could not find.
For branching, we deal with a major release and service pack releases and at times the main_branch may be in the midst of one release while we have a branch that is for a previous release we need to do a service pack for. So if I label that branch and then later merge into my main_branch I'm going to lose my labels? Is that correct?
Thanks,
J
For branching, we deal with a major release and service pack releases and at times the main_branch may be in the midst of one release while we have a branch that is for a previous release we need to do a service pack for. So if I label that branch and then later merge into my main_branch I'm going to lose my labels? Is that correct?
Thanks,
J
Re: Question regarding Labels, Branching and folder renaming
Is it a case of where you don't see the label when you do a show labels? I still don't understand what you say is breaking. I set up a scenario and ran a test and can get all imported labels.
Labels are not merged. Changes to the files are merged. If you label in a branch and delete the branch, then that label isn't there. A merge branches isn't something that maintains the branch history. It takes all the change sets and applies them to target location at once.
Labels are not merged. Changes to the files are merged. If you label in a branch and delete the branch, then that label isn't there. A merge branches isn't something that maintains the branch history. It takes all the change sets and applies them to target location at once.
Beth Kieler
SourceGear Technical Support
SourceGear Technical Support
Re: Question regarding Labels, Branching and folder renaming
The labels are there from the import. For the import I put one section under $/main_branch and it's old folder name was ek2 which I wished to change to have a more generic meaning so I renamed it to cpp. So it's $/main_branch/cpp now.
The labels that were imported however point to $/main_branch/ek2 so when I tried to Diff a label to the Current branch version, so $/main_branch/cpp current version, I get an error.
In the client the error is:
"Object reference not set to an instance of an object."
And on the server the error log shows:
"GetLabelStructure returned: FailObjPathInvalid "
I can go in and use Promote on the the label however I cannot change the top folder names so I cannot correct the folder in there.
I tried multiple old labels as well with the same results.
I can diff an old label to an old label just not against the Current Version.
I also tried using the "Any Repository Folder/File" and pointed it at another area and it still fails with the same above errors.
I also did try this on multiple systems to make sure it was some kind of individual client side issue.
I also went into Show History on the $/main_branch/cpp folder, set it to show only Label actions, found the label I was working with via Show Labels, selected a Diff against the Current Version and that seemed to work. So it's something to do with a Diff from Show Labels.
Thanks,
J
The labels that were imported however point to $/main_branch/ek2 so when I tried to Diff a label to the Current branch version, so $/main_branch/cpp current version, I get an error.
In the client the error is:
"Object reference not set to an instance of an object."
And on the server the error log shows:
"GetLabelStructure returned: FailObjPathInvalid "
I can go in and use Promote on the the label however I cannot change the top folder names so I cannot correct the folder in there.
I tried multiple old labels as well with the same results.
I can diff an old label to an old label just not against the Current Version.
I also tried using the "Any Repository Folder/File" and pointed it at another area and it still fails with the same above errors.
I also did try this on multiple systems to make sure it was some kind of individual client side issue.
I also went into Show History on the $/main_branch/cpp folder, set it to show only Label actions, found the label I was working with via Show Labels, selected a Diff against the Current Version and that seemed to work. So it's something to do with a Diff from Show Labels.
Thanks,
J
Re: Question regarding Labels, Branching and folder renaming
Thank you for the update. I've reproduced what you are seeing and have a bug logged.
F: 13261
F: 13261
Beth Kieler
SourceGear Technical Support
SourceGear Technical Support
Re: Question regarding Labels, Branching and folder renaming
Great, thanks for update.
J
J
Re: Question regarding Labels, Branching and folder renaming
You're welcome.
Beth Kieler
SourceGear Technical Support
SourceGear Technical Support
Re: Question regarding Labels, Branching and folder renaming
Could you add a feature request for Labels from a branch to be mergable. I understand it creates possible label name conflicts but if that could be added as something to be resolved in a merge I think it could be very useful.
For example, if we have a main_branch that we do our main release on and use branches for service packs, hotfixes, etc. Let's say we end up needing to release 2 service packs before we're ready to merge it back into the main_branch but we want to be able to recall either sp once we merge we would lose that ability.
I don't know how Labels are truly stored in the db so hopefully this is something that could be possible.
Thanks,
J
For example, if we have a main_branch that we do our main release on and use branches for service packs, hotfixes, etc. Let's say we end up needing to release 2 service packs before we're ready to merge it back into the main_branch but we want to be able to recall either sp once we merge we would lose that ability.
I don't know how Labels are truly stored in the db so hopefully this is something that could be possible.
Thanks,
J
Re: Question regarding Labels, Branching and folder renaming
I think to make this work, we'd have to merge in the complete history so that the entire branch history is intact. One needs to have the file versions that were under that label in order to be able to do anything with the label. I do have a feature request open though to merge the entire history rather than applying everything in one commit at the merge point. I can add your vote to it this feature request on the history, or if all you want is labels only, I can create a new request on only keeping the label history.
F: 5992
F: 5992
Beth Kieler
SourceGear Technical Support
SourceGear Technical Support
Re: Question regarding Labels, Branching and folder renaming
If labels were covered in the merge of the entire history then yes you can add my vote to that. Can we expect that in the next service pack!
Thanks,
J
Thanks,
J
Re: Question regarding Labels, Branching and folder renaming
I got your vote in. I don't have a timeline on this though. Thanks for the feedback.
Beth Kieler
SourceGear Technical Support
SourceGear Technical Support