check in to multiple "branches" in one action

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

Moderator: SourceGear

Post Reply
kkchan
Posts: 54
Joined: Wed Jun 30, 2010 12:45 am

check in to multiple "branches" in one action

Post by kkchan » Tue May 28, 2013 3:39 am

Hi
Is it possible to check in one file in single action, to trunk, branch1.1, and branch 1.2 and etc?
Currently I need to check in and type comments multiple times.

thank you

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

Re: check in to multiple "branches" in one action

Post by lbauer » Tue May 28, 2013 8:05 am

Are you adding the same file to three different folders?
Linda Bauer
SourceGear
Technical Support Manager

kkchan
Posts: 54
Joined: Wed Jun 30, 2010 12:45 am

Re: check in to multiple "branches" in one action

Post by kkchan » Tue May 28, 2013 9:12 am

Hi
yes, check in (not add new file) same file to 3 difference folder (difference branch)

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

Re: check in to multiple "branches" in one action

Post by lbauer » Tue May 28, 2013 2:26 pm

If the checkouts are listed in the Vault Pending Change set, you should be able to use Ctrl-Click to select each file, then right-click and choose "Commit Selected Operation, then add a change set comment which will apply to all three files.

The change set comment will be used as the item comment unless you added a comment when you checked out.
Linda Bauer
SourceGear
Technical Support Manager

kkchan
Posts: 54
Joined: Wed Jun 30, 2010 12:45 am

Re: check in to multiple "branches" in one action

Post by kkchan » Tue May 28, 2013 5:37 pm

Hi
I think it is not what I am looking for.
Let say I have fileA.txt in trunk folder. Now, it is branched to BranchVer1.1.
A bug reported, I have fix it in BranchVer1.1. At the same time I need to "redo" the same fix in trunk folder as well.
I would like to know, is it possible that, when I check in this FileA.txt in branchVer1.1, it allow to "merge" to trunk ver as well automatically.
I need this because we are supporting at least 2 version. Development, Most recently Released (MRR) and MRR-1. Any changes done in MRR/MRR-1 will need double/triple efforts to check in

Thank you

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

Re: check in to multiple "branches" in one action

Post by lbauer » Wed May 29, 2013 6:44 pm

There isn't a way to update same file to two different folders in the same transaction.

If you are maintaining a trunk and a branches, you might want to consider using Merge Branches. This wizard applies changes from a branch to the trunk or to another branch. It's in the Vault GUI Client under the Tools menu.

You would use Merge Branches after you had several changes to merge. The wizard takes you step by step through the process, merging file updates, added files, renames, etc.
Linda Bauer
SourceGear
Technical Support Manager

kkchan
Posts: 54
Joined: Wed Jun 30, 2010 12:45 am

Re: check in to multiple "branches" in one action

Post by kkchan » Thu Jun 13, 2013 1:09 am

Hi
I have tried the feature of “Merge Branch” in VAULT for our new branching method. However, I face the limitations below:

1. Resolve Merge Status
• It will show “Need Merge” when there’s conflict. Then, I try to merge the files using “Resolve Merge Status” feature. It will revert back to original code without merge.
2. Comment
• When use the “Merge Branch” feature, it will copy the comment from the destination. The limitation is when you do Bulk merging, it will show comment for all selected changes as following (even no relation among the changes):

Merge Branches: Origin=$/Test-Trunk

Version: 6
GEM

Check in in Test-Trunk

Version: 5
GEM

Check in in Test-Trunk

Version: 4
GEM

Check in in Test-Trunk

Thus, you’ll see unrelated comment on the merged files after your checked in. It good if VAULT can enhance this feature that only tie the related comment to the checked-in files.

3. For .aspx file, we will always check in all the related files (with different extension) even some of it no changes (E.g. abc.aspx, abc.aspx.cs … )

Let say, in Trunk, I made the changes in abc.aspx but checked in both abc.aspx and abc.aspx.cs into VAULT. So, when do the “Merge Branch”, it will only check out the modified file which is abc.aspx. Thus, as to our expectation, we hope that when do merging, the system will check out abc.aspx.cs as well even it is unmodified.

4. Every time when do the “Merge Branch”, it will shows all the revisions of the origin folder even some of the revisions has been merged before. This confuse us whether which version should we start the merge activities. Besides that, we must select a contiguous range. Else, you are not allowed to proceed the next step as the print screen as below:
vault.png
vault.png (35.26 KiB) Viewed 16078 times
Item 1-3 has been merged successfully in cycle 1.
Item 4-6 should be merged in next cycle. During merge activities in cycle 2, I have successfully merged the item 5. Due to the conflict issue, I resolved the merge status which revert my Target code to its original code. Thus, I have to do the merge branch again. And, I realized that I must select a contiguous range even item 5 has no difference between Target and Destination.

