mercurial-all-paths


Namemercurial-all-paths JSON
Version 1.2.2 PyPI version JSON
download
home_pagehttps://foss.heptapod.net/mercurial/mercurial-all_paths
SummaryMercurial allpaths extension
upload_time2024-09-25 07:43:35
maintainerNone
docs_urlNone
authorMarcin Kasperski
requires_pythonNone
licenseGNU General Public License v2 (GPLv2)
keywords mercurial paths multi extension
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            .. -*- mode: rst; compile-command: "rst2html README.rst README.html" -*-

================================================
Mercurial All Paths extension
================================================

Push or pull to many (or all) paths at once. 

.. contents::
   :local:
   :depth: 2

.. sectnum::

Basic usage
================================================

Execute::

    hg pushall

to push to all remotes which are defined for the repository. Or::

    hg pullall

to pull from all remotes in order.

There are also::

    hg incomingall

    hg outgoingall

Standard push/pull options can be given, for example::

    hg pushall -f -B issue-13724

    hg pullall -r stable --insecure

Those commands iterate over all paths returned by ``hg paths``.  This
usually means iterating over paths defined in ``[paths]`` section of
``.hg/hgrc``, but `Path Pattern`_ paths are also handled. You can
impact this behaviour by configuration, see below.


Defining path groups
================================================

Instead of pushing/pulling everywhere, you can define and use *groups*::

    hg pushall -g publish

pushes to all paths from the ``publish`` group (where ``publish`` is
symbolic name of your choosing). Or::

    hg pullall -g shared

pulls from all paths in ``shared`` group.

There are two ways to define such a group:

1. Define appropriate entry in ``[all_paths]`` section (either in ``.hg/hgrc``
   or in your global ``~/.hgrc``). For example::

     [all_paths]
     group.publish = bitbucket github backup

   (path aliases ``bitbucket``, ``github`` and ``backup`` must
   be somehow defined).

2. (Legacy method) Put the section of the same name in ``.hg/hgrc``,
   and define all paths there. For example::

    [publish]
    bitbucket = ssh://hg@bitbucket.org/ludovicchabant/piecrust
    github = git+ssh://git@github.com:ludovicchabant/PieCrust.git
    backup = ssh://ludo@backup.local/piecrust

   The syntax is the same as in standard ``[paths]`` section, just
   name the section with the name of your group.

   .. note::

      Be careful to avoid conflicts with names which mean something
      to Mercurial. For example ``web`` would be a bad name as ``[web]``
      section configures ``hg serve`` behaviour, and ``ui`` would be
      fatal as ``[ui]`` configures various basic Mercurial settings.

I recommend the former method as it avoids the risk of conflicts,
makes it easy to define groups globally instead of defining them for
every repository (especially handy if you use `Path Pattern`_), and is
more compact.

Groups are also handled for ``incomingall`` and ``outgoingall``, but
long ``--group`` option must be used (``-g`` is already taken by
standard Mercurial, means reporting in ``--git`` diff format)::

     hg outgoingall --group publish

Configuration
=======================================================

The extension can be configured using ``[all_paths]`` section of your
global (``~/.hgrc``) or repository-level (``.hg/hgrc``) config file::

  [all_paths]
  prioritize = platon department
  ignore = bitbucket production
  group.publish = github bitbucket
  group.backup = homebackup awsbackup

``prioritize`` impacts the order, defines paths which are to be
handled first (if present). This is mostly useful for ``pullall``
where pulling from local fast computer before pulling from remote
server means saving some time and traffic. So::

  prioritize = platon department

means: if path named ``platon`` is present, handle it first, then
path named ``department``, only then follow to the other paths.

``ignore`` lists paths which should be ignored, those remotes will
be skipped. So::

  ignore = bitbucket production

means that ``hg pullall`` or ``hg pushall`` should not use
``bitbucket`` path (in my case because this is HTTP remote, and I have
also preferable ``bitssh``configured), and ``production`` path (as
there I prefer to pull and push only on specific demand).

Both those settings impact only *default* commands (those run
without ``-g GROUP`` option). In case of groups items are processed
in the order they are specified in group definition.

``group.«NAME»`` define group for ``-g «NAME»`` as described earlier. 


Installation
=======================================================

From PyPi
--------------------

If you have working ``pip`` or ``easy_install``::

    pip install --user mercurial_all_paths

or maybe::

    sudo pip install mercurial_all_paths

Then activate by::

    [extensions]
    mercurial_all_paths =

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

    pip install --user --upgrade mercurial_all_paths

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://foss.heptapod.net/mercurial/mercurial-extension_utils/
    hg clone https://foss.heptapod.net/mercurial/mercurial-all_paths/

- update to newest tags,

- activate by::

    [extensions]
    mercurial_all_paths = ~/sources/mercurial-all_paths/mercurial_all_paths.py

To upgrade, pull and update.

