This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!
Project Description

Execute the same Mercurial command in many repositories.

1   Example

Imagine you have Mercurial repositories in ~/src/libs/acme, ~/src/libs/net/aaa, and ~/src/libs/net/bbb. Then:

cd ~/src/libs
hg alldirs status
# … shows status in all three repos
hg alldirs heads -t
# … and heads
hg alldirs log -l 2
# … and recent commit

and even:

hg alldirs commit -m "Documentation updates"
# Commit in all three repos
hg alldirs push bb
# … and pushes them all

Relative file names are resolved against given repo root (the command chdirs to every repo before actually executing it):

hg alldirs commit -m "Version update" setup.py src/version.py

Note

In practice I usually shortcut the command and type:

hg alld status
# etc

Note that alldirs does not require any kind of parent repository.

In case you are already inside some repo, command is executed on it, so alld does not matter:

cd ~/src/libs/net/aaa
hg status
hg alld status
# … Both do the same

2   Failure handling

In case given command is not known (hg alldirs badcommand), or got invalid options (hg alldirs log -s), error is reported immediately and processing stops.

Note

Technically: command name and params are parsed once, before visiting subdirs.

In case given commands fails during execution (hg alldirs pull nosuchalias), alldirs executes the command in every repo (doesn’t stop). After finishing the job, it summarizes list of repositories in which the command failed.

Note

That is done on purpose, I do not want my hg alld pull to break if some repo lacks default path.

In both cases whole command returns exit status signalling an error.

3   Installation

3.1   Linux/Unix (from PyPI)

If you have working pip or easy_install:

pip install --user mercurial_all_dirs

or maybe:

sudo pip install mercurial_all_dirs

(or use easy_install instead of pip). Then activate by:

[extensions]
mercurial_all_dirs =

To upgrade, repeat the same command with --upgrade option, for example:

pip install --user --upgrade mercurial_all_dirs

3.2   Linux/Unix (from source)

If you don’t have pip, or wish to follow development more closely:

  • clone both this repository and mercurial_extension_utils and put them in the same directory, for example:

    cd ~/sources
    hg clone https://bitbucket.org/Mekk/mercurial-extension_utils/
    hg clone https://bitbucket.org/Mekk/mercurial-all_dirs/
    
  • update to newest tags,

  • activate by:

    [extensions]
    mercurial_all_dirs = ~/sources/mercurial-all_dirs/mercurial_all_dirs.py
    

To upgrade, pull and update.

See mercurial_extension_utils for longer description of this kind of installation.

3.3   Windows

If you have any Python installed, you may install with pip:

pip install mercurial_all_dirs

Still, as Mercurial (whether taken from TortoiseHg, or own package) uses it’s own bundled Python, you must activate by specifying the path:

[extensions]
mercurial_all_dirs = C:/Python27/Lib/site-packages/mercurial_all_dirs.py
;; Or wherever pip installed it

To upgrade to new version:

pip --upgrade mercurial_all_dirs

If you don’t have any Python, clone repositories:

cd c:\hgplugins
hg clone https://bitbucket.org/Mekk/mercurial-extension_utils/
hg clone https://bitbucket.org/Mekk/mercurial-all_dirs/

update to tagged versions and activate by path:

[extensions]
mercurial_all_dirs = C:/hgplugins/mercurial-all_dirs/mercurial_all_dirs.py
;; Or wherever you cloned

See mercurial_extension_utils documentation for more details on Windows installation.

6   Development, bug reports, enhancement suggestions

Development is tracked on BitBucket, see http://bitbucket.org/Mekk/mercurial-all_dirs/

Use BitBucket issue tracker for bug reports and enhancement suggestions.

7   Additional notes

Information about this extension is also available on Mercurial Wiki: http://mercurial.selenic.com/wiki/AllDirsExtension

Check also other Mercurial extensions I wrote.

Release History

Release History

0.6.4

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.6.3

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.6.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.6.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.6.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.5.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.4.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.4.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.4.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.3.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
mercurial_all_dirs-0.6.4.tar.gz (9.4 kB) Copy SHA256 Checksum SHA256 Source May 18, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting