How to add a custom tool/command to tortoisehg in linux? - linux

I am trying to trying to execute a shell command from tortiseHg. My end goal is to run a large shell command with {REV} being a parameter. Does anyone know of a way to do this?
I tried using the custom tools option in tortiseHg and it is not working for me.
No matter what I add as the command, It always returns:
The command "my command and args" could not be executed.
"No such file or directory"
Please check that the command path is valid and that it is a valid application
How to reproduce:
In tortoiseHg (linux), go to Settings> Tools > New Tool, add a new command.
Eg. touch /path/success.txt
Add tool to list
Restart thg
Click on the tool.

As lgriZdes mentioned in his answer, custom tool seems to accept only hg commands. Got around this issue by creating an alias in hg which executes a shell command, and calling this alias from custom tools. Let me know if you guys want more detailed info.

In old prehistoric versions of tortoisehg only hg commands were working. It is said here that now shell commands should work without problem How to add a custom tool/command to tortoisehg in linux?

Related

How can I launch gitahed from terminal?

I enjoy using gitahed, and I would like to add a shortcut to lauch it, with github desktop I use github-desktop, but I can do the same with GA?
How can I launch gitahed from terminal?
GitAhead has a Terminal panel at Tools->Options. It has a button to install command line tools. It really just creates a symlink to the GitAhead binary in /usr/local/bin. If that doesn't work for some reason, you can create the symlink yourself or an alias. See command line options by running with the --help flag. There are only a few at the moment.

Is it possible to run a command from Cygwin, into a Git Bash terminal, with arguments?

I haven't been able to find a similar question, but I can't imagine this is an issue that comes up too much.
At my workplace I've decided to switch over to a full Linux experience by using Cygwin, over what I was previously using, Git Bash.
The only slight drawback is that we have a script written in Ruby that deploys changes to our site. I can run this from my Git Bash terminal no problem, but not Cygwin as there doesn't seem to be a Ruby installation on here. I've learned about sending standard output to other terminal windows, but I've only been successful when both terminals have been the same shell.
What I'd like to do is the following:
1. Type a command into Cygwin that opens a Git Bash terminal and automatically runs ./deploy.sh on that Git Bash terminal upon opening.
2. If possible, also pass in an argument in the same command, that the script expects upon running. (In this case it's whether we want to deploy to our staging or production server).
Is this possible? So far I can get what looks to be a Git Bash terminal to open and prompt me for the server, but when I enter it, it does not work. I get an error with regards to a command within the script not being found. Thing is, running this same ./deploy.sh script in a Git Bash terminal that I open myself works perfectly as it always has. The Git Bash terminal that is being opened by Cygwin does not appear to have all of the capabilities of a Git Bash terminal I open 'the normal way'.
The command I am running so far from Cygwin is as follows:
/cygdrive/c/'Program Files'/Git/git-bash.exe "./deploy.sh"
I understand there is probably a way of getting this to work by installing Ruby via Cygwin but I'd like to mess around with my work environment as little as possible in case I somehow affect my ability to deploy my work... and besides, Git Bash definitely runs this script without an issue so I can't see why I would need a duplicate installation.
Many thanks!

How to find out the version of cygwin setup-x86.exe?

I wonder how to find out the version of the cygwin setup program (setup-x86 or setup-x86_64). I know there's setup.ini file when the setup program downloads stuff. There's a line "setup_version: 2.XXX" therein. Is there any direct way to get the version number? Something akin to "setup --version" on the command line.
There is no version command line as you can see from the help output
/setup-x86.exe -h
You can ask on the mailing list for this additional info to be added
as setup is currently under deep review.
The only way, currently available, is to look at the start window

How to install talend in silent mode (unattended mode)?

I have talend installer in my directory and now i want to run talend in silent mode so it do not give me options while running it on command line
my command to execute talend in silent mode :-
./Talend-Installer-20151214_1327-V6.1.1-linux64-installer.run --optionfile silentMode.txt
As soon as i run the above command i get the version and build detail but I cannot find it in the directory that i have given in me key value text file i.e /opt/talend-6.1.1. below is the result i get after executing the command.
"Talend 6.1.1 --- Built on 2015-12-14 18:02:36 IB: 9.5.3-201412111637"
Can anyone help me installing talend in silent mode ?
You are not specifying what components of Talend you are installing in unattended mode. The option file is there for that. So, let's say you would like to install TAC using included H2 DB and a JobServer, your option file (silentMode.txt that you are specifying) would probably look similar to the following:
mode=unattended
enable-components=tac,jobserver,serv
disable-components=logserv,mdm,dsc,cmdline,soa,runtime,svn,tdqp,sap_rfc,studio,esb
prefix=/opt
installStyle=advanced
installType=custom
licenseFile=/talend_packages/license
tacAdminUser=admin#company.com
tacAdminPwd=admin
tacWebAppName=tac611
svnInstall=create
svnUser=svnadmin
svnPass=admin
Please notice, that you have to specify both enable-components and disable-components together. If you don't, it might try to install all components and result in an error (since it misses necessary information from the option file). Don't ask me why ...
In order to get an exhaustive list of options to put in your optionfile, simply take a look at the installer's options:
# ./Talend-Installer-20151214_1327-V6.1.1-linux64-installer.run --help
The same content is available here
Please also notice that it is recommended to install Talend using root (in order to activate RC scripts, etc.), but you can then, manually change Talend Directory owner to another user and slightly modify the RC scripts to run services as that user.
Some more documentation could be read here

How To Run a Script in WinSCP

I am using winSCP GUI to connect to linux terminal and then copy the files and other stuff.
Now i have some scripts on the UNIX server,I am connected but how to run the script from the Win SCP.
what basically is needed is
sh scriptname.sh through the WinSCP.Please let me know if anyone else found out how to do that.AS loging into putty and running the command is time taking for me.
WinSCP Custom Command option tried to click on Execute,but the error pops up like no such directory.
Tried google but to the point information is not coming up.
Try this
sh "!"
OR
First of all executing commands from WinSCP can be tricky and if you are able to run few commands also,there are restrictions which you can not do fro WinSCP and should have to ultimately take help of PUTTY.
Here is the link Integrate WinSCP with Putty which will help you integrate your WinSCP to Putty,so that when you open any server through WinSCP putty will automatically connect without even asking for the password.And then you can run you command,hope that wound be of any trouble to you.
Remember you can store the connection details in WinSCP and in just one click it will connect to the server on SCP and also on Putty.
You can define your own custom command by right-clicking, selecting Custom commands and selecting Customize. Then click "Add", enter a description, e.g. Run and specifying a custom command. Try sh "!" to start with - that works ok for me, if you still get errors post your output back here. The quotes are important - only the exclamation should be quoted.
Right click the script > Custom Commands > Execute
Hope this helps.
To execute an ad-hoc shell command in WinSCP, use the Console window:
To execute the shell script selected in a file panel, create a custom command like:
sh "!"
This is actually, what the pre-defined custom command Execute (almost) does.
I'm aware that you claim that this does not work. But it should work in general. If you are having problems, please tell us details (exact error message, screenshot, anything)
You can have WinSCP open PuTTY terminal client and execute the commands there.
With some setup you can even open the PuTTY in the same directory as you have opened in WinSCP file panel.
Particularly for long-running commands/scripts, you can create a local custom command that runs the script via Plink:
"C:\Program Files (x86)\PuTTY\plink.exe" -ssh !U#!# "!/!"
Check the Use remote files option. Do not forget to select the Local command.
You can also pass the command to PuTTY to using similar method as used for Opening PuTTY in the same directory.

Resources