return optparse.make_option(*self.pargs, **kwargs)
def metavar(self):
o = self.get_option()
- if not o.nargs:
+ if not o.takes_value():
return None
if o.metavar:
return o.metavar
o.write_asciidoc(f)
f.write('\n')
_write_underlined('StGit', '-', f)
- f.write('Part of the StGit suite - see manlink:stg[1]\n')
+ f.write('Part of the StGit suite - see linkman:stg[1]\n')
def sign_options():
def callback(option, opt_str, value, parser, sign_str):
short = 'Use MESSAGE instead of invoking the editor'),
opt('-f', '--file', action = 'callback', callback = file_callback,
dest = 'message', type = 'string', args = [files],
+ metavar = 'FILE',
short = 'Use FILE instead of invoking the editor', long = """
Use the contents of FILE instead of invoking the editor.
(If FILE is "-", write to stdout.)""")]
def author_options():
return _person_opts('author', 'auth')
+def keep_option():
+ return [opt('-k', '--keep', action = 'store_true',
+ short = 'Keep the local changes',
+ default = config.get('stgit.autokeep') == 'yes')]
+
+def merged_option():
+ return [opt('-m', '--merged', action = 'store_true',
+ short = 'Check for patches merged upstream')]
+
class CompgenBase(object):
def actions(self, var): return set()
def words(self, var): return set()