mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-04-16 21:01:10 +00:00
grep-merges: Use optparse to display --help
This commit is contained in:
parent
927947841c
commit
ed96c35dc1
4
debian/changelog
vendored
4
debian/changelog
vendored
@ -3,8 +3,8 @@ ubuntu-dev-tools (0.142) UNRELEASED; urgency=low
|
||||
* mk-sbuild: Support kmod, when checking for overlayfs availability.
|
||||
* pbuilder-dist: improve bash_completion for *.dsc files. Thanks Maarten
|
||||
Bezemer. (Closes: #670924, LP: #770529)
|
||||
* submittodebian, check-mir, check-symbols, ubuntu-iso: Do enough argument
|
||||
parsing to handle --help (LP: #988009)
|
||||
* check-mir, check-symbols, grep-merges, submittodebian, ubuntu-iso: Do
|
||||
enough argument parsing to handle --help (LP: #988009)
|
||||
|
||||
-- Stefano Rivera <stefanor@debian.org> Wed, 25 Apr 2012 17:38:58 +0200
|
||||
|
||||
|
14
grep-merges
14
grep-merges
@ -19,6 +19,7 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import optparse
|
||||
import sys
|
||||
import json
|
||||
|
||||
@ -28,12 +29,19 @@ import ubuntutools.misc
|
||||
|
||||
|
||||
def main():
|
||||
ubuntutools.misc.require_utf8()
|
||||
if len(sys.argv) > 1:
|
||||
match = sys.argv[1]
|
||||
parser = optparse.OptionParser(usage='%prog [options] [string]',
|
||||
description='List pending merges from Debian matching string')
|
||||
args = parser.parse_args()[1]
|
||||
|
||||
if len(args) > 1:
|
||||
parser.error('Too many arguments')
|
||||
elif len(args) == 1:
|
||||
match = args[0]
|
||||
else:
|
||||
match = None
|
||||
|
||||
ubuntutools.misc.require_utf8()
|
||||
|
||||
for component in ('main', 'main-manual',
|
||||
'restricted', 'restricted-manual',
|
||||
'universe', 'universe-manual',
|
||||
|
@ -25,7 +25,6 @@ from ubuntutools import subprocess
|
||||
from ubuntutools.test import unittest
|
||||
|
||||
BLACKLIST = {
|
||||
'grep-merges': 'No Help',
|
||||
'pbuilder-dist-simple': 'No Help',
|
||||
'setup-packaging-environment': 'Throws Error',
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user