Question regarding Labels, Branching and folder renaming

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

Moderator: SourceGear

Post Reply
jstarbird
Posts: 146
Joined: Wed Jul 22, 2009 11:49 am

Question regarding Labels, Branching and folder renaming

Post by jstarbird » Thu Feb 11, 2010 8:24 pm

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

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

Re: Question regarding Labels, Branching and folder renaming

Post by Beth » Fri Feb 12, 2010 11:41 am

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.
Beth Kieler
SourceGear Technical Support

jstarbird
Posts: 146
Joined: Wed Jul 22, 2009 11:49 am

Re: Question regarding Labels, Branching and folder renaming

Post by jstarbird » Fri Feb 12, 2010 1:11 pm

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

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

Re: Question regarding Labels, Branching and folder renaming

Post by Beth » Fri Feb 12, 2010 4:14 pm

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.
Beth Kieler
SourceGear Technical Support

jstarbird
Posts: 146
Joined: Wed Jul 22, 2009 11:49 am

Re: Question regarding Labels, Branching and folder renaming

Post by jstarbird » Fri Feb 12, 2010 7:25 pm

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

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

Re: Question regarding Labels, Branching and folder renaming

Post by Beth » Mon Feb 22, 2010 5:13 pm

Thank you for the update. I've reproduced what you are seeing and have a bug logged.

F: 13261
Beth Kieler
SourceGear Technical Support

jstarbird
Posts: 146
Joined: Wed Jul 22, 2009 11:49 am

Re: Question regarding Labels, Branching and folder renaming

Post by jstarbird » Mon Feb 22, 2010 7:31 pm

Great, thanks for update.


J

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

Re: Question regarding Labels, Branching and folder renaming

Post by Beth » Tue Feb 23, 2010 11:16 am

You're welcome.
Beth Kieler
SourceGear Technical Support

jstarbird
Posts: 146
Joined: Wed Jul 22, 2009 11:49 am

Re: Question regarding Labels, Branching and folder renaming

Post by jstarbird » Mon Mar 15, 2010 4:04 pm

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

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

Re: Question regarding Labels, Branching and folder renaming

Post by Beth » Tue Mar 16, 2010 10:22 am

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
Beth Kieler
SourceGear Technical Support

jstarbird
Posts: 146
Joined: Wed Jul 22, 2009 11:49 am

Re: Question regarding Labels, Branching and folder renaming

Post by jstarbird » Tue Mar 16, 2010 11:05 am

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! :wink:



Thanks,
J

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

Re: Question regarding Labels, Branching and folder renaming

Post by Beth » Tue Apr 06, 2010 9:33 am

I got your vote in. I don't have a timeline on this though. Thanks for the feedback.
Beth Kieler
SourceGear Technical Support

Post Reply