X-Git-Url: https://git.distorted.org.uk/~mdw/stgit/blobdiff_plain/a57bd72016d3cf3ee8e8fd7ae2c12e047999b602..1f3bb0172efa4e5edf43f5407306f0cf3e1b717e:/stgit/stack.py diff --git a/stgit/stack.py b/stgit/stack.py index 0217a7f..914c1e3 100644 --- a/stgit/stack.py +++ b/stgit/stack.py @@ -21,7 +21,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA import sys, os from stgit.utils import * -from stgit import git, basedir +from stgit import git, basedir, templates from stgit.config import config @@ -66,13 +66,13 @@ def __clean_comments(f): def edit_file(series, line, comment, show_patch = True): fname = '.stgit.msg' - tmpl = os.path.join(basedir.get(), 'patchdescr.tmpl') + tmpl = templates.get_template('patchdescr.tmpl') f = file(fname, 'w+') if line: print >> f, line - elif os.path.isfile(tmpl): - print >> f, file(tmpl).read().rstrip() + elif tmpl: + print >> f, tmpl, else: print >> f print >> f, __comment_prefix, comment