Evolution #7187
Ne plus limiter le nom des branches de packaging
Statut:
Fermé
Priorité:
Normal
Assigné à:
Catégorie:
-
Version cible:
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.
Révisions associées
Merge branch 'feature/unrestricted-packaging-branch-names'
Check branch content instead of branch name prefix to list packaging
branches.
Fixes: #7187 @5h
Historique
#1 Mis à jour par Daniel Dehennin il y a environ 12 ans
- Statut changé de Nouveau à Résolu
- % réalisé changé de 0 à 100
Appliqué par commit 6affa3e20ef66bb5ddc8830c69c4e853add51b05.
#2 Mis à jour par Daniel Dehennin il y a environ 12 ans
- Echéance mis à 24/01/2014
- Assigné à mis à Daniel Dehennin
- Version cible mis à Eole 2.4-RC1
- Début mis à 23/01/2014
#3 Mis à jour par Daniel Dehennin il y a environ 12 ans
Pour tester:
- Cloner un dépôt EOLE
- Créer une branche
test/packagingen se basant sur la branchedist/ubuntu/precise/master - Créer une branche
dist/foo/bar/masteren se basant sur la branchemaster - Se positionner sur la branche
master - Vérifier le complètement automatique: saisir
git packagepuis 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/packagingdoit fonctionnergit package dist/foo/bar/masterne 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 Mis à jour par Joël Cuissinat il y a environ 12 ans
- Statut changé de Résolu à 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