Merge branches issue

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

Moderator: SourceGear

Post Reply
johndburns
Posts: 4
Joined: Thu Jun 01, 2006 12:13 pm

Merge branches issue

Post by johndburns » Fri Mar 09, 2007 12:10 pm

I'm kinda stuck on this one. I have 2 branches that we have created from a main branch. I'm trying to merge one branch into the other and I'm using the Merge Branches wizard. I make it all the way through the settings until I get to the "Adds, Deletes, Edits" screen, I only see "Add File" options and no "Modify File" options. Also, the only Add Files I see are the first level directory files. Then at the bottom of the list I see some "Add Subfolder" entries that correspond with subfolders that are in both branches. They are red and the Warning says "Already Exists". The problem is that I want it to merge all files in this directory and all subdirectories but it seems to think that these folders aren't the same as the ones in the other branch even though they already exist. Am I missing a setting to find files in lower directories or what? We have done this before and everything worked fine so I'm not sure what the issue is. Any help would be appreciated!

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

Post by lbauer » Fri Mar 09, 2007 1:17 pm

Did you select the proper range of versions?

Was a merge done previously on these branches?

I was able to reproduce the "Folder already Exists" alert when I added the same subfolder to each branch, after the branch had occured. Could something like that have happened? The merge branches wizard completed my merge, without acting on the subfolders.
Linda Bauer
SourceGear
Technical Support Manager

fredfrazier
Posts: 2
Joined: Fri Mar 09, 2007 3:02 pm

Post by fredfrazier » Fri Mar 09, 2007 3:47 pm

John posted this problem to help me. Since I have all the details, I figured it would be quicker if I chimed in.

To answer the questions:

Yes all version numbers (excluding #1) were selected.

Yes, a previous merge was performed, but new root-level folders were created along the way. Here is the history...

-CurrentCode was branched to Copy1,
-Copy1 was modified (directories added, files added, files modified and deleted),

** first merge
-LatestProductionSnapshot was copied to new directory IntegratedCopy,
-Copy1 was merged as origin to target IntegratedCopy,
-IntegratedCopy was modified (directories added, files added, files modified and deleted),

** second merge
-LatestProductionSnapshot2 was copied to new directory IntegratedCopy2,
-IntegratedCopy was merged as origin to target IntegratedCopy2,
-IntegratedCopy2 was modified (directories added, files added, files modified and deleted),

** third merge
-LatestProductionSnapshot3 was copied to new directory IntegratedCopy3,
-IntegratedCopy2 needs to be merged as origin to target IntegratedCopy3,

And this is where the problem begins.

The previous merges worked flawlessly. But for this last merge, the system does not recognize any files or subfolders below the root level. As a workaround, I was able to select the lowest level subfolders and merge them individually.

Now I am attempting to merge the last subfolder, but Vault does not have a record of the original change set (version 1) that created this subfolder.
The current version 1 change set contains the results of all previous merges for the subfolder, and I imagine the "create subfolder" change is embedded in version 1. But Vault disables the "Next" button if version 1 is selected (see attachment). This is my current problem.

Thanks in advance for any advice on solving this one.
Attachments
MergeBranches.jpg
Merge Wizard - select changes...
MergeBranches.jpg (99.55 KiB) Viewed 4053 times

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

Post by lbauer » Fri Mar 09, 2007 4:03 pm

Thanks for the details. I'll try to reproduce this and see if we can determine how to handle it.
Linda Bauer
SourceGear
Technical Support Manager

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

Post by lbauer » Mon Mar 12, 2007 8:34 am

Trying to reproduce this, but have some questions:
-LatestProductionSnapshot was copied to new directory IntegratedCopy
Where's LatestProductionSnapshot coming from? Is it CurrentCode? How did you copy the files? Same question for LatestProductionSnapshot2 and 3.
Linda Bauer
SourceGear
Technical Support Manager

fredfrazier
Posts: 2
Joined: Fri Mar 09, 2007 3:02 pm

Post by fredfrazier » Mon Mar 12, 2007 9:51 am

Linda,

thanks for assisting... Here's additional info.

LatestProductionSnapshot, LatestProductionSnapshot2, LatestProductionSnapshot3 are all created in the same manor as described below. I'll refer to these as LatestProductionSnapshot(n) and LatestProductionSnapshot(n+1) from this point forward.

Starting on day 1 (the day our project started using Vault), we created the folder Current/Code and copied the curent production code to that folder using the "Add Files/Folders" feature. Next, we created a snapshot of Current/Code, I'll call that LatestProductionSnapshot(0).

As our project progressed, we have modified the files within Current/Code (aka CurrentCode), and then we copied labeled change sets to production. After the change sets are copied, we create a new production snapshot (LatestProductionSnapshot(n+1)). To create this snapshot, we load the the most recent Production Snapshot (LatestProductionSnapshot(n)) into a temporary Vault folder. We use "Set Working Folder"/"Get Latest Version" to load the temporary folder. Next, we copy the labeled change sets to the temporary folder. Once all the files are loaded, we use the Snapshot menu selection to create LatestProductionSnapshot(n+1) from the contents of the temporary folder.

During the Merge operations, the IntegratedCopy folder is created using "Add Files/Folders" and LatestProductionSnapshot(n) was loaded into it using "Set Working Folder"/"Get Latest Version". This becomes the Target for the merge.

FYI: We are using Vault 3.1.8 (3771).

Please let me know if there is anything additional I can provide to help your investigation.

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

Post by lbauer » Mon Mar 12, 2007 1:42 pm

This is somewhat different from the way we usually see branches used. Is there a reason you don't just branch CurrentCode, make changes in the branch, then merge back into CurrentCode?

See this link for suggestions on how to use branching:
http://support.sourcegear.com/viewtopic.php?p=29511

We can continue to try to reproduce the problem, though we need to be very clear on the terminology. For instance are you actually using the Snapshot command in Vault, or are your snapshots a regular branch?

What commands did you use to copy labeled changesets into production? How did you label the changesets, etc.

Email support at sourcegear.com ATTN:Linda and we'll continue this offline.
Linda Bauer
SourceGear
Technical Support Manager

Post Reply