"Compare with working copy" fails in log messages window

48 views
Skip to first unread message

Tobias Knauss

unread,
Jun 5, 2018, 11:15:39 AM6/5/18
to torto...@googlegroups.com
TortoiseSVN 1.10.0, Build 28176 - 64 Bit , 2018/04/14 08:00:32

"Compare with working copy" does not work when executing it in the log messages window on a specific revision: There are many cmd.exe windows popping up and closing again immediately, then TortoiseMerge is started with empty error message box.
I expected to get a "changed files" dialog, which I get when selecting 2 revisions and clicking "compare revisions".

Stefan

unread,
Jun 5, 2018, 2:03:05 PM6/5/18
to TortoiseSVN
"compare with working copy" from the log dialog creates a patch file and then starts TMerge to "apply" that patch to the working copy.
It won't work with other diff tools since they can't apply a patch file (well, most of them can't).

The command works fine for me here. And I really can't see why there would be cmd.exe processes popping up.
When I check the source code, all it does is create the patch file (unified dif), then starting TMerge to apply that patch.

What's the url/path/... of the item you show the log for? Is the item renamed before/after the revision?
What else might be unusual on your end?

Stefan

Tobias Knauss

unread,
Jun 6, 2018, 2:11:00 AM6/6/18
to torto...@googlegroups.com
maybe the cmd.exe pops up because I have set
diff-cmd = "c:\\svn_no-merge.bat"
diff3-cmd = "c:\\svn_no-merge.bat"
to avoid automatic merging.
Batch file content:
@type %9
@exit 1

Diff viewer (only 1st line of 3) is "C:\Program Files\Beyond Compare 4\BCompare.exe" %base %mine /title1=%bname /title2=%yname /leftreadonly
Merge tool is "C:\Program Files\Beyond Compare 4\bcomp.exe" %mine %theirs %base %merged /title1=%yname /title2=%tname /title3=%bname /title4=%mname

What I expect just be the meaning of the functions name ("compare with working copy") is a comparison of the selected revision with the working copy. Thus it should bring up the same window as when comparing 2 revisions, but with the difference that the comparison target is the working copy.
What I do is Explorer context menu -> TortoiseSVN -> Show log -> select last but one revision -> context menu -> compare with working copy.
What I get is a popup "get unified diff", then the mentioned cmd.exe popups, then TortoiseMerge opens and shows an empty error message with no text and just [OK] button. Why does TortoiseMerge open? There's no use for it in that situation.
Furthermore, when clicking "compare to working copy" on the latest revision with no working copy changes, I get an error message "Something went wrong. No differences found.", which is correct, but not an error. I also expect the "changed files" dialog here with empty list.

Please read the first 3 posts on the thread "Compare with working copy", that I created long time ago, but where I already had analyzed that: https://groups.google.com/forum/#!topic/tortoisesvn/eBa7V4nCITI
However, the aim of that other thread was something else, so there was no followup on this issue.

Tobias

Stefan

unread,
Jun 6, 2018, 1:08:06 PM6/6/18
to TortoiseSVN


On Wednesday, June 6, 2018 at 8:11:00 AM UTC+2, Tobias Knauss wrote:
maybe the cmd.exe pops up because I have set
diff-cmd = "c:\\svn_no-merge.bat"
diff3-cmd = "c:\\svn_no-merge.bat"
to avoid automatic merging.
Batch file content:
@type %9
@exit 1

That's the reason.
As I explained before: the "compare with working copy" from the log list (top pane in the log dialog) creates a patch file and applies that to the working copy.
Now since you have the 'diff3-cmd' set to do nothing, the unified diff (patch file) can not be created.

Stefan

Tobias Knauss

unread,
Jun 8, 2018, 3:06:05 AM6/8/18
to TortoiseSVN

That's the reason.
As I explained before: the "compare with working copy" from the log list (top pane in the log dialog) creates a patch file and applies that to the working copy.
Now since you have the 'diff3-cmd' set to do nothing, the unified diff (patch file) can not be created.

Stefan

 
Okay, I understand. But isn't there a differnt (or better) way to do that? I mean, it's still possible to "export" the file or "save revision to" (isn't that the same actually?), so you can get a copy of the file at the specified revision and compare it to a file from the disk. Should be quite straightforward...?

Stefan

unread,
Jun 8, 2018, 11:08:06 AM6/8/18
to TortoiseSVN
 
Okay, I understand. But isn't there a differnt (or better) way to do that? I mean, it's still possible to "export" the file or "save revision to" (isn't that the same actually?), so you can get a copy of the file at the specified revision and compare it to a file from the disk. Should be quite straightforward...?

For one file, yes.
if you show the log for a folder, there can be thousands of changed files per revision. Do you really want then to fetch each of these files separately and start an instance of the diff viewer for each of those?
I really doubt that...

And no: doing that for e.g. 5 files and fall back to the patch-file for more won't work either: you can be sure that no matter what setting we use it won't suit all users.
And having an option to configure that won't help either: imagine you've configured the value to 20 because you're working on a repo on a local server so it's fast. Then you do the same on a remote repo - and again users will complain.

Stefan

Tobias Knauss

unread,
Jun 8, 2018, 3:42:31 PM6/8/18
to torto...@googlegroups.com
Okay, accept that.
The only remaining way I can think of may be: Why not ignore such a file in this situation?
I have to admit that this file may contain any content, so it cannot be ignored easily. The solution could be adding exactly that option which I used the file for: add the option "do not merge automatically", or "always prompt for user confirmation on merge". And then, this option could be ignored during merging for file comparison.

In this way you would add a missing functionality that has been added by users using the diff-cmd workaround.
What about that?
Reply all
Reply to author
Forward
0 new messages