Evolution #7187
Ne plus limiter le nom des branches de packaging
Status:
Fermé
Priority:
Normal
Assigned To:
Category:
-
Target version:
Distribution:
EOLE 2.4
Description
À l’heure actuelle les branches de packaging doivent être préfixées par dist/
.
Il existe une meilleur méthode pour lister les branches de packaging : vérifier le contenu des branches.
Associated revisions
Merge branch 'feature/unrestricted-packaging-branch-names'
Check branch content instead of branch name prefix to list packaging
branches.
Fixes: #7187 @5h
History
#1 Updated by Daniel Dehennin about 7 years ago
- Status changed from Nouveau to Résolu
- % Done changed from 0 to 100
Appliqué par commit 6affa3e20ef66bb5ddc8830c69c4e853add51b05.
#2 Updated by Daniel Dehennin about 7 years ago
- Due date set to 01/24/2014
- Assigned To set to Daniel Dehennin
- Target version set to Eole 2.4-RC1
- Start date set to 01/23/2014
#3 Updated by Daniel Dehennin about 7 years ago
Pour tester:
- Cloner un dépôt EOLE
- Créer une branche
test/packaging
en se basant sur la branchedist/ubuntu/precise/master
- Créer une branche
dist/foo/bar/master
en se basant sur la branchemaster
- Se positionner sur la branche
master
- Vérifier le complètement automatique: saisir
git package
puis tabulation afin de voir la liste des branches proposées- Il ne doit y avoir que les branches contenant un fichier
debian/control
:- les branches préexistante
dist/ubuntu/precise/master
,dist/ubuntu/lucid/master
- la branche
test/packaging
- les branches préexistante
- Il ne doit pas y avoir la branche
dist/foo/bar/master
- Il ne doit y avoir que les branches contenant un fichier
- Vérifier les tests pour l’intégration du code dans la branche de packaging
git package test/packaging
doit fonctionnergit package dist/foo/bar/master
ne doit pas fonctionner
Préparation d’un dépôt local¶
moi@work:~$ mkdir test-repo moi@work:~$ cd test-repo moi@work:~/test-repo$ git init . moi@work:~/test-repo (master #)$ echo foo > file.txt moi@work:~/test-repo (master #%)$ git add file.txt moi@work:~/test-repo (master #)$ git commit -m "New file" moi@work:~/test-repo (master)$ git checkout -b dist/ubuntu/precise/master Basculement sur la nouvelle branche 'dist/ubuntu/precise/master' moi@work:~/test-repo (dist/ubuntu/precise/master)$ mdkir debian moi@work:~/test-repo (dist/ubuntu/precise/master)$ echo "fake control" > debian/control moi@work:~/test-repo (dist/ubuntu/precise/master)$ echo "fake rules" > debian/rules moi@work:~/test-repo (dist/ubuntu/precise/master)$ git add debian moi@work:~/test-repo (dist/ubuntu/precise/master)$ git commit -m "Fake packaging" moi@work:~/test-repo (dist/ubuntu/precise/master)$ git checkout master moi@work:~/test-repo (master)$ git branch test/packaging dist/ubuntu/precise/master moi@work:~/test-repo (master)$ git branch dist/foo/bar/master master
Il faut un dépôt distant¶
Des vérifications obligent à avoir un dépôt distant:
moi@work:~/test-repo (master)$ cd .. moi@work:~$ git clone --bare test-repo test-repo.git moi@work:~$ cd test-repo moi@work:~/test-repo (master)$ git remote add origin ../test-repo.git moi@work:~/test-repo (master)$ git push -u origin master dist/ubuntu/precise/master test/packaging dist/foo/bar/master La branche dist/foo/bar/master est paramétrée pour suivre la branche distante dist/foo/bar/master depuis origin. La branche dist/ubuntu/lucid/master est paramétrée pour suivre la branche distante dist/ubuntu/lucid/master depuis origin. La branche master est paramétrée pour suivre la branche distante master depuis origin. La branche test/packaging est paramétrée pour suivre la branche distante test/packaging depuis origin. Everything up-to-date
Tests¶
Préparation¶
moi@work:~/test-repo (master=)$ echo "bar" >> file.txt moi@work:~/test-repo (master *=)$ git add file.txt moi@work:~/test-repo (master +=)$ git commit -m "Update file" moi@work:~/test-repo (master>)$ git tag -a -m "First release" release/0.1
Intégration doit fonctionner dans test/packaging¶
moi@work:~/test-repo (master>)$ git package test/packaging Checkout branch 'test/packaging': Basculement sur la branche 'test/packaging' Votre branche est à jour avec 'origin/test/packaging'. Using tag 'release/0.1' pointing to 'master' Pull from default remote: Already up-to-date. List of commits to merge: 1 3a50fde update file Do you want to merge 'release/0.1' into 'test/packaging'? [No]:
Intégration ne doit pas fonctionner dans dist/foo/bar/master¶
moi@work:~/test-repo (master>)$ git package dist/foo/bar/master Error: No dist/foo/bar/master distribution branch for 'dist/foo/bar/master' exists. You must create one to use /home/dad/bin/git-package. http://dev-eole.ac-dijon.fr/projects/eole/wiki/GitPackaging
#4 Updated by Joël Cuissinat about 7 years ago
- Status changed from Résolu to Fermé
J'obtiens bien l'erreur indiquée en suivant la procédure à la lettre :)
jojo-zotac:/tmp/test-repo(master)$ git package dist/foo/bar/master Error: No dist/foo/bar/master distribution branch for 'dist/foo/bar/master' exists. You must create one to use /usr/lib/git-core/git-package. http://dev-eole.ac-dijon.fr/projects/eole/wiki/GitPackaging