Bitbucket is a code hosting site with unlimited public and private repositories. We're also free for small teams!

Close

Bazaar trailing whitespace killer plugin

The only thing this plugin does is checks all files you're committing and unconditionally kills trailing whitespaces from them. Additionally file ending is normalized - all empty lines at the end of file being committed are stripped and one is added (final newline is common and is expected usually).

You can install it system-wide:

pip install bzr-killtrailing

But please don't try to uninstall it with pip, because bzrlib is not declared as a namespace by Bazaar, which means that pip will want to remove whole bzrlib (read: bazaar itself).

Alternatively, you can install it in your home directory:

mkdir -p ~/.bazaar/plugins/
cd !$
rm -rf killtrailing # clean up if you've had it before
curl http://hg.piranha.org.ua/bzr-killtrailing/archive/tip.tar.gz | tar xf -
mv bzr-killtrailing-* killtrailing

Or, alternatively, if you have Mercurial installed, you could do that:

mkdir -p ~/.bazaar/plugins/
cd !$
hg clone http://hg.piranha.org.ua/bzr-killtrailing/ killtraling

You can check if a plugin is installed and ready to work by issuing this command:

bzr plugins | grep killtrailing

That's it! Enjoy. :)

Recent activity

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.