14

5

I'm new to Kiln and Mercurial as a whole, so forgive me if I'm missing something obvious :)

I've used SVN/Trac in the past and something I've particularly liked about it is that Trac recognizes case ids in my comments and automatically creates a link to the case.

I know I can link a commit to a case post-sync in the web interface, but that's a bit tedious.

Is it possible to add something like "#34" in my comment and Kiln automatically links it up with case 34?

Other than that, keep up the good work! :)

flag

1 Answer

14

Just mention some variant of

review 123
case 123
bug 123

in your commit message, and Kiln will automatically associate it with the corresponding case in FogBugz. These forms are all completely identical, as far as Kiln is concerned; just choose whichever one gives you the best readability. The commits will appear inline in FogBugz in the associated cases, and links to FogBugz will appear under the "Cases" button when viewing the changeset in Kiln.

If the bug you mention is a review, then your changeset will automatically be added to the review whenever possible (i.e., it's in a related repository). Cases associated with changesets in a review are also associated with any reviews that changeset is in automatically. You can see them from the "Cases" list when viewing a review.

If you forget to link a changeset to a case or review at at commit time, Kiln allows you to associate cases with changesets after the fact. Simply click on the "Add Case" button when viewing the changeset you've just pushed, type in the case number, and you'll be good to go.

Note: here is the regex we use to parse commit messages for case numbers.

link|flag
The colon and # are optional, and the regex is fairly forgiving, so "This oughtta take care of cases 123, 456, and 789" will actually work just fine, and be easier to read at the same time. – Benjamin Pollack Feb 1 2010 at 20:30
Is there any way to add in additional regex patterns to pick up on different terms to link on? (ie. issue, bug, case, idea, etc.) – cdeszaq Mar 8 2010 at 15:54
At the moment, no, cdeszaq. You can use 'case', 'review', or 'bugzid' for now. – Ben Kamens Mar 8 2010 at 16:07
Will this work during import as well? I already use FogBugz and I already use the above keywords in my commits, but the code is managed in an external git repo until my IDE (IntelliJ) supports Mercurial (i. e. until I spent money on the upgrade). It would be fantastic if the existing commit history and the existing cases are going to be linked magically when I import one day. – hanno.fietz Jul 21 2011 at 11:33
Is it 'bug' or 'bugzid' after all? (The answer mentions bug, @ben-kamens comment mentions 'bugzid') – jaraics Nov 9 2011 at 7:42

Your Answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.