Besides commit statements from hg or git like this:
hg commit -m “fixes #6, resolve ticket #5 and see ticket #9 and ticket #5 in the tracker”
The best is to start with the command, then finish the comment (commands in the middle of a comment are far less reliable).
There is a whole bunch of commands for which BitBucket tries to understand conjugations of verbs:
| Command |
“Verb” |
Conjugation(s) |
| resolve |
close |
close
closes
closed
closing |
| resolve |
fix |
fix
fixed
fixes
fixing
|
| resolve |
resolve |
resolve
resolves
resolved
resolving |
| reopen |
reopen |
reopen
reopens
reopening |
| hold |
hold |
hold
holds
holding |
| wontfix |
wontfix |
wontfix |
| invalid |
invaldate |
invalidate
invalidates
invalidated
invalidating |
You can also use the word “issue” in the middle to just link to an issue like this syntax:
links to issue #1
Finally, you can refer from issues to change sets using a cset syntax: <<cset 2f2f8d4cae7da0e37a5ffbc81c527cb67cc56015>> where the hex number is from a URL in your commit list (for instance in https://bitbucket.org/jeroenp/fastmm/commits)
Note that linking from changesets to issues often automatically creates a back-link, but that doesn’t always work, and fixing it has very low priority (like many things on BitBucket): Issues getting linked to commits have the wrong link syntax, they show BB-6232 — Bitbucket.
–jeroen
via: