commit:     0288fec4f81cb307666d481c54e9ffa968e3f878
Author:     Devan Franchini <twitch153 <AT> gentoo <DOT> org>
AuthorDate: Thu May 15 19:58:36 2014 +0000
Commit:     Devan Franchini <twitch153 <AT> gentoo <DOT> org>
CommitDate: Fri May 16 01:06:46 2014 +0000
URL:        
http://git.overlays.gentoo.org/gitweb/?p=proj/layman.git;a=commit;h=0288fec4

argsparser.py: Alphabetizes group arguments

---
 layman/argsparser.py | 114 +++++++++++++++++++++++++--------------------------
 1 file changed, 56 insertions(+), 58 deletions(-)

diff --git a/layman/argsparser.py b/layman/argsparser.py
index 6e5fee3..5b94530 100644
--- a/layman/argsparser.py
+++ b/layman/argsparser.py
@@ -79,16 +79,16 @@ class ArgsParser(BareConfig):
         self.parser = ArgumentParser(
             usage   = _USAGE)
 
-        self.parser.add_argument('-V',
-                          '--version',
-                          action = 'version',
-                          version = VERSION)
-
         self.parser.add_argument('-H',
                         '--setup_help',
                         action = 'store_true',
                         help = 'Print the NEW INSTALL help messages.')
 
+        self.parser.add_argument('-V',
+                          '--version',
+                          action = 'version',
+                          version = VERSION)
+
         #-----------------------------------------------------------------
         # Main Options
 
@@ -107,11 +107,12 @@ class ArgsParser(BareConfig):
                              help = 'Remove the given overlay from your 
locally inst'
                              'alled overlays. Specify "ALL" to remove all 
overlays.')
 
-        actions.add_argument('-s',
-                             '--sync',
-                             action = 'append',
-                             help = 'Update the specified overlay. Use "ALL" 
as para'
-                            'meter to synchronize all overlays.')
+        actions.add_argument('-f',
+                             '--fetch',
+                             action = 'store_true',
+                             help = 'Fetch a remote list of overlays. This 
option is'
+                             ' deprecated. The fetch operation will be 
performed by '
+                             'default when you run sync, sync-all, or list.')
 
         actions.add_argument('-i',
                              '--info',
@@ -119,11 +120,6 @@ class ArgsParser(BareConfig):
                              help = 'Display information about the specified 
overlay'
                              '.')
 
-        actions.add_argument('-S',
-                             '--sync-all',
-                             action = 'store_true',
-                             help = 'Update all overlays.')
-
         actions.add_argument('-L',
                              '--list',
                              action = 'store_true',
@@ -134,13 +130,6 @@ class ArgsParser(BareConfig):
                              action = 'store_true',
                              help = 'List the locally installed overlays.')
 
-        actions.add_argument('-f',
-                             '--fetch',
-                             action = 'store_true',
-                             help = 'Fetch a remote list of overlays. This 
option is'
-                             ' deprecated. The fetch operation will be 
performed by '
-                             'default when you run sync, sync-all, or list.')
-
         actions.add_argument('-n',
                              '--nofetch',
                              action = 'store_true',
@@ -154,18 +143,22 @@ class ArgsParser(BareConfig):
                              'ing order of the overlays in the PORTDIR_OVERLAY 
varia'
                              'ble.')
 
+        actions.add_argument('-s',
+                             '--sync',
+                             action = 'append',
+                             help = 'Update the specified overlay. Use "ALL" 
as para'
+                            'meter to synchronize all overlays.')
+
+        actions.add_argument('-S',
+                             '--sync-all',
+                             action = 'store_true',
+                             help = 'Update all overlays.')
+
         #-----------------------------------------------------------------
         # Additional Options
 
         path_opts = self.parser.add_argument_group('<Path options>')
 
