u2468 Posted February 24, 2015 Report Share Posted February 24, 2015 If I put the full path to a perl script and have the .pl extension set to run in windows (ie. I just type the script name in a cmd window and it runs) put in as an external diff tool, then try to diff a file - it errors out saying "Error in diff tool 'C:\Users\joe\Desktop\myscript.pl'. Diff tools in client.conf are incorrectly defined." However, just as a test, if I put notepad.exe in as a diff tool, plastic will launch notepad when using the file diff. So is there a restriction that the external diff tool has to be an exe file? Link to comment Share on other sites More sharing options...
u2468 Posted February 25, 2015 Author Report Share Posted February 25, 2015 Well from my experimenting, the external diff program can only be an exe file that has a windows gui. What is the reason for this restriction? Link to comment Share on other sites More sharing options...
manu Posted February 26, 2015 Report Share Posted February 26, 2015 Hello u2468, I'm afraid your experiments are wrong. For example, let's say I want to execute the following python "difftool": import time import datetime ts = time.time() st = datetime.datetime.fromtimestamp(ts).strftime('%Y-%m-%d %H:%M:%S') f = open('C:\\Users\\manu\\out.txt','a') f.write(st + '\n') f.close() Then we setup the diif tool as follows: We set it to the first position so it will be used for all the "text" type files. Then if I use the diff operation I get the timestamp written inside the out.txt file: This proves that you can use a non exe tool that is also non graphical for the diff tool. But I have to say that I prefer a graphical tool, I don't see the point of using a CLI diff tool. Notice that if I want to run a python tool I need to execute "python.... blablabla". If I want to use a mono tool I need to run "mono... blablabla" Which external diff tool are you trying to configure? Link to comment Share on other sites More sharing options...
manu Posted February 26, 2015 Report Share Posted February 26, 2015 I saw in your first post that it's a perl script. Did you include the "perl.exe" thing before "myscript.pl"? Link to comment Share on other sites More sharing options...
u2468 Posted February 26, 2015 Author Report Share Posted February 26, 2015 I saw in your first post that it's a perl script. Did you include the "perl.exe" thing before "myscript.pl"? Yes. I had the full path to perl, then the full path to the script. It didn't work. Then I wrote a C# command line app and it didn't work. Then I wrote a C# windows GUI app and that did work. I will try your example. Link to comment Share on other sites More sharing options...
manu Posted March 3, 2015 Report Share Posted March 3, 2015 Hi u2464, any update? can I help you somehow? Link to comment Share on other sites More sharing options...
u2468 Posted March 3, 2015 Author Report Share Posted March 3, 2015 Hi u2464, any update? can I help you somehow? I confirmed that the scripts run in the background. But I want the script to run in the foreground. Can you show me the diff tool command line specification for a python script that prints "hello world" to the terminal and stays open? Link to comment Share on other sites More sharing options...
manu Posted March 4, 2015 Report Share Posted March 4, 2015 Hi! sure, look, here I have a python "hello world" program using pygtk. Every time I run a diff operation (Ctrl+D) I get the python window over Plastic SCM: And this is how the diff tool is configured: Link to comment Share on other sites More sharing options...
u2468 Posted March 4, 2015 Author Report Share Posted March 4, 2015 Hi! sure, look, here I have a python "hello world" program using pygtk. Every time I run a diff operation (Ctrl+D) I get the python window over Plastic SCM: pygtkHelloDiffTool.png And this is how the diff tool is configured: helloConfig.png Oops, sorry I wasn't clear enough. Yes, I can get GUI programs to run. What I can't get running is a console program in the foreground. So just a program that has: print("hello world") No GUI. How to you make this run in the foreground so that you see the console with "hello world" and the console stays open. Link to comment Share on other sites More sharing options...
manu Posted March 4, 2015 Report Share Posted March 4, 2015 Hi, no, that's not possible, the client is set to not to launch a new command line window. Link to comment Share on other sites More sharing options...
u2468 Posted March 10, 2015 Author Report Share Posted March 10, 2015 Just documenting for the benefit of other users. We were able to figure out that this can be done as follows: cmd /c start c:\path2perl\bin\perl.ext c:\path2script\myperlscript.pl It works! The trick is: cmd /c start Link to comment Share on other sites More sharing options...
calbzam Posted March 11, 2015 Report Share Posted March 11, 2015 Thanks for updating! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.