Bazaar

Bazaar

 




Wiki Tools

  • Find Page
  • Recent Changes
  • Page History
  • Attachments

TortoiseBZR is a Windows shell extension (similar to TortoiseCVS, TortoiseSVN or TortoiseHG ) for viewing the source control status of a bzr tree from within Windows Explorer.

Since Bazaar version 1.6, TortoiseBZR is included in the official installer - please visit the Bazaar download page for the latest version.

Status

  • Remote process used to cache status requests and provide commands for menus etc.
    Shell extension is implemented in C++ and requires Windows SDK to build.

  • Icon overlays works.
  • Context Menu works; supported commands will vary over time (but all command logic provided by remote process)
  • QBzr plugin leveraged for user interface (via an external process)
  • Debugging/trace output to .bzr.log
    This cause mixed log when user uses command line too. tbzrcache may should use separatedlog file.

  • Shared overlays with TortoiseSVN etc via TortoiseOverlays

  • Hooks QBzr commands like qinit when it executed from TortoiseBZR.
  • Asynchronouse IconOverlay updating.
    Currently showing overlay blocks Explorer until get status. So when overlay required and not cached, show "unknown" icon overlay. This feature is implemented in TortoiseHG. TortoiseBZR should share status ID and icon with TortoiseHG.

Tips for User

TODO

  • Shell updater - Auto update shell when cache status is changed.
  • Finalize context menu options - See TortoiseBzrContextMenu for current thoughts.

Screen Shots

Screenshots can be found on the screenshots page.

Development

Please visit the TortoiseBZR Launchpad Page for details about development.

Installation from sources

  • Install Windows SDK

  • Install Python plus the latest pywin32 extensions

  • Install the latest TortoiseOverlays from the /bin map contained in the version map

  • (Or install the latest TortoiseSVN, which includes the latest TortoiseOverlays version)

  • Install the latest QBzr and PyQT4 (download the binary package including the Qt libraries unless you already have the Qt libraries or want a newer version)

  • Install the latest Bazaar. (Use python based installer)

  • Branch the most recent version from the TortoiseBZR Launchpad Page.

  • This creates a directory "tortoisebzr" including all files and their history in the current directory.
    • X:\
      bzr branch lp:tortoisebzr
  • Make sure that a recent copy of bzr.dev and the TortoiseBZR directory are in your sys.path (PYTHONPATH)(ie, both 'import bzrlib' and 'import tbzrlib' should work)
    • For example by adding their paths to your PYTHONPATH environment variable in your current command prompt (cmd.exe)
      set PYTHONPATH=X:\tortoisebzr
    • By adding TortoiseBZR to the PYTHONPATH user (or system) variable
      • Right click My Computer -> Properties -> Tab Advanced -> Button Environment Variables -> Button New (or edit if the PYTHONPATH variable already exists).

      • User variables only apply to the current users, system variables to the whole system
      • This also makes sure TortoiseBZR's own screens (Help, Settings and About) work (since they need TortoiseBZR in the sys.path)
    • To test if both are in the Python sys.path run from a command prompt (cmd.exe). Both commands should give no errors.
      python -c "import bzrlib"
      python -c "import tbzrlib"
  • To get the TortoiseBZR tray-icon to show copy the Bazaar icon icon to X:\path\to\Python\Lib\site-packages\bzr.ico

  • Build the files required for TortoiseBZR's screens (Help, Settings and About) and register the shell extension by running "shellext\python\tbzr.py"
    • Must be done from an elevated command-prompt on Vista (holding CTRL+SHIFT while starting a command-prompt may be convenient)
      X:
      cd tortoisebzr
      python setup.py build_ui
  • Install shellext dll (TODO: explain)
  • Restart explorer.exe to see TortoiseBZR's overlayed icons and context menu items at work

  • For more info see the included readme.txt and doc\index.txt

Tips for development

  • If you make a change to the tbzrcache process, simply close any existing versions of the process to see changes - there is no need to restart explorer itself.
  • If you make changes to the shell extension code itself, setting the "Launch Folder Windows in a separate process" Explorer option and starting a new copy of explorer.exe can avoid needing to restart the "global" explorer process between each change.

Useful Links

History/Credits

Szilveszter made a first proof-of-concept during the sprint in Amsterdam in 2007 using file type handlers. Wouter van Heyst and Jelmer Vernooij started the Python implementation a few weeks later. Henry Ludemann took that code and improved it a bit. Alexander Haro has picked up the project and worked on it as part of Google's Summer of Code. In 2008 Mark Hammond continued this work and integrated it into the offical bzr Windows installer.

explanation about why TortoiseOverlays has to be used