add Bitbucket utility functions

What I needed are just a few utility functions...