bugid

Jan. 18th, 2011 02:12 pm
marnanel: (Default)
[personal profile] marnanel
I keep most of my windows maximised, including the browser and the terminal. When I'm testing patches, I often have my browser open at a bug tracker. I like to test patches on a local branch named, say, bug156543, and obviously I also have to mention the bug number in the commit message. But I find it quite tricky to memorise arbitrary six-digit numbers, and it's a nuisance to keep switching windows to see the bug number. And of course it's impossible to automate this process.

Hence this program. It scans the titles of each open window and finds anything called "bug NNN", where NNN is a decimal number. It then prints the number. If there's more than one such, it separates them with spaces. If there are none, it prints none.

If you give it a single argument, it will replace %d wherever it occurs in that string with the relevant bug numbers.

Example of use:

$ git branch `bugid bug%d`

$ git commit -m "Added bouncy castle. Closes `bugid #%d`"


Well, it's useful to me, anyway, so I thought it might be useful to you.

hope it's a phony commit message

Date: 2011-01-19 06:43 am (UTC)
From: (Anonymous)
...the bouncy castle library, albeit functional, does good job at trashing the JVM heap. You have to look really hard to find a more allocation-happy library.

twLHxSqWXVWZaVizqIOZ

Date: 2013-11-09 08:34 am (UTC)
From: (Anonymous)
Congratulations on your emigration! I'd love to meet you also, so plasee do let me know if you're ever in Massachusetts (or Connecticut, really)! And I'll do the same if I'm in Toronto. Are you on G+? Not that that helps us cut down on social networks, but y'know.
From: (Anonymous)
I do everything in the terminal inside a GNU Screen session, and each session is devoted to a particular issue. When I create the session I use

$ BUGID=12345 screen -S bouncycastle

And from then on I can use $BUGID anywhere inside that session to refer to this particular bug. I even have a lab book that saves notes to myself for each bugid. See http://www.dougalstanton.net/blog/index.php/2010/06/22/a-simple-lab-book/ for details.

Profile

marnanel: (Default)
Monument

January 2022

S M T W T F S
      1
2345678
9101112131415
1617 1819202122
23242526272829
3031     

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Feb. 22nd, 2026 08:08 pm
Powered by Dreamwidth Studios