X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/stgit/blobdiff_plain/3a284728a544e34d9db139c3ac589c36275c2416..89e3bc51b5d645f6814a152d853994467eafea81:/stgit/stack.py diff --git a/stgit/stack.py b/stgit/stack.py index 0217a7f..618182c 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 @@ -65,14 +65,14 @@ def __clean_comments(f): f.writelines(lines) def edit_file(series, line, comment, show_patch = True): - fname = '.stgit.msg' - tmpl = os.path.join(basedir.get(), 'patchdescr.tmpl') + fname = '.stgitmsg.txt' + 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