-        path_opts.add_argument('-C',
-                               '--configdir',
-                               action = 'store',
-                               default = '/etc/layman',
-                               help = 'Directory path to user for all layman 
configu'
-                               'ration information [default: /etc/layman].')
-
         path_opts.add_argument('-c',
                                '--config',
                                action = 'store',
@@ -174,7 +167,18 @@ class ArgsParser(BareConfig):
                                help = 'Path to the config file [default: '
                                '%s].' % (self.defaults['config'] 
%self.defaults))
 
+        path_opts.add_argument('-C',
+                               '--configdir',
+                               action = 'store',
+                               default = '/etc/layman',
+                               help = 'Directory path to user for all layman 
configu'
+                               'ration information [default: /etc/layman].')
 
+        path_opts.add_argument('-o',
+                               '--overlays',
+                               action = 'append',
+                               help = 'The list of overlays [default: ' \
+                               + self.defaults['overlays'] + '].')
 
         path_opts.add_argument('-O',
                                '--overlay_defs',
@@ -184,22 +188,29 @@ class ArgsParser(BareConfig):
                                help = 'Path to aditional overlay.xml files 
[default: '
                                '%s].' % (self.defaults['overlay_defs'] 
%self.defaults))
 
-        path_opts.add_argument('-o',
-                               '--overlays',
-                               action = 'append',
-                               help = 'The list of overlays [default: ' \
-                               + self.defaults['overlays'] + '].')
-
         #-----------------------------------------------------------------
         # Output Options
 
         out_opts = self.parser.add_argument_group('<Output options>')
 
-        out_opts.add_argument('-v',
-                              '--verbose',
+        out_opts.add_argument('--debug-level',
+                              action = 'store',
+                              type = int,
+                              help = 'A value between 0 and 10. 0 means no 
debugging '
+                              'messages will be selected, 10 selects all 
debugging me'
+                              'ssages. Default is "4".')
+
+        out_opts.add_argument('-k',
+                              '--nocheck',
                               action = 'store_true',
-                              help = 'Increase the amount of output and 
describe the '
-                              'overlays.')
+                              help = 'Do not check overlay definitions and do 
not i'
+                              'ssue a warning if description or contact 
information'
+                              ' are missing.')
+
+        out_opts.add_argument('-N',
+                              '--nocolor',
+                              action = 'store_true',
+                              help = 'Remove color codes from the layman 
output.')
 
         out_opts.add_argument('-q',
                               '--quiet',
@@ -211,11 +222,6 @@ class ArgsParser(BareConfig):
                               'xample if your overlay resides in subversion 
and the S'
                               'SL certificate of the server needs acceptance.')
 
-        out_opts.add_argument('-N',
-                              '--nocolor',
-                              action = 'store_true',
-                              help = 'Remove color codes from the layman 
output.')
-
         out_opts.add_argument('-Q',
                               '--quietness',
                               action = 'store',
@@ -225,6 +231,12 @@ class ArgsParser(BareConfig):
                               ' you set this below 2 the same warning as given 
for --'
                               'quiet applies!')
 
+        out_opts.add_argument('-v',
+                              '--verbose',
+                              action = 'store_true',
+                              help = 'Increase the amount of output and 
describe the '
+                              'overlays.')
+
         out_opts.add_argument('-W',
                               '--width',
                               action = 'store',
@@ -234,20 +246,6 @@ class ArgsParser(BareConfig):
                               'not required as layman is capable of detecting 
the '
                               'available number of columns automatically.')
 
-        out_opts.add_argument('-k',
-                              '--nocheck',
-                              action = 'store_true',
-                              help = 'Do not check overlay definitions and do 
not i'
-                              'ssue a warning if description or contact 
information'
-                              ' are missing.')
-
-        out_opts.add_argument('--debug-level',
-                              action = 'store',
-                              type = int,
-                              help = 'A value between 0 and 10. 0 means no 
debugging '
-                              'messages will be selected, 10 selects all 
debugging me'
-                              'ssages. Default is "4".')
-
         #-----------------------------------------------------------------
         # Debug Options
 

Reply via email to