Menu

Devel

codeaster

Table of contents:

Developments in code_aster

This page does not explain how to use Mercurial for your developments.
See Mercurial docs for that.

code_aster branches

The main branches in the reference repository codeaster/src are:

  • default: the default branch containing all the history of the development version
    from and to the next testing state (ex.: 14.1.9).

  • v13: maintenance branch for the version 13, starting from 13.4.0.

Only bugfixes are integrated in the branch v13. All new features are
implemented in the default branch.

Keeping your repository up to date

We are supposing that you have already a local clone of the code_aster repository
(see Tutorial) and that it is ready for compilation
(see section Configuration and first build of code_aster).

The script install_env added two interesting revsets aliases:

  • reference or refe: is the last revision on the reference
    repository in the current branch. So, that is the last official revision
    from which every new development must start.

  • new: That is the set of the ancestor revisions of the current one that are unknown
    on the reference repository (the revisions that make the current development
    that are not yet integrated).

To know the last reference revision, type (you need a connection to the codeaster/src
repository):

1
2
    $ hg pull
    $ hg log --rev reference

Each time you start a new development and whenever you want to come back to
the last revision of the reference repository, you must retreive the last changes
into your local repository and update to the reference revision:

1
2
    $ hg pull
    $ hg update reference

hg update will keep the current changes in the working directory.
Use hg update --clean to discard uncommitted changes (see hg help update).

Update your developments to the last reference revision

  • Let's start with a such tree:

    • [#19999] is the current reference revision

    • [#20526] and [#20145] are two developments you are working on

1
2
3
4
5
6
7
8
        @  1467:10b01de78dcb default: [#20145] another step for a second issue
        |
        o  1466:0e76dc887c63 default: [#20145] first step for a second issue
        |
        | o  1465:1b39f6c1f683 default: [#20526] commit to solve a first issue
        |/
        o  1464:0ab3abbb22dd default: [#19999] this is the last integrated revision!
        |
  • Get the new revisions from the reference repository and update to the reference head:
1
2
        $ hg pull
        $ hg up reference

The tree becomes:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
        @  1468:12e1efd54f41 default: [#18888] a new official head
        |
        | o  1467:10b01de78dcb default: [#20145] another step for a second issue
        | |
        | o  1466:0e76dc887c63 default: [#20145] first step for a second issue
        |/
        | o  1465:1b39f6c1f683 default: [#20526] commit to solve a first issue
        |/
        o  1464:0ab3abbb22dd default: [#19999] this is the last integrated revision!
        |
  • Use hg rebase to move the revisions on the new head. We move the first revision
    of each branch, the child revisions follow.
1
2
3
4
        $ hg rebase -s 1b39f6c1f683 -d refe
        saved backup bundle to ***/.hg/strip-backup/1b39f6c1f683-backup.hg
        $ hg rebase -s 0e76dc887c63 -d refe
        saved backup bundle to ***/.hg/strip-backup/0e76dc887c63-backup.hg

In case of conflicts, a merge is required manually or using a tool like meld
for example.

The result is:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
        @  1468:db87dd7d8c4e default: [#20145] another step for a second issue
        |
        o  1467:54bbe7c14e0c default: [#20145] first step for a second issue
        |
        | o  1466:adb30e012987 default: [#20526] commit to solve a first issue
        |/
        o  1465:12e1efd54f41 default: [#18888] a new official head
        |
        o  1464:0ab3abbb22dd default: [#19999] this is the last integrated revision!
        |

We can see that these are new revisions, they have not been moved but rewritten.

Before sending a pull-request, please rebase your changes on the last reference revision.


Related

Wiki: Tutorial