cbnoob
Senior Member
- Sep 27, 2010
- 969
- 450
Hi all,
Earlier today when I was coding, suddenly there was a power outage. After that, when I turned on the computer, I check my code and I was very surprise to see all the codes were gone. I saved the files before and I didn't understand why but codes were gone. Luckily, I have tortoise SVN so it was easy to get part of the code back but I lost the part which I didn't commit.
If anyone doesn't know about SVN, search google for it. If you are using SVN, read on. Committing is quite a nuisance since you have to go to the folder, right click and select commit. So I think it would be nice to have a hotkey to do this when I am coding and I've found a way to do it by using autohotkey. Here is the code for you:
^!c::
run C:/Program Files/TortoiseSVN/bin/TortoiseProc.exe /command:commit /path:"path to the folder you want to commit" /closeonend:1
return
The green part is the path to the file TortoiseProc.exe , the red part is the path to the folder you want to commit, the ^!c is the hotkey I set myself, you can change it to any key you want. (^ for ctrl, ! for alt, in this case, my hotkey is Ctrl+Alt+C to trigger the commit window).
So that's it. I found this is just great for me to prevent loss of code which I haven't committed yet. I hope it will be useful to you too.
Have a good day
Earlier today when I was coding, suddenly there was a power outage. After that, when I turned on the computer, I check my code and I was very surprise to see all the codes were gone. I saved the files before and I didn't understand why but codes were gone. Luckily, I have tortoise SVN so it was easy to get part of the code back but I lost the part which I didn't commit.
If anyone doesn't know about SVN, search google for it. If you are using SVN, read on. Committing is quite a nuisance since you have to go to the folder, right click and select commit. So I think it would be nice to have a hotkey to do this when I am coding and I've found a way to do it by using autohotkey. Here is the code for you:
^!c::
run C:/Program Files/TortoiseSVN/bin/TortoiseProc.exe /command:commit /path:"path to the folder you want to commit" /closeonend:1
return
The green part is the path to the file TortoiseProc.exe , the red part is the path to the folder you want to commit, the ^!c is the hotkey I set myself, you can change it to any key you want. (^ for ctrl, ! for alt, in this case, my hotkey is Ctrl+Alt+C to trigger the commit window).
So that's it. I found this is just great for me to prevent loss of code which I haven't committed yet. I hope it will be useful to you too.
Have a good day