diff options
author | Alexandru Băluț <alexandru.balut@gmail.com> | 2017-04-17 13:00:21 +0200 |
---|---|---|
committer | Thibault Saunier <thibault.saunier@osg.samsung.com> | 2017-04-17 13:04:24 -0300 |
commit | 7ec3adf73b23c9bc95240f6d3d98fbb902bff5a8 (patch) | |
tree | 85516fd6835764d10cebe5094cc5d37873e2c153 | |
parent | 91cc0e260774826ebd2719f740b996756b4a90b8 (diff) |
Handle a different title placeholder
Fixes T7744
Reviewed-by: Thibault Saunier <tsaunier@gnome.org>
Differential Revision: https://phabricator.freedesktop.org/D1724
-rwxr-xr-x | git-phab | 14 |
1 files changed, 11 insertions, 3 deletions
@@ -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: ", |