Integrating Fossil in the Microsoft Express 2010 IDE
Contributed by Gilles Ganault on 2013-05-24.
The Express version of Visual Studio doesn't support add-in's and plug-in's, but it's not an issue since it's still possible to use Fossil through the External Tools menu and Fossil is a CLI application anyway:
- Tools > Settings > Expert Settings
- Tools > External Tools, where the items in this list map to "External Tool X" that we'll add to our own Fossil menu later:
- Rename the default "[New Tool 1]" to eg. "Commit" 2.
- Change Command to where Fossil is located eg. "c:\fossil.exe"
- Change Arguments to the required command, eg. "commit -m". The user will be prompted to type the comment that Commit expects
- Set "Initial Directory" to point it to the work directory where the source files are currently checked out by Fossil (eg. c:\Workspace). It's also possible to use system variables such as "$(ProjectDir)" instead of hard-coding the path
- Check "Prompt for arguments", since Commit requires typing a comment. Useless for commands like Changes that don't require arguments
- Uncheck "Close on Exit", so we can see what Fossil says before closing the DOS box. Note that "Use Output Window" will display the output in a child window within the IDE instead of opening a DOS box
- Click on OK
- Tools > Customize > Commands
- With "Menu bar = Menu Bar" selected, click on "Add New Menu". A new "Fossil" menu is displayed in the IDE's menu bar
- Click on "Modify Selection" to rename it "Fossil", and...
- Use the "Move Down" button to move it lower in the list
- Still in Customize dialog: In the "Menu bar" combo, select the new Fossil menu you just created, and Click on "Add Command...": From Categories, select Tools, and select "External Command 1". Click on Close. It's unfortunate that the IDE doesn't say which command maps to "External Command X".