📜 ⬆️ ⬇️

Small automation with TortoiseSVN in Windows

TortoiseSVN is a great SVN client. And there is nothing superfluous, and there are many opportunities.
Only one drawback - the whole thing works through Explorer (Explorer). In other file managers, working with TortoiseSVN is somewhat inconvenient, or impossible at all.
For Total Commander , of which I am a user, there is a solution (enable overlay for icons, use the button with popupMenu on the keyboard), but on x64 systems it does not work, I checked it personally.


Since I use TC and sit on x64, I had to think of something more convenient to work with the client, rather than through the Explorer. It did not take long to think - the turtle supports work through the command line. Therefore, I decided to simply make two command files in the project folder and periodically, as the need arises, run them. Files for Commit'a and Update'a.

TortoiseSVN itself is TortoiseProc.exe , it can be found in the Bin folder where the program is installed. The main parameter with which we will work is / command . It has its own set of values, which defines all the other keys. There are as many commands as there are items in the context menu of the Explorer on the folder, but we are only interested in a few: log , update , commit .
')
For the first, log , you only need to specify / url : " [url_to_project] ", and for the rest, specify also the local path to the project via / path : " [path_to_project] ".

ATTENTION! To work from the command line, the / notempfile key is required . Otherwise, at least, will not work. And maybe delete the file specified in the / path key.

In general, there is nothing complicated here at all.

I did this:

commit.cmd :
  "c: \ Program Files \ TortoiseSVN \ bin \ TortoiseProc.exe" / command: commit /url:"http://xxx.xxx.xxx "/ path:" d: \ WebServers \ home \ silentroach \ www "/ notempfile 

update.cmd :
  "c: \ Program Files \ TortoiseSVN \ bin \ TortoiseProc.exe" / command: update /url:"http://xxx.xxx.xxx "/ path:" d: \ WebServers \ home \ silentroach \ www "/ notempfile 

log.cmd :
  "c: \ Program Files \ TortoiseSVN \ bin \ TortoiseProc.exe" / command: log /url:"http://xxx.xxx.xxx "/ path:" d: \ WebServers \ home \ silentroach \ www "/ notempfile 


For the rest of the teams, you can see the help, there is a section for this.

These are the three files I put in my folder with the project and, for convenience, I put the shortcuts on them into my own socket in the web dedicated tray. Shortcuts are just to start minimized cmd's so that the black window does not loom behind the dialogue.

It turned out pretty nicely:



Crosspost from a personal blog.

Source: https://habr.com/ru/post/27441/


All Articles