Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About dummzeuch

  • Rank

Contact Methods

  • Website URL

Profile Information

  • Location

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. dummzeuch

    Odd calls of external Pas2Yaml parser

    Yes, that was my impression as well. Of course I can do that. My main problem with this was that the parser never exited because it kept reading empty lines. That stdin might have already been closed occurred to me only later. May I suggest some changes to the API (for the next version of it): 1. In addtion to the shell parameter pass the API version so an external parser can check if it supports it, e.g.: parser.exe shell 2 flagfile The pas2yaml parser apparently originally did not support the encoding line but instead interpreted it as the output file which could result in it overwriting uncommitted changes (see my issue on the github page). 2. Also, I think it would be worthwile to not only pass the file names but prefix them with their meaning which could also prevent this kind of problem, e.g.: InputFile: <input file goes here> Encoding: <encoding goes here> OutputFile: <output file goes here> This won't add much overhead but make the communication much more reliable. 3. And last but not least: Require that an external parser does not to overwrite an existing output file. I think that shouldn't create any new issues since SemanticMerge always creates uniqe file names for each call, so these files should never exist in the first place. But again, this would prevent the issue of unwittingly overwriting files because the input was misinterpreted.
  2. dummzeuch

    Odd calls of external Pas2Yaml parser

    Just in case anybody is interested, here is my current source code: https://github.com/dummzeuch/pas2yaml
  3. dummzeuch

    Odd calls of external Pas2Yaml parser

    The log file does not help me. It does not contain any errors that I could identify. I have attached it to this message. This is a single call to compare two files (but you'll probably see that yourself in the log). The log file of pas2yaml reads like this: READY Received line: C:\Users\twm\AppData\Local\Temp\TestFile.pas-revBASE.svn001.tmp.pas Received line: Windows-1252 Received line: C:\Users\twm\AppData\Local\Temp\b384da6b-a5cf-4cf7-8b1c-395446a37c98.tree Received inputfile: C:\Users\twm\AppData\Local\Temp\TestFile.pas-revBASE.svn001.tmp.pas Received encoding: Windows-1252 Received outputfile: C:\Users\twm\AppData\Local\Temp\b384da6b-a5cf-4cf7-8b1c-395446a37c98.tree Parsed and writing to outputfile: C:\Users\twm\AppData\Local\Temp\b384da6b-a5cf-4cf7-8b1c-395446a37c98.tree wrote OK READY Received line: D:\Source\_github\SemanticMergeDelphi\src\TestFile.pas Received line: Windows-1252 Received line: C:\Users\twm\AppData\Local\Temp\b0fef9d2-98b2-4295-8f9c-7e7c2d7f8b6b.tree Received inputfile: D:\Source\_github\SemanticMergeDelphi\src\TestFile.pas Received encoding: Windows-1252 Received outputfile: C:\Users\twm\AppData\Local\Temp\b0fef9d2-98b2-4295-8f9c-7e7c2d7f8b6b.tree Parsed and writing to outputfile: C:\Users\twm\AppData\Local\Temp\b0fef9d2-98b2-4295-8f9c-7e7c2d7f8b6b.tree wrote OK READY Exception: Exception Exiting because INPUT reached EOF. As you can see, the INPUT (=stdin) file gets closed before an 'end' line was received. This lets me suspect a bug in the way SemanticMerge calls the external parser: It probably closes the pipe to the external parser's stdin without first writing the 'end' line (or maybe simply forgets the CR/LF after it?). semantic.log.txt.zip
  4. dummzeuch

    Odd calls of external Pas2Yaml parser

    OK, found it. There was already a semanticmerge.log.conf file in the SemanticMerge installation directory and this is also where the log file exists. (You should really add that to your instructions.)
  5. dummzeuch

    Odd calls of external Pas2Yaml parser

    I rewrote the logic of the main loop and now I get a diff display. But I still do not get the 'end' line. My program terminates after receiving 10 empty lines. How do I configure logging and where are the log(s) placed? The link says how to set the log level by creating a semantic.log.conf file, but not where this file has to be placed nor where the log file will be created. I created the semantic.log.conf file in c:\users\<me>\AppData\Local\plastic4 with the suggested content (see attached file), but could not find a log file in %temp%. So where does it go? semantic.log.conf
  6. dummzeuch

    Odd calls of external Pas2Yaml parser

    Hi, thanks for your answer. I have already tried the parser stand alone, which works fine as far as I can see. For whatever reason I did not think of calling SemanticMerge directly. Must have been very tired... Also, I will check the logging.
  7. dummzeuch

    Odd calls of external Pas2Yaml parser

    The created yaml seems to be correct as far as I can determine. I'm out of ideas now.
  8. I have got an odd issue with the the Pas2Yaml parser (modified to accept the additional encoding line): It seems never to get the 'end' line: This is the debug output: READY Received line: PathToTemp\u_RRMTP1b.pas-revBASE.svn00d.tmp.pas Received encoding: Windows-1252 Received outputfile: PathToTemp\c525fb84-6c8e-4ec9-8e5f-98c290e1e165.tree Parsed and writing to outputfile: PathToTemp\c525fb84-6c8e-4ec9-8e5f-98c290e1e165.tree wrote OK Received line: PathTo\src\u_RRMTP1b.pas Received encoding: Windows-1252 Received outputfile: PathToTemp\b662819d-08d3-4be6-a680-db2067828443.tree Parsed and writing to outputfile: PathToTemp\b662819d-08d3-4be6-a680-db2067828443.tree wrote OK Received line: Received line: Received line: [and lots of more empty lines] And that's it. After these lines it only gets empty lines and never gets the 'end' line. I configured SemanticMerge for use as an external diff viewer in Tortoise svn like this: PathTo\semanticmergetool.exe -s=%base -d=%mine -ep=PathTo\pas2yaml.exe Based on this I would expect exactly two file sets being passed to pas2yaml: 1. The base file + its encoding + output file for it: PathToTemp\u_RRMTP1b.pas-revBASE.svn00b.tmp.pas Windows-1252 PathToTemp\a0f73627-d2e0-4662-9653-aac4a138994a.tree 2. My modified file + its encoding + output file for it: PathTo\src\u_RRMTP1b.pas Windows-1252 PathToTemp\57f72391-a859-45d2-bb17-cace52d03314.tree Followed by a line containing 'end'. Instead of the 'end' line I get an empty line for each call to ReadLn. My question is: Are we sure that SemanticMerge 2.0 calls external parsers the way it is documented? It is possible, that the created yaml files are not valid, I haven't checked that. Maybe SemanticMerge does not send the 'end' line in that case?
  9. dummzeuch

    Delphi parser development

    Warning: The parser does not work with SemanticMerge 2.0. You risk losing your uncommited changes! See my bug report on GitHub: https://github.com/andremussche/SemanticMergeDelphi/issues/4
  10. dummzeuch

    Trial license and using external parsers

    Thanks for the new trial license. This now calls external parsers but pas2yaml does not support the (new?) format: It expects only two file names per conversion which in my tests resulted in losing the changes. (I only write this here so it is more visible in case others want to try the same. I'll create a new post regarding the issue.)
  11. My primary tool for developing software is Delphi, so I wanted to check out Semantic Merge with the external Pas2Yaml parser. I got myself a trial license (first the 15 days trial and later on the 30 days trial). But unfortunately I can't get it to work. When I add the -ep parameter I get an error message telling me my license is not valid. When I remove the -ep parameter, I can use text comparison/merge but that's not what I wanted to test. I already have got a good tool for that. Does that mean that the trial license does not support external parsers?