Proposal for new tool: defpath

Erik Helin erik.helin at
Tue Apr 26 10:12:59 UTC 2016

Hi all,

I would like to propose a new tool: defpath. defpath is an hg [0]
extension that makes it easy to update the push-path for a Mercurial
repository. A user can type the command:

  $ hg defpath -d -u <USERNAME>

and the correct (for OpenJDK projects) push-path will be added to .hg/hgrc,
based on the default path (and the -u argument). Below is an
example of how the tool can be used:

  $ hg clone
  $ cd hs
  $ hg defpath -d -u ehelin
  $ cat .hg/hgrc
  default =
  default-push = ssh://

The defpath extension also works in combination with the
trees Mercurial extension. Working with a forest, a user can run:

  $ hg tclone
  $ cd hs
  $ hg tdefpath -d -u <USERNAME>

and the push-path will be set for every repository in the forest.

The tool has been written by John Coomes and Mark Reinhold and can
be found at:

I propose that the tool will use the same email list as the other
Mercurial tools on code-tools, hg-tools-dev at



More information about the code-tools-dev mailing list