Differences between revisions 4 and 5
Revision 4 as of 2011-03-14 11:21:40
Size: 1195
Comment:
Revision 5 as of 2011-03-24 15:09:42
Size: 1199
Comment:
Deletions are marked like this. Additions are marked like this.
Line 5: Line 5:
''Author: Martin Geisler'' ''Author: MartinGeisler''
Line 7: Line 7:
Download site: https://bitbucket.org/mg/onsub/ Download site: https://bitbucket.org/aragost/onsub/

onsub

This extension is not distributed with Mercurial.

Author: MartinGeisler

Download site: https://bitbucket.org/aragost/onsub/

Overview

The onsub extension will traverse all subrepositories and execute a command in each.

This can be used to update all subrepositories with one command:

$ hg onsub "hg pull -u"

The extension provides a number of environment variables for you to use in your commands:

  • HG_REPO: Absolute path to the top-level repository in which the onsub command was executed.

  • HG_SUBPATH: Relative path to the current subrepository from the top-level repository.

  • HG_SUBURL: URL for the current subrepository as specified in the containing repository's .hgsub file.

  • HG_SUBSTATE: State of the current subrepository as specified in the containing repository's .hgsubstate file.

Consult hg help onsub after enabling the extension for the full and up-to-date documentation.

Configuration

Configure your .hgrc to enable the extension by adding following lines:

[extensions]
onsub = path/to/onsub/onsub.py


CategoryExtension CategoryExtensionsByOthers

OnsubExtension (last edited 2017-08-09 07:52:12 by SimonHeimberg)