SourceTree supports the notion of custom actions, though they only appear to run external scripts rather than provide a mechanism to run custom embedded Mercurial and Git commands not already present in the UI. SourceTree also supports the hgflow extension for Mercurial, but only presents a UI for a limited subset of the workflow commands.
Specifically, I would like to promote the current set of commits in a feature branch into the development branch, without closing the feature branch. A hg flow feature promote command would appear to what I need, but I need some instructions about how to configure that as a SourceTree custom action. It would be easy to script that if I could run the command on a command line, but I don't know how to run SourceTree's embedded Mercurial command with the embedded hgflow extension enabled. I tried running /Applications/SourceTree.app/Contents/Resources/mercurial_local/hg_local flow but I get the following error:
hg: unknown command 'flow'
'flow' is provided by the following extension:
hgflow commands to support Driessen's branching model
(use "hg help extensions" for information on enabling extensions)
I could download the hgflow extension for the system copy of Mercurial, but I'm a bit wary about mixing between the embedded SourceTree Mercurial and system Mercurial.
So, does anyone know how to get a SourceTree custom action to make use of a command using the embedded Mercurial with its embedded extensions enabled?
Alternatively, would there be any risks in configuring my system Mercurial to use extensions supplied with the SourceTree embedded Mercurial?