DiffMerge gives me additions and replacements from nothing

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

Moderator: SourceGear

Post Reply
alovhaug
Posts: 30
Joined: Wed Mar 10, 2004 2:15 pm

DiffMerge gives me additions and replacements from nothing

Post by alovhaug » Thu Feb 02, 2006 2:30 pm

I encountered something a little strange today, and I thought I should inquire about it. I'm using version 3.1.5 (3646). I had two files that show a status of "Needs Merge". I didn't really think I had made changes to these files, but it is possible - occasionally I will look at code in Notepad2, and I suppose I might have saved it before closing. When I used "Show Merge" on one of them, the DiffMerge application showed that the working version and the repository version both had 0 additions, deletions and replacements. However, somehow the "changes applied from both panels" show "3 Additions, 0 Deletions, 1 Replacements" (I've attached a screen shot). It isn't any big deal, but it is a little disturbing, since I'd like to trust the DiffMerge app to flag changes appropriately for me, and I can't really tell what this means. If neither of those files were changed, exactly what is it merging?

I've never seen this mentioned before, but perhaps I just missed it. Any thoughts on why this could have happened? Thanks.
Attachments
14.11.35.1135.png
14.11.35.1135.png (142.67 KiB) Viewed 5906 times

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

Post by dan » Thu Feb 02, 2006 2:55 pm

Yes, that looks strange. We could probably easily explain or address this if you still have the files that were used for the merge (we would need all 3 - the repository version, the working folder version, and the baseline file, which is harder to find, but is the file that was in the working folder before the edit was made)

alovhaug
Posts: 30
Joined: Wed Mar 10, 2004 2:15 pm

Post by alovhaug » Thu Feb 02, 2006 3:10 pm

Hmmmm. As you said, the baseline file is harder to find. I'm not sure how to obtain that one. There are four versions of the file in the _sgbak folder, all with dates in September. According to Vault, the date on the working directory version is from last December, and it makes sense that this file wasn't changed between that time. So, would the baseline file be the last version of the file in the _sgbak folder?

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

Post by dan » Thu Feb 02, 2006 3:25 pm

Unfortunately, the baseline file is tucked away in the client cache, and is very hard to find, since its name is changed to a number and is in with all the other files that you've downloaded in that folder.

If you have not checked the file in yet, one way to get it is to do a diff of the working folder file against the "previous version retrieved from repository" which is in fact the baseline. It will copy it to a temp folder to do the diff and you can get it from there.

Otherwise, you could try to do a Get from history on previous versions of the file in the repository and see if you get the same diff merge results. It actually doesn't have to be the exact baseline as long as the diff merge app exhibits the same problem.

alovhaug
Posts: 30
Joined: Wed Mar 10, 2004 2:15 pm

Post by alovhaug » Thu Feb 02, 2006 3:38 pm

Okay, here are the files (hopefully I've followed your instructions correctly). Thanks for looking into this.
Attachments
MergeIssueFiles.zip
(20.22 KiB) Downloaded 619 times

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

Post by dan » Fri Feb 03, 2006 10:49 am

OK, after looking at this, the issue is actually that both the working folder version and the repository version are the same, but the baseline version is different from both of them. Is it possible the repository version got copied into the working folder without having done a Get from Vault (which would have replaced the baseline)?

In any case, the merge tool is actually reporting the right results in this case. The changes all came from the baseline file, and not the right or left file, so even though it says there are 0 changes from right and left, there were actually 3 changes in the merge, all from the baseline file.

alovhaug
Posts: 30
Joined: Wed Mar 10, 2004 2:15 pm

Post by alovhaug » Fri Feb 03, 2006 11:01 am

Well, I suppose anything is possible. I'm not exactly sure when/how that would have happened. I didn't look at the baseline file at all - I just found it and sent it with the rest. I guess I will spend some time looking at the differences and see if I can recall what might have happened.

Thanks.

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

Post by dan » Fri Feb 03, 2006 11:10 am

Note that it is possible that some sequence of events in Vault could have caused the baseline to not be updated, in which case this would simply be a bug in Vault. So, if this happens again, or a lot, and you can retrace the steps and get it to happen on command, let us know. Until then, we'll chalk it up to strange user actions instead :)

alovhaug
Posts: 30
Joined: Wed Mar 10, 2004 2:15 pm

Post by alovhaug » Fri Feb 03, 2006 11:27 am

I'll keep that in mind. Thanks!

Post Reply