Bazaar Visual Studio Integration
This small batch file simplifies the integration of Bazaar into Micorosoft Visual Studio
It works by adding external Tools in Visual Studio. You can use four different commands with this batch file:
- Add current file to branch
- Update local branch
- Commit, Update and Publish branch
- Branch log
It works with Visual Studio 2005 or later.
Here’s the readme file:
1. Copy the “bzr_vstools.bat” file to your Bazzar installation folder (C:Program FilesBazaar)
2. Make sure that folder is set int the Windows “PATH” environment variable.
3. In Visual Studio, goto the external tools manager (Tools->External Tools…)
4. Add 4 tools with the following parameters (sftp://domain.tld/yourproject/ is the url to your project on the server)
I)
Title: “&Add current file to branch”
Command: “bzr.exe”
Arguments: “add $(ItemPath)”
Initial directory: “$(ProjectDir)”
Use output window: yes
II)
Title: “&Update local branch”
Command: “bzr_vstools.bat”
Arguments: merge sftp://domain.tld/yourproject/ $(SolutionFileName)
Initial directory: “$(ProjectDir)”
Use output window: no
Close on exit: no
III)
Title: “Commit, Update and &Publish branch”
Command: “bzr_vstools.bat”
Arguments: “cmp sftp://domain.tld/yourproject/ $(SolutionFileName)”
Initial directory: “$(ProjectDir)”
Use output window: no
Close on exit: no
IV)
Title: “Branch &log”
Command: “bzr.exe”
Arguments: “log”
Initial directory: “$(ProjectDir)”
Use output window: yes
5. That’s it, now you can use the tools to merge and commit your project and add files easily.
Additional info:
Creating External Tools:
http://msdn2.microsoft.com/en-us/library/9814d200.aspx
How to define Shortcut Keys to external tools:
http://msdn2.microsoft.com/en-us/library/80cb6ks3.aspx
Bazaar User Guide:
http://doc.bazaar-vcs.org/bzr.dev/en/user-guide/index.html
Copyright (c) 2008 by Fabian Schlieper
http://fabi.me/
Process-Freezer – suspend processes Limit download/upload bandwidth

Alternatively, you can create separate, external tools making use of bzr.exe and tbzrcommand.exe. Commit can just be left with C:\Program Files\Bazaar\bzr.exe and arguments of “commit -m ” and prompt for (more) arguments (allowing you to fill in the message). File Diff can use C:\Program Files\tbzrcommand.exe and arguments of –command=diff –file=$(ItemPath). The latter uses TortoiseBzr (tbzrcommand.exe) to load the latest committed version and compare it to the working version in a separate window. It works quite well.