You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-user@hadoop.apache.org by Philip Zeyliger <ph...@cloudera.com> on 2009/04/10 21:27:20 UTC
a script to re-write JIRA subject lines for easier GMail threading
If you subscribe to core-dev and use gmail, you might be interested in a
quick script I wrote to log into my e-mail and re-write JIRA subject lines,
to fix the threading in gmail. This way "Updated", "Commented", and
"Created" messages all appear in the same thread.
The code is at http://github.com/philz/jira-rewrite/tree/master . I've
pasted in a bit of the documentation and a sample run below.
-- Philip
Re-writes JIRA subject lines to remove JIRA's "Updated/Commented/Created"
annotations.
JIRA's default subjects break Gmail's threading (which threads by subject
line); making the
subject line uniform unbreaks Gmail's threading.
Specifically, this looks at every message in --source, does a search and
replace
with --regex and --replace (defaults are for JIRA subject lines), and puts
the
modified message in --dest. The original message is moved to --backup.
# EXAMPLE OUTPUT:
# $ python rewritejira.py --username ...@....com --source hadoop-jira
--dest hadoop-jira-rewritten --backup hadoop-jira-orig
# Password:
# INFO:__main__:Looking at 3 messages.
# INFO:__main__:[3] Subject: '[jira] Commented: (HADOOP-5649) Enable
ServicePlugins for the\r\n JobTracker' -> '(HADOOP-5649) Enable
ServicePlugins for the\r\n JobTracker'
# INFO:__main__:[2] Subject: '[jira] Commented: (HADOOP-5581) libhdfs does
not get\r\n FileNotFoundException' -> '(HADOOP-5581) libhdfs does not
get\r\n FileNotFoundException'
# INFO:__main__:[1] Subject: '[jira] Commented: (HADOOP-5638) More
improvement on block placement\r\n performance' -> '(HADOOP-5638) More
improvement on block placement\r\n performance'
# INFO:__main__:Rewrote 3 messages.