developer.jelix.org is not used any more and exists only for history. Post new tickets on the Github account.
developer.jelix.org n'est plus utilisée, et existe uniquement pour son historique. Postez les nouveaux tickets sur le compte github.

Changes between Version 8 and Version 9 of fr/patchs


Ignore:
Timestamp:
Aug 23, 2010, 8:51:55 AM (10 years ago)
Author:
foxmask
Comment:

ajout des spécificité mercurial à traduire (en cours)

Legend:

Unmodified
Added
Removed
Modified
  • fr/patchs

    v8 v9  
    1818== création du patch ==
    1919
     20=== Vous créez un patch occasionnellement ===
     21
    2022Dans le répertoire des sources issues du dépôt mercurial, vous avez donc normalement effectué vos modifications. Placez vous alors dans le répertoire trunk (ou celui d'une branche si c'est une modification sur une branche), et tapez ensuite la commande
    2123
     
    3335
    3436Si il y a des conflits, des fichiers manquants etc, il va falloir appliquer les modifications '''à la main''', faire des tests etc.. Il est possible d'utiliser hg clone pour recopier des nouveaux fichiers d'une branche à une autre, ou faire un hg merge.
     37
     38
     39=== Vous êtes un contributeur active ===
     40
     41If you provide often some patches (unrelated or not), the best way is to manage a queue of patch, with the "mq" extension of Mercurial. Having his own branch/fork of the repository for that is not recommended, as a reviewer can refused your commit. So you can have at the end several commit for a single "patch", and the problem is that we want to have a clear history (one commit per ticket, except for big changes).
     42
     43You can host your queue only on your computer, or you can share your queue on bitbucket. If you don't use bitbucket, just attach your patches on corresponding tickets and then request a review (see below).
     44
     45If you want to share your queue of patchs (and it can be useful for reviewer to see the history of changes on your patch, review after review), you can use bitbucket. Create an account on bitbucket.org, and follow this instructions (replace "jelix-trunk" by jelix-1.1.x or other branch name if you want to work with branches):
     46
     47  * Go on http://bitbucket.org/jelix/jelix-trunk/
     48  * click on "patch queue", fill the form, by giving a name to your repository for the queue. Take "jelix-trunk-patches" for example
     49  * you can then clone your new repository which contains the patch (use qclone, and not clone !):
     50{{{
     51hg qclone ssh://hg@bitbucket.org/your-login/jelix-trunk-patches
     52}}}
     53  * On your computer, you have now a jelix-trunk-patches directory, with a .hg/patches/ directory. Now fill the directory with the content of jelix-trunk, to have source code of jelix with your patchs queue
     54{{{
     55cd jelix-trunk-patches
     56hg pull -u ssh://hg@bitbucket.org/jelix/jelix-trunk
     57}}}
     58
     59You can start now to work. Let's create a first patch:
     60{{{
     61# create the patch
     62hg qnew ticket123.patch
     63
     64# do some modifications on files
     65...
     66# refresh the patch each time you made some modifications
     67hg qrefresh
     68
     69# you can then commit modification '''in the patch queue''', not in the repository it self
     70hg qcommit -m "my first work on the patch for ticket 123"
     71}}}
     72
     73You can repeat qrefresh, qcommit to improve your patch. You can create several patch with qnew. Remember that changes you make are for the last patch. If you want to change an older patch, you have to use qpop to remove top patchs. To apply again newer patch, use qpush.
     74
     75Read [http://hgbook.red-bean.com/read/managing-change-with-mercurial-queues.html the tutorial on queues] to know more on queues.
     76
     77Each time you want to update source code of jelix, do
     78{{{
     79hg qpop -a  # remove your patches from the source code
     80hg pull -u ssh://hg@bitbucket.org/jelix/jelix-trunk
     81hg qpush -a
     82}}}
     83
     84If conflicts are detected during hg qpush, fix conflicts (don't forget to do hg qrefresh) and restart qpush until it is ok.
     85
     86To publish your patches on bitbucket, go into the directory .hg/patches and:
     87{{{
     88hg push
     89}}}
     90
     91When one of your patch is ready, go on the corresponding ticket on developer.jelix.org and ask a review, by indicating the URL of your queue repository on bitbucket and the name of the patch. See below to request a review.
     92
     93When one of your patch is integrated in the official repository, delete it from your queue before updating the source code of jelix
     94{{{
     95hg qpop -a
     96hg qdelete ticket123.patch
     97hg qcommit -m "remove ticket123.patch"
     98cd .hg/patches/
     99hg push
     100cd ../..
     101hg pull -u ssh://hg@bitbucket.org/jelix/jelix-trunk
     102hg qpush -a
     103}}}
     104
     105=== Vous souhaitez proposer quelques patches pour une grosse modification ===
     106
     107Maintening a queue of patch can be tiring when you work on a big change (integration of a new big component for example). The best way in this case is to have your own branch, with your own commits, and this branch will be merge with the trunk at the end.
     108
     109Bitbucket allow you to publish a clone of a repository, and to commit changes to it. Then you can use the feature "pull request" of bitbucket to inform the owner of the "official" repository, to integrate your commit into his repository.
     110
     111So you can "fork" a jelix repository, commit into your clone, and request a pull. Add a comment on the corresponding ticket on developer.jelix.org to inform other contributors that you've made some changes.
     112
     113Try to commit clear step, in order to have an understandable history. Each changeset should correspond to a specific step of the change. Don't hesitate to use the mq extension of Mercurial to track your changes before committing them into your clone on bitbucket. And of course, [wiki:en/commit your messages of changset should be well formatted].
     114
     115
    35116
    36117