Limitation:
* No idea up to which version I have done the merge activities as no indicator shown on the above list
* Not flexible enough for me to select the item to apply the changes.

Lastly, if the above problems can be solved by VAULT, it will speed up our merge activities for the new branching method.

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

Re: check in to multiple "branches" in one action

Post by lbauer » Thu Jun 13, 2013 3:33 pm

What version of Vault are you using?

We have made improvements to Merge Branches in Vault 6.1 and additional improvements in Vault 7.0, due to be released later this year.

Vault 6.1 has Merge Markers, which allow the user to "mark" the set of changes that have already been merged. You can also hide from view those changesets which have already been merged, to avoid the kind of confusion you experienced.

In Vault 7, you will be able to merge non-contiguous changesets and you will be able to design your own templates for merge comments.
I try to merge the files using “Resolve Merge Status” feature. It will revert back to original code without merge.
Vault will merge changes where there are no conflicts. You modify lineA, I modify lineB. No problem, these lines are updated.

But if we have both modified lineC, this is a conflict that needs to be resolved by a person looking at the conflicting changes and deciding which change to keep (or to keep both).

"Resolve Merge" can't make a decision about which of the conflicting lines to keep, so it merges non-conflicting lines and reverts the conflicts back to the text that was previously in the file.

If you have a file with a Needs Merge status, use the menu item "Show Merge." This will show the working folder version, the repository version and the "common ancestor ". Then you can manually merge the conflicting lines.
Linda Bauer
SourceGear
Technical Support Manager

kkchan
Posts: 54
Joined: Wed Jun 30, 2010 12:45 am

Re: check in to multiple "branches" in one action

Post by kkchan » Thu Jun 13, 2013 6:16 pm

Hi
Thank you for detailed reply.
What about this?
3. For .aspx file, we will always check in all the related files (with different extension) even some of it no changes (E.g. abc.aspx, abc.aspx.cs … )

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

Re: check in to multiple "branches" in one action

Post by lbauer » Sun Jun 16, 2013 8:38 pm

I experimented with this in a web project. You can check in unchanged files and increment the version -- but the merge tool still doesn't pick that up because the contents are the same as in the target.

Is there a reason you need the merge to work if the contents have not changed?
Linda Bauer
SourceGear
Technical Support Manager

kkchan
Posts: 54
Joined: Wed Jun 30, 2010 12:45 am

Re: check in to multiple "branches" in one action

Post by kkchan » Sun Jun 23, 2013 8:54 pm

lbauer wrote:I experimented with this in a web project. You can check in unchanged files and increment the version -- but the merge tool still doesn't pick that up because the contents are the same as in the target.

Is there a reason you need the merge to work if the contents have not changed?
In ASP.NET project, it designed to have associated files. For example, FormA.aspx, FormA.aspx.cs, FormA.designer.cs. If the version among them are not sync, How do I know the compatibility between aspx.cs / designer.cs / aspx if I want to get older version file ?

thank you

kkchan
Posts: 54
Joined: Wed Jun 30, 2010 12:45 am

Re: check in to multiple "branches" in one action

Post by kkchan » Wed Jul 03, 2013 8:30 pm

Any update?

thank you

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

Re: check in to multiple "branches" in one action

Post by lbauer » Thu Jul 04, 2013 1:02 pm

At this time, the Merge tool doesn't merge unchanged files.

I've logged feature request for 17101 the functionality you need. It will be considered for a future version of Vault.
Linda Bauer
SourceGear
Technical Support Manager

kkchan
Posts: 54
Joined: Wed Jun 30, 2010 12:45 am

Re: check in to multiple "branches" in one action

Post by kkchan » Thu Jul 04, 2013 6:55 pm

OK Thank you.
You should merge only files that ever checked in to the "source" with version # changed (check in unchanged files option).

For example, if formA.designer.cs has version changed in branchA since branched out, merge branch should take it as well. OTOH, if FormA.txt never checked in nor version # changed, merge should ignore it.

thank you

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

Re: check in to multiple "branches" in one action

Post by lbauer » Fri Jul 05, 2013 7:45 am

Thanks for the additional details. They will be noted in the feature request.
Linda Bauer
SourceGear
Technical Support Manager

Post Reply