This recipe was created for those who use RubyMine for code development, Subversion for source control and Araxis Merge for code comparison. It helps to merge the code between local branches quickly and easily.
For example, let's say you have the following directory structure:
dev
|- project1
|- project1_branch
|- project2
|- project2_branch
Using this recipe you can select any file or folder in project1
in RubyMine, then use the hotkey to open the Araxis Merge window with the comparison of this file between project1
and project1_branch
.
- Put
compare_with_araxis_merge.rb
script in user's home directory. For example,/Users/eugene
. - Configure your projects and branch name in the script:
* Specify the name of your branch in
BRANCH
constant. * Specify the list of projects inPROJECTS
constant. - Add external tool into RubyMine:
* Select RubyMine -> Preferences -> IDE Settings -> External Tools -> Add.
* Setup fields as on following screenshot
- Add hotkey for added tool:
* Select RubyMine -> Preferences -> IDE Settings -> Keymap -> External Tools -> Compare with Araxis Merge.
* Right click on Compare with Araxis Merge -> Add Keyboard Shortcut and enter a hotkey. For example,
Shift + Command + W
.
Select any file or folder anywhere in RubyMine and click Tools -> Compare with Araxis Merge. Or press the hotkey Shift + Command + W
.
- RubyMine.
- Araxis Merge.
Done by Eugene Naruta.