How to merge current version with older?

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

Moderator: SourceGear

Locked
Tri
Posts: 288
Joined: Wed Dec 22, 2004 11:10 am

How to merge current version with older?

Post by Tri » Mon Jan 10, 2005 12:56 pm

Server + CLient: 2.06

I would like to merge the latest version of a file with an older version. I open the history of the file, check out an older version. The "Modified Local file" option is set to "Attempt automatic merge".

What I got was the current version completely overwritten by the older version. Is it by design or have I used the incorrect checkout procedure?

dan
Posts: 2448
Joined: Wed Dec 17, 2003 5:03 pm
Location: SourceGear
Contact:

Post by dan » Mon Jan 10, 2005 1:02 pm

Was the latest version modified from what was in the repository? If not, then the behavior is correct, but merging only applies to changes on the local machine.

I'm confused by what you are trying to do. Merges involve 3 files - the baseline file from which 2 different sets of changes are introduced, thus requiring a merge of those 2 files. What is the baseline on which the changes were introduced?

Tri
Posts: 288
Joined: Wed Dec 22, 2004 11:10 am

Post by Tri » Mon Jan 10, 2005 3:07 pm

The local file is the latest checked in. Let say it has 1000 lines. The older version has 200 lines, say all different than the current version.

The merge I was thinking of is Vault fusion both version into a 1200 lines file. Is it possible?

dan
Posts: 2448
Joined: Wed Dec 17, 2003 5:03 pm
Location: SourceGear
Contact:

Post by dan » Mon Jan 10, 2005 3:57 pm

Merge is designed to work from a baseline, so if there isn't a version of the file that was common to both versions you are trying to merge, then it won't work.

Did the older version and the latest version have the same baseline at some point? If you are trying to merge, for example, version 10 and 20, you could get version 9 to the working folder, then manually copy version 10 over the local version 9, and then try the merge, and see what the results look like.

Tri
Posts: 288
Joined: Wed Dec 22, 2004 11:10 am

Post by Tri » Mon Jan 10, 2005 4:21 pm

Can you give a definition of "Baseline"?

Let's take an example. The file, version X, contains:
AAA
BBB
CCC

Version Y contains:
111
222
333
AAA

What/where is the baseline?

dan
Posts: 2448
Joined: Wed Dec 17, 2003 5:03 pm
Location: SourceGear
Contact:

Post by dan » Mon Jan 10, 2005 4:55 pm

Merges are designed for the situation where two users are modifying the same file at the same time:

User A and B both start out with Version 10 of a file (the baseline), and both start editing it.

User A checks in his version first, and the file goes to version 11. User B's status then goes to Needs Merge, because if he were to checkin his changes, User A's changes would get lost unless he somehow integrates version 11 into his local file before checking it in. The merge accomplishes that.

So, the baseline is the version of the file that is common between two simultaneous edits.

Locked