Proposal for new tool: defpath

Erik Helin erik.helin at oracle.com
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 http://hg.openjdk.java.net/jdk9/hs
  $ cd hs
  $ hg defpath -d -u ehelin
  $ cat .hg/hgrc
  [paths]
  default = http://hg.openjdk.java.net/jdk9/hs
  default-push = ssh://ehelin@hg.openjdk.java.net/jdk9/hs

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

  $ hg tclone http://hg.openjdk.java.net/jdk9/hs
  $ 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: http://cr.openjdk.java.net/~ehelin/defpath.py

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

Thanks,
Erik

[0]: http://mercurial-scm.org/


More information about the hg-tools-dev mailing list