From: Catalin Marinas Date: Mon, 11 Jul 2005 17:44:40 +0000 (+0100) Subject: Add --template option to export X-Git-Tag: v0.5~35 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/stgit/commitdiff_plain/c920531e512b1776d3698fd05755f8791b3be831?ds=inline Add --template option to export Signed-off-by: Catalin Marinas --- diff --git a/ChangeLog b/ChangeLog index 30c4b93..5b7e9d6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-07-11 Catalin Marinas + + * stgit/main.py (export): Add --template option to use a different + file as the export template rather than the default one + 2005-07-09 Catalin Marinas * Release 0.4 diff --git a/stgit/main.py b/stgit/main.py index 16d58a9..d93f2eb 100644 --- a/stgit/main.py +++ b/stgit/main.py @@ -684,7 +684,10 @@ def export(parser, options, args): print >> series, pname # get the template - patch_tmpl = os.path.join(git.base_dir, 'patchexport.tmpl') + if options.template: + patch_tmpl = options.template + else: + patch_tmpl = os.path.join(git.base_dir, 'patchexport.tmpl') if os.path.isfile(patch_tmpl): tmpl = file(patch_tmpl).read() else: @@ -734,7 +737,9 @@ export_cmd = \ action = 'store_true'), make_option('-d', '--diff', help = 'append .diff to the patch names', - action = 'store_true')]) + action = 'store_true'), + make_option('-t', '--template', metavar = 'FILE', + help = 'Use FILE as a template')]) # # The commands map