[projects/git-slug: 3/9] Add --newpkgs/--nonewpkgs to pull command.

glen glen at pld-linux.org
Mon Sep 21 21:40:57 CEST 2015


commit da9abb0e6d7ef1a1440e7f5ac4ad4dbf5538dc99
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Sun Nov 23 00:28:22 2014 +0100

    Add --newpkgs/--nonewpkgs to pull command.
    
    Allow 'git pld pull --newpkgs' to also fetch and pull new packages. Off
    by default.

 slug.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/slug.py b/slug.py
index da9c050..d083cf4 100755
--- a/slug.py
+++ b/slug.py
@@ -276,8 +276,12 @@ pull = subparsers.add_parser('pull', help='git-pull in all existing repositories
         formatter_class=argparse.RawDescriptionHelpFormatter)
 pull.add_argument('--all', help='update local branches in all repositories', dest='updateall', action='store_true', default=True)
 pull.add_argument('--noall', help='update local branches only when something has been fetched', dest='updateall', action='store_false', default=True)
+newpkgsopt = pull.add_mutually_exclusive_group()
+newpkgsopt.add_argument('-n', '--newpkgs', help='download packages that do not exist on local side',
+        action='store_true')
+newpkgsopt.add_argument('-nn', '--nonewpkgs', help='do not download new packages', dest='newpkgs', action='store_false')
 pull.set_defaults(func=pull_packages, branch='[*]', prune=False, newpkgs=False, omitexisting=False)
-default_options['pull'] = {'branch': ['*'], 'prune': False, 'newpkgs': False, 'omitexisting': False}
+default_options['pull'] = {'branch': ['*'], 'prune': False, 'omitexisting': False}
 
 checkout =subparsers.add_parser('checkout', help='checkout repositories', parents=[common_fetchoptions],
         formatter_class=argparse.RawDescriptionHelpFormatter)
================================================================

---- gitweb:

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



More information about the pld-cvs-commit mailing list