Rev 5216: (parthm, #181124) short options for commonly used ls long options. in file:///home/pqm/archives/thelove/bzr/%2Btrunk/
Canonical.com Patch Queue Manager
pqm at pqm.ubuntu.com
Fri May 7 07:39:50 BST 2010
At file:///home/pqm/archives/thelove/bzr/%2Btrunk/
------------------------------------------------------------
revno: 5216 [merge]
revision-id: pqm at pqm.ubuntu.com-20100507063947-s3btnxxwxu0xzitt
parent: pqm at pqm.ubuntu.com-20100506121546-8s3a5j30c319mtwn
parent: parth.malwankar at gmail.com-20100507045431-e1fqes333n8li3hc
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Fri 2010-05-07 07:39:47 +0100
message:
(parthm, #181124) short options for commonly used ls long options.
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/builtins.py builtins.py-20050830033751-fc01482b9ca23183
bzrlib/option.py option.py-20051014052914-661fb36e76e7362f
bzrlib/tests/test_help.py test_help.py-20070419045354-6q6rq15j9e2n5fna-1
=== modified file 'NEWS'
--- a/NEWS 2010-05-05 18:51:16 +0000
+++ b/NEWS 2010-05-06 06:51:11 +0000
@@ -112,6 +112,10 @@
(case-sensitive) as false.
(Brian de Alwis, Vincent Ladeuil)
+* ``bzr ls`` now supports short options for existing long options.
+ ``-k/--kind``, ``-i/--ignored``, ``-u/--unknown`` and ``-0/--null``.
+ (Parth Malwankar, #181124)
+
* ``Config.get_user_option_as_bool`` will now warn if a value cannot
be interpreted as a boolean.
(Vincent Ladeuil)
=== modified file 'bzrlib/builtins.py'
--- a/bzrlib/builtins.py 2010-05-05 14:11:13 +0000
+++ b/bzrlib/builtins.py 2010-05-06 06:51:11 +0000
@@ -2032,11 +2032,7 @@
hidden = True
_see_also = ['status', 'ls']
- takes_options = ['directory',
- Option('null',
- help='Write an ascii NUL (\\0) separator '
- 'between files rather than a newline.')
- ]
+ takes_options = ['directory', 'null']
@display_command
def run(self, null=False, directory=u'.'):
@@ -2055,11 +2051,7 @@
hidden = True
_see_also = ['status', 'ls']
- takes_options = ['directory',
- Option('null',
- help='Write an ascii NUL (\\0) separator '
- 'between files rather than a newline.')
- ]
+ takes_options = ['directory', 'null']
@display_command
def run(self, null=False, directory=u'.'):
@@ -2539,16 +2531,16 @@
help='Recurse into subdirectories.'),
Option('from-root',
help='Print paths relative to the root of the branch.'),
- Option('unknown', help='Print unknown files.'),
+ Option('unknown', short_name='u',
+ help='Print unknown files.'),
Option('versioned', help='Print versioned files.',
short_name='V'),
- Option('ignored', help='Print ignored files.'),
- Option('null',
- help='Write an ascii NUL (\\0) separator '
- 'between files rather than a newline.'),
- Option('kind',
+ Option('ignored', short_name='i',
+ help='Print ignored files.'),
+ Option('kind', short_name='k',
help='List entries of a particular kind: file, directory, symlink.',
type=unicode),
+ 'null',
'show-ids',
'directory',
]
=== modified file 'bzrlib/option.py'
--- a/bzrlib/option.py 2010-05-03 09:19:15 +0000
+++ b/bzrlib/option.py 2010-05-05 04:08:11 +0000
@@ -506,6 +506,9 @@
# Declare the standard options
_standard_option('help', short_name='h',
help='Show help message.')
+_standard_option('null', short_name='0',
+ help='Use an ASCII NUL (\\0) separator rather than '
+ 'a newline.')
_standard_option('usage',
help='Show usage message and options.')
_standard_option('verbose', short_name='v',
=== modified file 'bzrlib/tests/test_help.py'
--- a/bzrlib/tests/test_help.py 2010-04-23 08:51:52 +0000
+++ b/bzrlib/tests/test_help.py 2010-05-07 04:25:37 +0000
@@ -122,6 +122,7 @@
'\n'
'Options:\n'
' --usage Show usage message and options.\n'
+ ' -0, --null Use an ASCII NUL (\\0) separator rather than a newline.\n'
' -v, --verbose Display more information.\n'
' -q, --quiet Only display errors and warnings.\n'
' -h, --help Show help message.\n'
@@ -142,6 +143,7 @@
'\n'
':Options:\n'
' --usage Show usage message and options.\n'
+ ' -0, --null Use an ASCII NUL (\\0) separator rather than a newline.\n'
' -v, --verbose Display more information.\n'
' -q, --quiet Only display errors and warnings.\n'
' -h, --help Show help message.\n'
@@ -177,6 +179,7 @@
'\n'
'Options:\n'
' --usage Show usage message and options.\n'
+ ' -0, --null Use an ASCII NUL (\\0) separator rather than a newline.\n'
' -v, --verbose Display more information.\n'
' -q, --quiet Only display errors and warnings.\n'
' -h, --help Show help message.\n'
@@ -196,6 +199,7 @@
'\n'
'Options:\n'
' --usage Show usage message and options.\n'
+ ' -0, --null Use an ASCII NUL (\\0) separator rather than a newline.\n'
' -v, --verbose Display more information.\n'
' -q, --quiet Only display errors and warnings.\n'
' -h, --help Show help message.\n'
@@ -230,6 +234,7 @@
'\n'
'Options:\n'
' --usage Show usage message and options.\n'
+ ' -0, --null Use an ASCII NUL (\\0) separator rather than a newline.\n'
' -v, --verbose Display more information.\n'
' -q, --quiet Only display errors and warnings.\n'
' -h, --help Show help message.\n'
@@ -273,6 +278,7 @@
'\n'
'Options:\n'
' --usage Show usage message and options.\n'
+ ' -0, --null Use an ASCII NUL (\\0) separator rather than a newline.\n'
' -v, --verbose Display more information.\n'
' -q, --quiet Only display errors and warnings.\n'
' -h, --help Show help message.\n'
More information about the bazaar-commits
mailing list