Exporting the diff screen as text #2103
Replies: 4 comments 3 replies
-
Click Tools→Generate Report menu item in WinMerge to output the contents displayed in WinMerge to an HTML file.
Regarding "10,11d9", the following URL may be helpful. https://www.gnu.org/software/diffutils/manual/html_node/Detailed-ed.html |
Beta Was this translation helpful? Give feedback.
-
Thanks for the help! I played around with the HTML but it lacks line numbers, which I need. Is there a way to turn that on at the command line? I could not see such an option in the docs, but perhaps this is something that can be defaulted in the prefs? I thought perhaps there was a way to export the merge file, and tried a number of the other undocumented commands (cp and o), but none of them seem to work. Is there a switch to produce this report? I think this would be the best format for me. The documentation you pointed to seems useful, but none of the examples in the document match what I'm seeing. The difference is that WinDiff is placing line numbers and ranges both before and after the command letter, which are not mentioned. In those documents, the line and/or range is always in front of the command. I don't think there is any great mystery about what the numbers mean, but I cannot be sure as I'm very new to this. |
Beta Was this translation helpful? Give feedback.
-
/cfg ViewLineNumbers=1 Ok that's useful! As to the other bit, is there a way to generate the merge report from the command line? I've completed a parser that reads these files in VBA and correctly recreates the output by inserting rows in the appropriate columns. This works fantastic, as long as I generate the merge file by hand. And yes, that newer document is much better! It did not come up in the first page of hits in my Googling. |
Beta Was this translation helpful? Give feedback.
-
Using the code I developed using WinMerge, and using diffutils, the system is now working. If anyone would like the logic (which is not complex!) feel free to email me. |
Beta Was this translation helpful? Give feedback.
-
I customer has a tool in VBA/Excel that produces a display similar to the one WinMerge does when you compare text files, that is, you see the two files side-by side (columns B and D) and they have blank lines inserted so matching bits line up. They use Excel for this because they already have an Excel workflow. It is written in VBA so it takes 30 minutes to run and dies if the file is too large (anything over about 10k lines, which is not uncommon), so I'm looking for solutions, including calling WinMerge on the command line.
So I am very noob - like 10 minutes :-)
I am curious is there is a way to export the two panes showing the diffs exactly as they display - for instance, the display inserts blank lines where code has been inserted in one file so that they line up horizontally. Is there a way to save it that way to a file, with the blanks inserted? If so, I can simply read those two files (or one and split it horizontally) and copy them into Excel rows in two different columns and I'm done. Presto, 30 minutes to 15 seconds.
Alternately, has anyone out there written some VBA (or even English language) that can convert the merge items like "7132a7150,7465" Into "instructions"? I already have the two files read into columns B and D, so all I really need to do is insert blanks in one column or the other so they line up again. But I am not sure I understand the format.
For instance, there is one marker "7132a7150,7465" in my file. Am I correct, for instance, in interpreting this particular example as "lines 7150 to 7465 were added in file B, so you need to insert (7465-7150)= 7465-7150 blank lines into A starting at line 7132 in A".
Is that correct?
If so, what does "10,11d9" mean? It is followed by "13,14d10", and then "15a12,32". These occur right at the top of the file where VS reordered the Imports in a .vb file, followed by a new method being inserted. My feeling is that if its a d I want to insert lines in the new version, and if it's an a, in the old one. Is that basically it?
Beta Was this translation helpful? Give feedback.
All reactions