Bug #252304 - Restore the -V/--version option. (trunk r12293)
authorZac Medico <zmedico@gentoo.org>
Thu, 25 Dec 2008 01:24:26 +0000 (01:24 -0000)
committerZac Medico <zmedico@gentoo.org>
Thu, 25 Dec 2008 01:24:26 +0000 (01:24 -0000)
svn path=/main/branches/2.1.6/; revision=12322

bin/repoman

index 4139713542376303f419b2ca3ddadf3e817bf364..d99be1ab47af8ece1dec5fe1784be649397d1b92 100755 (executable)
@@ -177,6 +177,9 @@ def ParseArgs(args, qahelp):
        parser.add_option('-v', '--verbose', dest="verbosity", action='count',
                help='be very verbose in output', default=0)
 
+       parser.add_option('-V', '--version', dest='version', action='store_true',
+               help='show version info')
+
        parser.add_option('-x', '--xmlparse', dest='xml_parse', action='store_true',
                default=False, help='forces the metadata.xml parse check to be carried out')
 
@@ -421,6 +424,10 @@ no_exec = frozenset(["Manifest","ChangeLog","metadata.xml"])
 
 options, arguments = ParseArgs(sys.argv, qahelp)
 
+if options.version:
+       print "Portage", portage.VERSION
+       sys.exit(0)
+
 # Set this to False when an extraordinary issue (generally
 # something other than a QA issue) makes it impossible to
 # commit (like if Manifest generation fails).