[projects/git-slug: 37/170] Options --newpkgs and --nonewpkgs are mutually exclusive

glen glen at pld-linux.org
Mon Sep 21 21:41:55 CEST 2015


commit a66580864bc3da0049e3216ba7e0da76c6954a1a
Author: Kacper Kornet <draenog at pld-linux.org>
Date:   Wed Sep 21 16:03:32 2011 +0100

    Options --newpkgs and --nonewpkgs are mutually exclusive

 slug.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/slug.py b/slug.py
index b88f825..eb01802 100755
--- a/slug.py
+++ b/slug.py
@@ -170,9 +170,10 @@ update.add_argument('-b', '--branch', help='branch to fetch', action=DelAppend,
 update.add_argument('-P', '--prune', help='prune git repositories that do no exist upstream',
         action='store_true')
 update.add_argument('--depth', help='depth of fetch', default=0)
-update.add_argument('-n', '--newpkgs', help='download packages that do not exist on local side',
+newpkgsopt = update.add_mutually_exclusive_group()
+newpkgsopt.add_argument('-n', '--newpkgs', help='download packages that do not exist on local side',
         action='store_true')
-update.add_argument('-nn', '--nonewpkgs', help='do not download new packages', dest='newpkgs', action='store_false')
+newpkgsopt.add_argument('-nn', '--nonewpkgs', help='do not download new packages', dest='newpkgs', action='store_false')
 update.add_argument('repopattern', nargs='*', default = ['*'])
 update.set_defaults(func=fetch_packages, omitexisting=False)
 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/projects/git-slug.git/commitdiff/4ed64f73960519a2f4fd04c42950b2c96ae795c5



More information about the pld-cvs-commit mailing list