DiffMerge gives me additions and replacements from nothing
Moderator: SourceGear
DiffMerge gives me additions and replacements from nothing
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.
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 (142.67 KiB) Viewed 5906 times
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)
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?
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.
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.
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
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.
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.
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