Needs Merge status question

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

Moderator: SourceGear

Locked
wesuser
Posts: 10
Joined: Mon Mar 14, 2005 2:00 pm

Needs Merge status question

Post by wesuser » Thu Apr 28, 2005 8:18 am

Should the "Needs Merge" status not only appear based on files I've changed on my machine? There are files that have been updated in Vault, but I haven't changed on my machine, and now they have the status "Needs Merge". I would expect the status to be "Old".

We've set the option to "Reguire Check Out Before Check In" on all the clients. Some other people have changed files on their machine without checking out (for testing purposes) and they're also seeing "Needs Merge" instead of "Renegade".

It seems the client is viewing anything that has changed on the server (i.e. different version local vs. in Vault) as "Needs Merge". Am I misunderstanding how this status should work?

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

Post by dan » Thu Apr 28, 2005 8:44 am

What you describe should not result in a Needs Merge state - the files should be Old. If they are modified, they will be Needs Merge before saying they are Renegade (since they can be both). But, if no local changes have been made, it should simply be Old.

It is possible that the file's datetime stamp has changed without the file's contents actually being changed, which would result in a Needs Merge. You could check this using CRCs to determine whether the file is modified. Try that in Tools->Options->Local Files and see if the status changes.

Also, which version of Vault are you using?

wesuser
Posts: 10
Joined: Mon Mar 14, 2005 2:00 pm

Post by wesuser » Thu Apr 28, 2005 9:15 am

I set the option to use CRC and it cut down the list a little (from about 20 to 15).

We are using 3.0.6 on the clients and the server is still 3.0.5 at the moment. We will try to update the server tonight.

Looking at the history of some of the files, it appears they are all files I had checked out briefly to do a batch update. It is possible someone else had them checked out at the same time, but in every case I would have checked them back in first. In that case I would expect them to see the Needs Merge status, but I wouldn't think I would since I don't have it checked out or haven't changed them since.

On the second point, if we are requiring check out before check in, and someone makes a change locally without checking out, should they not always appear as Renegade instead of Needs Merge?

Thanks

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

Post by dan » Thu Apr 28, 2005 9:24 am

If you do a Show Merge on the files, do any changes show up in the middle pane? This will tell whether or not there were actual changes checked in underneath you.

For the last question, the problem is that the file is both in a Renegade state AND a Needs Merge state, so one of them has to take precedence. In Vault 2.0, Renegade took precendence, but we changed it to Needs Merge in 3.0, since Needs Merge implies edited, but Renegade does not imply Needs Merge, so this way gives more info. And, Renegade files do oftern need merged in order to compile.

wesuser
Posts: 10
Joined: Mon Mar 14, 2005 2:00 pm

Post by wesuser » Thu Apr 28, 2005 12:33 pm

Looking at some of the files, there are some changes in the middle pane. It looks like those are changes checked in after my changes though. It still seems that the status should be old instead of needs merge. Anyway, I'll do a get latest on all the files to get up to date and see if it turns up again.

I understand what you're saying about the needs merge vs renegade. However, I think that only applies if you don't require check outs. If you require check outs, I would think any edited files should be renegade until you do a checkout. I can't have a needs merge status because I can't check in until I've done a check out.

GregM
Posts: 485
Joined: Sat Mar 13, 2004 9:00 am

Post by GregM » Thu Apr 28, 2005 1:30 pm

It took a bit of thinking about it, but I can see having "Needs Merge" as useful in this case. If the status is renegade, then you have retrieved the latest version from the server, and any difference between the file locally and on the server should be because of your edits. If the status is needs merge, then there have been changes to the file since you last retrieved it from the server, so differences between the file locally and on the server can be both from your local modifications, and modifications from other users.

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

Post by dan » Thu Apr 28, 2005 1:49 pm

wesuser wrote:I can't have a needs merge status because I can't check in until I've done a check out.
Needs Merge isn't really an indication that the file needs checked in. It indicates that there is a more recent version on the server, and that you will need to resolve any differences the next time you do a Get.

So for example, if you put some debug code in your version, and someone else checks in a new function in the same file, you will need to resolve the merge the next time you do a Get, or else the program won't compile. After you do the merge, the file will be listed as Renegade again.

wesuser
Posts: 10
Joined: Mon Mar 14, 2005 2:00 pm

Post by wesuser » Thu Apr 28, 2005 2:00 pm

I guess the question is what does it mean to require check outs. To me it means any changes I make to local files without checking out first are not changes I'm planning on checking back in. The needs merge status doesn't make sense because I'm not planning on merging those changes back into source. If I was, I would have checked the file out first. The fact that others have may have checked in additional changes since I last got the file is not significant in this case.

Anyway, those are my thoughts. At least now I understand how it's intended to work and why. Thanks.

Don Thimsen
Posts: 114
Joined: Fri Mar 05, 2004 11:18 am
Location: Raleigh, NC

Post by Don Thimsen » Thu Apr 28, 2005 8:29 pm

I've had more than a few complaints from the developers at our company about "needs merge". Everyone preferred the "renegade" status that we use to get in earlier versions of vault.

Any chance sourcegear can provide an option to allow the VSS Style configurations to use renegade like vault used to...

Thanks,
Don

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

Post by dan » Fri Apr 29, 2005 8:06 am

It isn't as easy as adding a new option. After looking at this a little more in-depthly, another reason we switched was because of a bug that happens when a file in a Needs Merge state is marked as Renegade.

The bug is that if you do a Get Latest on a Renegade file, and you've selected the option to auto-merge, it doesn't merge the most recent changes from the server into the file (because it doesn't know there is a newer version on the server, because the file isn't in a Needs Merge state). So, in effect, a Get Latest on that file will not work until you overwrite the local version. We had a number of complaints about this in the 2.0 timeframe.

I'll add this as a feature request, but I don't want to get your hopes up. Adding the option means finding another way around that bug.

Locked