mail: don't hardcode space locations in template variables
commite6a6e8ce335846b75ab846e62bfe428a22980f78
authorJacob Keller <jacob.e.keller@intel.com>
Thu, 30 May 2013 00:31:04 +0000 (29 17:31 -0700)
committerPeter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Thu, 30 May 2013 00:31:04 +0000 (29 17:31 -0700)
treed006d664fbfa29689c2168bd87272162ec588292
parent1bcb69c9d04a2c5e03a74431cf311ac0148fff44
mail: don't hardcode space locations in template variables

This patch modifies stgit-mail in order to enable templates to move the ordering
of PATCH, the prefix, the version, and the number. The issue is due to stgit
hardcoding a ' ' after the previx, before version and before numbers. This means
that you can't design a template which re-orders these as it will result in
incorrect spacing being generated. To this end, introduce %(vspace), %(nspace)
and %(pspace) which allows a template to move the spacing around and enable
correct alignment inside a template. This won't change the default behavior (if
sticking to the standard templates) but enables more ability to customize and
modify the default behaviors.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
stgit/commands/mail.py
templates/covermail.tmpl
templates/patchandattch.tmpl
templates/patchmail.tmpl