[GitHub] push branch ne marche pas (résolu)
Publié : jeu. 15 janv. 2015, 08:57
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 :
Une idée?
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]$
Une idée?