How to find branches which still need to be merged?

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

Moderator: SourceGear

Post Reply
joel
Posts: 38
Joined: Mon Feb 02, 2004 5:18 pm

How to find branches which still need to be merged?

Post by joel » Mon Mar 15, 2004 12:01 pm

Is there an easy way to find out which branched files still need to be merged into a target folder? In other words, we get to the end of a dev cycle and want to see which files haven't been merged into their parent trees (where they were branched from).

I think I see how to do this through the API (by iterating through the history for the target folder and filtering on branched objects), but was wondering if there was an easier way through the GUI. Also, if it can only be done through the API, is there a way to filter out only those objects which need merges? Otherwise, I'm going to get every branch, including those which have already been merged.

Thanks,
Joel

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

Post by dan » Mon Mar 15, 2004 4:06 pm

I guess the short answer is no - unfortunately there isn't a way to see which files have been merged into the trunk and which ones haven't.

It is easy enough to find files that are currently in a Needs Merge state, but that won't help you at all with determining which files have been merged from a branch into a trunk or vice-versa.

Perhaps you could use a standardized comment on checkins that are from a Merge Branch operation, and use that?

We used to add meta-data to a merge branch checkin on the folder it was being checked into, but that changed when we went with the bi-directional merge.

I'll add to our list to investigate adding meta-data back in to see whether that would help in determining what was merged and what wasn't since a particular version of a folder.

joel
Posts: 38
Joined: Mon Feb 02, 2004 5:18 pm

Post by joel » Mon Mar 15, 2004 4:24 pm

But, there must be some record in the database as to when files were branched from a trunk and then when they're merged back in, correct? I see a VaultBranchPointInfo object. Perhaps I could use that along with the History objects? I'll have to correlate with the trunk name I'm interested in (as there could be multiple merges from one file into other trunks). Just looking for a possible starting point from which I can try some "exploratory coding."

Thanks,
Joel
dan wrote:I guess the short answer is no - unfortunately there isn't a way to see which files have been merged into the trunk and which ones haven't.

It is easy enough to find files that are currently in a Needs Merge state, but that won't help you at all with determining which files have been merged from a branch into a trunk or vice-versa.

Perhaps you could use a standardized comment on checkins that are from a Merge Branch operation, and use that?

We used to add meta-data to a merge branch checkin on the folder it was being checked into, but that changed when we went with the bi-directional merge.

I'll add to our list to investigate adding meta-data back in to see whether that would help in determining what was merged and what wasn't since a particular version of a folder.

ericsink
Posts: 346
Joined: Mon Dec 15, 2003 1:52 pm
Location: SourceGear
Contact:

Post by ericsink » Mon Mar 15, 2004 6:59 pm

joel wrote:But, there must be some record in the database as to when files were branched from a trunk and then when they're merged back in, correct?
Well, no. :(

The database does know when things have been branched. However, there is no semantic record of when things got merged. The commit(s) which happen in conjunction with a merge branches operation are not marked in any special way.
Eric Sink
Software Craftsman
SourceGear

Post Reply