Skip to content

Commit

Permalink
Fix README mess.
Browse files Browse the repository at this point in the history
- Unify tabs and spaces.
- Delete remainders of Markdown markup.
- Correct indentation for all blocks.
- Separate configuration from usage instructions.
- Add sections where needed.
  • Loading branch information
yajo committed Jan 3, 2017
1 parent af14fb6 commit 23c5647
Showing 1 changed file with 80 additions and 65 deletions.
145 changes: 80 additions & 65 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
:alt: License: AGPL-3
.. image:: https://travis-ci.org/acsone/git-aggregator.svg?branch=master
:target: https://travis-ci.org/acsone/git-aggregator
.. image:: https://coveralls.io/repos/acsone/git-aggregator/badge.png?branch=master
.. image:: https://coveralls.io/repos/acsone/git-aggregator/badge.png?branch=master
:target: https://coveralls.io/r/acsone/git-aggregator?branch=master
.. image:: https://img.shields.io/badge/python-2.7%2C%203.3%2C%203.4%2C%203.5-blue.svg
:alt: Python support: 2.7, 3.3, 3.4, 3.5
Expand All @@ -14,109 +14,124 @@ git-aggregator

Manage the aggregation of git branches from different remotes to build a consolidated one.


Command line Usage:
===================
Configuration file
==================

Create a ``repos.yaml`` file:

.. code-block:: yaml
./product_attribute:
remotes:
oca: https:/OCA/product-attribute.git
acsone: git+ssh://[email protected]/acsone/product-attribute.git
merges:
- oca 8.0
- oca refs/pull/105/head
- oca refs/pull/106/head
target: acsone aggregated_branch_name

./connector-interfaces:
remotes:
oca: https:/OCA/connector-interfaces.git
acsone: https:/acsone/connector-interfaces.git
merges:
- oca 6054de2c4e669f85cec380da90d746061967dc83
- acsone 8.0-connector_flow
- acsone 80_connector_flow_ir_cron_able-lmi
- acsone 8.0_connector_flow_improve_eval_config
target: acsone aggregated_branch_name
fetch_all:
- oca
.. code-block:: yaml
./product_attribute:
remotes:
oca: https:/OCA/product-attribute.git
acsone: git+ssh://[email protected]/acsone/product-attribute.git
merges:
- oca 8.0
- oca refs/pull/105/head
- oca refs/pull/106/head
target: acsone aggregated_branch_name
./connector-interfaces:
remotes:
oca: https:/OCA/connector-interfaces.git
acsone: https:/acsone/connector-interfaces.git
merges:
- oca 6054de2c4e669f85cec380da90d746061967dc83
- acsone 8.0-connector_flow
- acsone 80_connector_flow_ir_cron_able-lmi
- acsone 8.0_connector_flow_improve_eval_config
target: acsone aggregated_branch_name
fetch_all:
- oca
Fetching only required branches
-------------------------------

If any of your merges refer to a specific commit, you will probably need to
fetch all remotes from the corresponding remote or [use any other strategy to
get that fetch working](http://stackoverflow.com/a/30701724/1468388), but we
fetch all remotes from the corresponding remote or `use any other strategy to
get that fetch working <http://stackoverflow.com/a/30701724/1468388>`_, but we
recommend to simply add this like in the example above:

.. code-block:: yaml
fetch_all:
- oca
- other-remote
You can specify that you want to fetch all references from all remotes you have defined with:

.. code-block:: yaml
fetch_all: true
Aggregate you repositories at any time:
Triggers
--------

It's also possible to specify a command or a list of shell commands to execute
after the aggregation (and before the push). The commands are executed into
the aggregated directory.

.. code-block:: yaml
./product_attribute:
remotes:
oca: https:/OCA/product-attribute.git
acsone: git+ssh://[email protected]/acsone/product-attribute.git
merges:
- oca 8.0
target: acsone aggregated_branch_name
shell_command_after: echo 'my command'
./connector-interfaces:
remotes:
oca: https:/OCA/connector-interfaces.git
acsone: https:/acsone/connector-interfaces.git
merges:
- oca 9.0
target: acsone aggregated_branch_name
shell_command_after:
- echo 'a first command'
- echo 'a second command'
Command line Usage
==================

.. code-block:: bash
Following the example ``repos.yaml`` file from above, aggregate your
repositories at any time:

.. code-block:: bash
$ gitaggregate -c repos.yaml
You can also aggregate and automatically push the result to the target:

.. code-block:: bash
.. code-block:: bash
$ gitaggregate -c repos.yaml -p
Only aggregate a specific repository using `fnmatch`_:

.. code-block:: bash
.. code-block:: bash
$ gitaggregate -c repos.yaml -p -d connector-interfaces
.. _fnmatch: https://docs.python.org/2/library/fnmatch.html

It's also possible to specify a command or a list of shell commands to execute
after the aggregation (and before the push). The commands are executed into
the aggregated directory.

.. code-block:: yaml
./product_attribute:
remotes:
oca: https:/OCA/product-attribute.git
acsone: git+ssh://[email protected]/acsone/product-attribute.git
merges:
- oca 8.0
target: acsone aggregated_branch_name
shell_command_after: echo 'my command'

./connector-interfaces:
remotes:
oca: https:/OCA/connector-interfaces.git
acsone: https:/acsone/connector-interfaces.git
merges:
- oca 9.0
target: acsone aggregated_branch_name
shell_command_after:
- echo 'a first command'
- echo 'a second command'

Credits
=======

Author
------

* Laurent Mignon (ACSONE)
* Laurent Mignon (ACSONE)

Contributors
------------

* Cyril Gaudin (camptocamp)
* Jairo Llopis <[email protected]>
* Cyril Gaudin (camptocamp)
* Jairo Llopis (Tecnativa_)

.. _Tecnativa: https://www.tecnativa.com

Maintainer
----------
Expand All @@ -125,4 +140,4 @@ Maintainer
:alt: ACSONE SA/NV
:target: http://www.acsone.eu

This module is maintained by ACSONE SA/NV.
This project is maintained by ACSONE SA/NV.

0 comments on commit 23c5647

Please sign in to comment.