Triggering 'Needs Merge' during Merge Branches

If you are having a problem using Vault, post a message here.
Post Reply
zolondek
Posts: 11
Joined: Fri May 30, 2008 11:06 am

Triggering 'Needs Merge' during Merge Branches

Post by zolondek » Mon Apr 04, 2011 8:48 am

If two different versions of the same file exist in Branch 1 and Branch 2, shouldn't the Merge Branches wizard (with 'attempt automatic merge' unchecked) indicate a 'Needs Merge' (while merging Branch 1 to Branch 2)?

For example, Branch 1.File A contains the text ‘abc’. Branch 2.File A contains text on the same line but it says ‘def’. Perform Merge Branches using Branch 1 as the Origin and Branch 2 as the Target. Shouldn’t I get a ‘Needs Merge’ indication on File A? I am getting an ‘Add File’ operation for File A which is not what I would expect.

Thanks.

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

Re: Triggering 'Needs Merge' during Merge Branches

Post by lbauer » Mon Apr 04, 2011 10:46 am

What version of Vault are you using?

Are Branch1 and Branch2 from the same trunk, or is Branch2 a branch of Branch1?
Linda Bauer
SourceGear
Technical Support Manager

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

Re: Triggering 'Needs Merge' during Merge Branches

Post by lbauer » Mon Apr 04, 2011 12:53 pm

I tried a few different ways of branching, but was not able to get an "Add" instead of a "Needs Merge" state.

Steps to reproduce would be helpful.
Linda Bauer
SourceGear
Technical Support Manager

zolondek
Posts: 11
Joined: Fri May 30, 2008 11:06 am

Re: Triggering 'Needs Merge' during Merge Branches

Post by zolondek » Mon Apr 04, 2011 2:47 pm

lbauer wrote:I tried a few different ways of branching, but was not able to get an "Add" instead of a "Needs Merge" state.

Steps to reproduce would be helpful.
We were trying to re-create a legacy project in Vault by copying in code directly into manually created branches. So there was not a branch history.

When we restarted with a trunk and then used Vault to create the branches, we successfully got files that triggered the ‘Merge Conflict’ status.

Thanks.

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

Re: Triggering 'Needs Merge' during Merge Branches

Post by lbauer » Tue Apr 05, 2011 1:47 pm

Merge branches was designed to merge change sets. In other words, it merges folder history, not just the contents of two directories.

Most likely, you added files to Branch 1 then you used Branch 1 as origin and Branch 2 as the target. The folder history for Branch 1 had the "add" operation, so that's what the merge tool was trying to merge into Branch 2, but those file names were already there.

I was able to reproduce this. If you tried merging Branch 2 as origin and Branch 1 as target, then you would've gotten the merge conflict. Still, you'll get more predictable results if you actually use the branch operation to create your branch.
Linda Bauer
SourceGear
Technical Support Manager

zolondek
Posts: 11
Joined: Fri May 30, 2008 11:06 am

Re: Triggering 'Needs Merge' during Merge Branches

Post by zolondek » Tue Apr 05, 2011 2:06 pm

That makes sense. We're now using the branch operation to create branches and merging works fine now.

Thanks!
lbauer wrote:Merge branches was designed to merge change sets. In other words, it merges folder history, not just the contents of two directories.

Most likely, you added files to Branch 1 then you used Branch 1 as origin and Branch 2 as the target. The folder history for Branch 1 had the "add" operation, so that's what the merge tool was trying to merge into Branch 2, but those file names were already there.

I was able to reproduce this. If you tried merging Branch 2 as origin and Branch 1 as target, then you would've gotten the merge conflict. Still, you'll get more predictable results if you actually use the branch operation to create your branch.

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

Re: Triggering 'Needs Merge' during Merge Branches

Post by lbauer » Tue Apr 05, 2011 3:04 pm

You're welcome. :D
Linda Bauer
SourceGear
Technical Support Manager

Post Reply