Merging

This forum is now locked, since Gold Support is no longer offered.

Moderator: SourceGear

Locked
Thalko
Posts: 21
Joined: Thu Feb 17, 2005 2:34 pm

Merging

Post by Thalko » Fri Dec 09, 2005 12:35 pm

Are there any guidelines/ suggestions on how when you change code in a branch that would possibly reduce the manual merging process for when merging branches? For instance would
using block commenting be easier for the tool to handle than inline commenting? for instance (using C style commenting) if i have a line like this i want to comment out:

x = 1;

would this be better:

/*
x = 1;
*/

instead of:

//x = 1;


would one style be easier for the merge tool to handle? My goal is to reduce the manual process of merging files when merging branches, so i am trying to understand the logic this tool uses.

Sometimes I see inline changes that are able to be resolved by the automerge and sometimes they are flagged as Conflicts in the merging of 2 files. Are there special cases that it cannot resolve these modifications?

Also, sometimes i see people add a block of code (function etc.) at the end of a file in a branch and duplicate this in the Trunk. When the merge actually occurs the code block inserted is duplicated (ie. 2 occurances) even though the 2 files may be identical (other than whitespace). What causes this to happen?

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

Post by lbauer » Fri Dec 09, 2005 2:20 pm

would this be better:

/*
x = 1;
*/

instead of:

//x = 1;


would one style be easier for the merge tool to handle?
The merge tool should be able to handle either of these.
Are there special cases that it cannot resolve these modifications?


Not particularly. Sometimes the file differences are such that the Merge Tool can't determine how to merge them, so it declares a conflict and lets the user resolve the merge.
Also, sometimes i see people add a block of code (function etc.) at the end of a file in a branch and duplicate this in the Trunk. When the merge actually occurs the code block inserted is duplicated (ie. 2 occurances) even though the 2 files may be identical (other than whitespace). What causes this to happen?
This is a known issue that will be fixed in Vault 4.0, due out sometime next year.
Linda Bauer
SourceGear
Technical Support Manager

Locked