[stgit] - resolves: #872651 fixed regression when "stg new" command was ignoring patchdescr.tmpl file

pschiffe pschiffe at fedoraproject.org
Tue Dec 4 18:12:29 UTC 2012


commit b0ada18c0205741347bc1a45fd35f7855a359fdb
Author: Peter Schiffer <pschiffe at redhat.com>
Date:   Tue Dec 4 19:12:04 2012 +0100

    - resolves: #872651
      fixed regression when "stg new" command was ignoring patchdescr.tmpl file

 stgit-0.16-tmpl.patch |   22 ++++++++++++++++++++++
 stgit.spec            |   10 +++++++++-
 2 files changed, 31 insertions(+), 1 deletions(-)
---
diff --git a/stgit-0.16-tmpl.patch b/stgit-0.16-tmpl.patch
new file mode 100644
index 0000000..fee55b9
--- /dev/null
+++ b/stgit-0.16-tmpl.patch
@@ -0,0 +1,22 @@
+diff -ur stgit-0.16.orig/stgit/commands/common.py stgit-0.16/stgit/commands/common.py
+--- stgit-0.16.orig/stgit/commands/common.py	2012-01-09 22:12:42.000000000 +0100
++++ stgit-0.16/stgit/commands/common.py	2012-12-04 19:04:52.193722114 +0100
+@@ -23,7 +23,7 @@
+ from stgit.utils import *
+ from stgit.out import *
+ from stgit.run import *
+-from stgit import stack, git, basedir
++from stgit import stack, git, basedir, templates
+ from stgit.config import config, file_extensions
+ from stgit.lib import stack as libstack
+ from stgit.lib import git as libgit
+@@ -499,6 +499,9 @@
+     # Let user edit the commit message manually, unless
+     # --save-template or --message was specified.
+     if not getattr(options, 'save_template', None) and options.message is None:
++        tmpl = templates.get_template('patchdescr.tmpl')
++        if tmpl:
++            cd = cd.set_message(cd.message + tmpl)
+         cd = cd.set_message(edit_string(cd.message, '.stgit-new.txt'))
+ 
+     return cd
diff --git a/stgit.spec b/stgit.spec
index 43db351..13cc1a6 100644
--- a/stgit.spec
+++ b/stgit.spec
@@ -1,12 +1,15 @@
 Summary: Patch stack for Git repositories
 Name: stgit
 Version: 0.16
-Release: 1%{?dist}
+Release: 2%{?dist}
 License: GPLv2
 Group: Development/Tools
 URL: http://www.procode.org/stgit/
 Source: http://download.gna.org/%{name}/%{name}-%{version}.tar.gz
 
+# resolves: #872651
+Patch: stgit-0.16-tmpl.patch
+
 BuildArch: noarch
 BuildRequires: git-core, python2-devel, asciidoc, xmlto
 Requires: git-core, python2
@@ -24,6 +27,7 @@ either use plain Git commands or the Cogito tool.
 
 %prep
 %setup -q
+%patch -p1 -b .templ
 chmod -x contrib/stgbashprompt.sh
 chmod -x stgit-completion.bash
 
@@ -47,6 +51,10 @@ ln -s ../..%{_datadir}/%{name}/completion/stgit-completion.bash \
 %{_mandir}/man1/stg*
 
 %changelog
+* Tue Dec  4 2012 Peter Schiffer <pschiffe at redhat.com> - 0.16-2
+- resolves: #872651
+  fixed regression when "stg new" command was ignoring patchdescr.tmpl file
+
 * Mon Oct 22 2012 Peter Schiffer <pschiffe at redhat.com> - 0.16-1
 - updated to 0.16
 


More information about the scm-commits mailing list