Page 1 sur 1

[GitHub] push branch ne marche pas (résolu)

Publié : jeu. 15 janv. 2015, 08:57
par lesebas
Bonjour,

Je modifie actuellement un petit script qui permet de nettoyer la base de donnée de pacman de manière plus précise qu'un simple pacman -Scc . J'ai fait un fork du projet initial sur github (https://github.com/lesebas/pacleaner) et je n'ai pas eu de problème pour merger ma première branche. Je viens de créer une deuxième branche mais impossible de remonter mes modifications sur github. Pourtant ma branche local affiche bien des écarts et le push semble fonctionner, mais rien de disponible sur github :

Code : Tout sélectionner

[sebastien@Lupus ~]$ cd pacleaner
[sebastien@Lupus pacleaner]$ git branch
* delete_config
  delete_confirmation
  master
  pacman_4.2
[sebastien@Lupus pacleaner]$ git checkout delete_config
M	README
M	pacleaner.py
Déjà sur 'delete_config'
[sebastien@Lupus pacleaner]$ git diff
diff --git a/README b/README
index 43988d4..2f3e2f1 100644
--- a/README
+++ b/README
@@ -10,11 +10,20 @@ optional arguments:
   --uninstalled, -u     list packages that is not installed on the system
   --morethan, -m        list packages that has more than the specified number
                         of files in the cache
-  --delete              if this option is set, the packages listed by
-                        "uninstalled" or "morethan" is deleted.
+  --delete              if this option is set, the packages listed by 
+                        "uninstalled" or "morethan" are deleted.
+                        Confirmation could be required according 
+                        default value set for Delete_Confirmation in config file.
+  --no-confirm          if this option is set with --delete, the packages listed by 
+                        "uninstalled" or "morethan" are deleted without confirmation.
+                        No effect if the config file is stored with Delete_Confirmation = No.
   --number n, -n n      number of packages that you want to keep as a backup.
                         Defaults to 2.
   --cache_path PATH, -c PATH
                         optional path to pacman's cache
   --installed_path PATH, -i PATH
                         optional path to pacman's installed package db
+
+A default config file "pacleaner_config" is required in the directory where the script is stored.
+A local config file can be set as "~/.config/pacleaner/pacleaner_config".
+If both are presnt, the local config file will be used first.
\ No newline at end of file
diff --git a/pacleaner.py b/pacleaner.py
old mode 100755
new mode 100644
index 3491ba6..2b2fb89
--- a/pacleaner.py
+++ b/pacleaner.py
@@ -3,14 +3,22 @@
 import os
 import errno
 import argparse
+import configparser
 from operator import attrgetter
 
-PACKAGES = "/var/cache/pacman/pkg/"
-INSTALLED = "/var/lib/pacman/local"
+config = configparser.ConfigParser()
+if os.path.isfile(os.path.join(os.path.expanduser('~'), '.config/pacleaner/pacleaner_config')):
+  config.read(os.path.join(os.path.expanduser('~'), '.config/pacleaner/pacleane
[sebastien@Lupus pacleaner]$ git push origin delete_config
Username for 'https://github.com': lesebas
Password for 'https://lesebas@github.com': 
Everything up-to-date
[sebastien@Lupus pacleaner]$ 
Image

Une idée?

Re: [GitHub] push branch ne marche pas

Publié : jeu. 15 janv. 2015, 11:40
par FoolEcho
Salut,

Quand tu dis que le push semble fonctionner... il se passe quoi ? (tu spécifies bien la branche au moment du push / tu es bien positionné dans la branche ? / qu'indique git status ?)

Re: [GitHub] push branch ne marche pas

Publié : jeu. 15 janv. 2015, 13:23
par lesebas
Oui je suis bien dans la branche et le push me dit que tout est à jour. Le code posté dans mon premier message sans le git diff :

Code : Tout sélectionner

[sebastien@Lupus ~]$ cd pacleaner
[sebastien@Lupus pacleaner]$ git branch
* delete_config
  delete_confirmation
  master
  pacman_4.2
[sebastien@Lupus pacleaner]$ git checkout delete_config
M   README
M   pacleaner.py
Déjà sur 'delete_config'
[sebastien@Lupus pacleaner]$ git push origin delete_config
Username for 'https://github.com': lesebas
Password for 'https://lesebas@github.com': 
Everything up-to-date
[sebastien@Lupus pacleaner]$
Pour le retour de git status, je regarde ce soir.

Re: [GitHub] push branch ne marche pas

Publié : jeu. 15 janv. 2015, 13:41
par lesebas
... RTFM : Finalement je viens de trouver une doc en français trés bien faite...:

http://git-scm.com/book/fr/v1/Les-bases ... A9p%C3%B4t

je n'ai pas fait de ''git add'' ni de ''git commit'', ça ne peux donc pas marcher!

:oops:

Re: [GitHub] push branch ne marche pas (résolu)

Publié : jeu. 15 janv. 2015, 19:30
par FoolEcho
:mrgreen:

Re: [GitHub] push branch ne marche pas (résolu)

Publié : ven. 16 janv. 2015, 15:37
par Xorg
git status c'est toujours très utile, n'hésite pas à en faire car ça coûte rien. :D
Par exemple, quand tu modifies plusieurs fichiers d'un coup et que tu veux faire plusieurs commits différents, cette commande te dira les modifications qui vont être poussées ou non. :wink:

Re: [GitHub] push branch ne marche pas (résolu)

Publié : ven. 16 janv. 2015, 16:41
par papajoke
Xorg a écrit :git status c'est toujours très utile, n'hésite pas à en faire car ça coûte rien. :D
+1
, encore plus (utile) que

Code : Tout sélectionner

systemctl status 
;)

Re: [GitHub] push branch ne marche pas (résolu)

Publié : ven. 16 janv. 2015, 18:28
par Xorg
papajoke a écrit :, encore plus (utile) que

Code : Tout sélectionner

systemctl status 
;)
Certainement, vu que je fais rarement cette commande. :mrgreen:
Mais Systemd me rend perplexe maintenant, surtout quand des unités par défaut échouent... Je trouve qu'on peut masquer plusieurs services qui sont activés par défaut, et le système fonctionnera quand même bien. :P
Bref, je me demande si un jour Uselessd arrivera officiellement sur Arch Linux.