Note that directory names matter. See `mercurial_extension_utils`_ for
longer description of this kind of installation.

History
=======================================================

See `HISTORY.rst`_

Repository, bug reports, enhancements suggestions
=======================================================

Development is tracked on HeptaPod, see

    https://foss.heptapod.net/mercurial/mercurial-all_paths/

Use issue tracker there for bug reports and enhancement
suggestions.

Thanks to Octobus_ and `Clever Cloud`_ for hosting this service.

Original repository, maintained by Ludovic Chabant:

    https://bitbucket.org/ludovicchabant/allpaths


Additional notes
=======================================================

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



.. _Octobus: https://octobus.net/
.. _Clever Cloud: https://www.clever-cloud.com/

.. _Path Pattern: https://foss.heptapod.net/mercurial/mercurial-path_pattern/
.. _HISTORY.rst: https://foss.heptapod.net/mercurial/mercurial-all_paths/src/tip/HISTORY.rst
.. _mercurial_extension_utils: https://foss.heptapod.net/mercurial/mercurial-extension_utils/


            

Raw data

            {
    "_id": null,
    "home_page": "https://foss.heptapod.net/mercurial/mercurial-all_paths",
    "name": "mercurial-all-paths",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "mercurial paths multi extension",
    "author": "Marcin Kasperski",
    "author_email": "Marcin.Kasperski@mekk.waw.pl",
    "download_url": "https://files.pythonhosted.org/packages/77/85/1ca6de331cbdba292d50c36c04aaee407ee09807e1dcfa3c35afe20a4443/mercurial_all_paths-1.2.2.tar.gz",
    "platform": null,
    "description": ".. -*- mode: rst; compile-command: \"rst2html README.rst README.html\" -*-\n\n================================================\nMercurial All Paths extension\n================================================\n\nPush or pull to many (or all) paths at once. \n\n.. contents::\n   :local:\n   :depth: 2\n\n.. sectnum::\n\nBasic usage\n================================================\n\nExecute::\n\n    hg pushall\n\nto push to all remotes which are defined for the repository. Or::\n\n    hg pullall\n\nto pull from all remotes in order.\n\nThere are also::\n\n    hg incomingall\n\n    hg outgoingall\n\nStandard push/pull options can be given, for example::\n\n    hg pushall -f -B issue-13724\n\n    hg pullall -r stable --insecure\n\nThose commands iterate over all paths returned by ``hg paths``.  This\nusually means iterating over paths defined in ``[paths]`` section of\n``.hg/hgrc``, but `Path Pattern`_ paths are also handled. You can\nimpact this behaviour by configuration, see below.\n\n\nDefining path groups\n================================================\n\nInstead of pushing/pulling everywhere, you can define and use *groups*::\n\n    hg pushall -g publish\n\npushes to all paths from the ``publish`` group (where ``publish`` is\nsymbolic name of your choosing). Or::\n\n    hg pullall -g shared\n\npulls from all paths in ``shared`` group.\n\nThere are two ways to define such a group:\n\n1. Define appropriate entry in ``[all_paths]`` section (either in ``.hg/hgrc``\n   or in your global ``~/.hgrc``). For example::\n\n     [all_paths]\n     group.publish = bitbucket github backup\n\n   (path aliases ``bitbucket``, ``github`` and ``backup`` must\n   be somehow defined).\n\n2. (Legacy method) Put the section of the same name in ``.hg/hgrc``,\n   and define all paths there. For example::\n\n    [publish]\n    bitbucket = ssh://hg@bitbucket.org/ludovicchabant/piecrust\n    github = git+ssh://git@github.com:ludovicchabant/PieCrust.git\n    backup = ssh://ludo@backup.local/piecrust\n\n   The syntax is the same as in standard ``[paths]`` section, just\n   name the section with the name of your group.\n\n   .. note::\n\n      Be careful to avoid conflicts with names which mean something\n      to Mercurial. For example ``web`` would be a bad name as ``[web]``\n      section configures ``hg serve`` behaviour, and ``ui`` would be\n      fatal as ``[ui]`` configures various basic Mercurial settings.\n\nI recommend the former method as it avoids the risk of conflicts,\nmakes it easy to define groups globally instead of defining them for\nevery repository (especially handy if you use `Path Pattern`_), and is\nmore compact.\n\nGroups are also handled for ``incomingall`` and ``outgoingall``, but\nlong ``--group`` option must be used (``-g`` is already taken by\nstandard Mercurial, means reporting in ``--git`` diff format)::\n\n     hg outgoingall --group publish\n\nConfiguration\n=======================================================\n\nThe extension can be configured using ``[all_paths]`` section of your\nglobal (``~/.hgrc``) or repository-level (``.hg/hgrc``) config file::\n\n  [all_paths]\n  prioritize = platon department\n  ignore = bitbucket production\n  group.publish = github bitbucket\n  group.backup = homebackup awsbackup\n\n``prioritize`` impacts the order, defines paths which are to be\nhandled first (if present). This is mostly useful for ``pullall``\nwhere pulling from local fast computer before pulling from remote\nserver means saving some time and traffic. So::\n\n  prioritize = platon department\n\nmeans: if path named ``platon`` is present, handle it first, then\npath named ``department``, only then follow to the other paths.\n\n``ignore`` lists paths which should be ignored, those remotes will\nbe skipped. So::\n\n  ignore = bitbucket production\n\nmeans that ``hg pullall`` or ``hg pushall`` should not use\n``bitbucket`` path (in my case because this is HTTP remote, and I have\nalso preferable ``bitssh``configured), and ``production`` path (as\nthere I prefer to pull and push only on specific demand).\n\nBoth those settings impact only *default* commands (those run\nwithout ``-g GROUP`` option). In case of groups items are processed\nin the order they are specified in group definition.\n\n``group.\u00abNAME\u00bb`` define group for ``-g \u00abNAME\u00bb`` as described earlier. \n\n\nInstallation\n=======================================================\n\nFrom PyPi\n--------------------\n\nIf you have working ``pip`` or ``easy_install``::\n\n    pip install --user mercurial_all_paths\n\nor maybe::\n\n    sudo pip install mercurial_all_paths\n\nThen activate by::\n\n    [extensions]\n    mercurial_all_paths =\n\nTo upgrade, repeat the same command with ``--upgrade`` option, for\nexample::\n\n    pip install --user --upgrade mercurial_all_paths\n\nFrom source\n-------------------------------------------------------\n\nIf you don't have ``pip``, or wish to follow development more closely:\n\n- clone both this repository and `mercurial_extension_utils`_ and put\n  them in the same directory, for example::\n\n    cd ~/sources\n    hg clone https://foss.heptapod.net/mercurial/mercurial-extension_utils/\n    hg clone https://foss.heptapod.net/mercurial/mercurial-all_paths/\n\n- update to newest tags,\n\n- activate by::\n\n    [extensions]\n    mercurial_all_paths = ~/sources/mercurial-all_paths/mercurial_all_paths.py\n\nTo upgrade, pull and update.\n\nNote that directory names matter. See `mercurial_extension_utils`_ for\nlonger description of this kind of installation.\n\nHistory\n=======================================================\n\nSee `HISTORY.rst`_\n\nRepository, bug reports, enhancements suggestions\n=======================================================\n\nDevelopment is tracked on HeptaPod, see\n\n    https://foss.heptapod.net/mercurial/mercurial-all_paths/\n\nUse issue tracker there for bug reports and enhancement\nsuggestions.\n\nThanks to Octobus_ and `Clever Cloud`_ for hosting this service.\n\nOriginal repository, maintained by Ludovic Chabant:\n\n    https://bitbucket.org/ludovicchabant/allpaths\n\n\nAdditional notes\n=======================================================\n\nInformation about this extension is also available\non Mercurial Wiki: http://mercurial.selenic.com/wiki/AllPathsExtension\n\n\n\n.. _Octobus: https://octobus.net/\n.. _Clever Cloud: https://www.clever-cloud.com/\n\n.. _Path Pattern: https://foss.heptapod.net/mercurial/mercurial-path_pattern/\n.. _HISTORY.rst: https://foss.heptapod.net/mercurial/mercurial-all_paths/src/tip/HISTORY.rst\n.. _mercurial_extension_utils: https://foss.heptapod.net/mercurial/mercurial-extension_utils/\n\n",
    "bugtrack_url": null,
    "license": "GNU General Public License v2 (GPLv2)",
    "summary": "Mercurial allpaths extension",
    "version": "1.2.2",
    "project_urls": {
        "Homepage": "https://foss.heptapod.net/mercurial/mercurial-all_paths"
    },
    "split_keywords": [
        "mercurial",
        "paths",
        "multi",
        "extension"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "77851ca6de331cbdba292d50c36c04aaee407ee09807e1dcfa3c35afe20a4443",
                "md5": "b7f50510bae9e81060d6bb1015eb739b",
                "sha256": "529f1e81511570d9a0a2d3b38ffc3631f9006a79d7ec4b072058313cab6e5ced"
            },
            "downloads": -1,
            "filename": "mercurial_all_paths-1.2.2.tar.gz",
            "has_sig": false,
            "md5_digest": "b7f50510bae9e81060d6bb1015eb739b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 19136,
            "upload_time": "2024-09-25T07:43:35",
            "upload_time_iso_8601": "2024-09-25T07:43:35.131712Z",
            "url": "https://files.pythonhosted.org/packages/77/85/1ca6de331cbdba292d50c36c04aaee407ee09807e1dcfa3c35afe20a4443/mercurial_all_paths-1.2.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-25 07:43:35",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "mercurial-all-paths"
}
        
Elapsed time: 0.35832s