summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandru Băluț <alexandru.balut@gmail.com>2017-04-17 13:00:21 +0200
committerThibault Saunier <thibault.saunier@osg.samsung.com>2017-04-17 13:04:24 -0300
commit7ec3adf73b23c9bc95240f6d3d98fbb902bff5a8 (patch)
tree85516fd6835764d10cebe5094cc5d37873e2c153
parent91cc0e260774826ebd2719f740b996756b4a90b8 (diff)
Handle a different title placeholder
Fixes T7744 Reviewed-by: Thibault Saunier <tsaunier@gnome.org> Differential Revision: https://phabricator.freedesktop.org/D1724
-rwxr-xr-xgit-phab14
1 files changed, 11 insertions, 3 deletions
diff --git a/git-phab b/git-phab
index 0b38a9f..ee9ff67 100755
--- a/git-phab
+++ b/git-phab
@@ -1127,9 +1127,17 @@ Paste API Token from that page and press <enter>: """ % self.phabricator_uri)
arc_message = phab.differential.getcommitmessage(
edit="create", fields=phab_fields).response
- arc_message = arc_message.replace(
- "<<Replace this line with your Revision Title>>",
- self.format_field(subject, True))
+ subject_formatted = self.format_field(subject, True)
+ # The substitution below should cover:
+ # "<<Replace this line with your Revision Title>>"
+ # "<<Replace this line with your revision title>"
+ arc_message = re.sub(
+ "<<Replace this line with your Revision Title>>?",
+ subject_formatted,
+ arc_message,
+ flags=re.I)
+ assert subject_formatted in arc_message
+
if summary != '':
arc_message = arc_message.replace(
"Summary: ",