Frequently Asked Questions¶
Why not using the commit message ?¶
Commit messages in mercurial are written once in a changeset and cannot be changed again without altering the whole history based their corresponding changeset.
Humans are not errors-prone, and it (sometimes) happen that someone
forget to indicate which issue ID correspond to the changeset he just
committed, or even enter a wrong ID, (you know, just interverting two
numbers : 2658
and 2568
...). As those errors cannot be easily
corrected if stored in the commit message, we prefer to store this
information at another place. This way, it is still possible to change
the issue ID referenced by a changeset commited three years ago.
Do I need the server-side stuff ?¶
If you don’t care about the web interface, you can only enable the extension on your computer and use the locally stored links between changeset and issue ID as a reference. the command hg links can be used for this purpose.
Todo
Add a graph view on the command line
Why not storing the bug state ?¶
That’s the job of the bug tracker, we’re only here to make the missing link between him and changesets. Furthermore, developers (for who this tools is written) don’t know if the bug has indeed been fixed until Q&A validates it.
How do I import all my issues as a batch ?¶
Say, like Mercurial, you used to store your issue number in your commit message. You can import them as follow (Or if you don’t understand it, give it to your system administrator):
for i in `hg log --template '{rev}\n'`; do ref=`hg log -r $i --template '{desc}\n' | perl -ne 's/.*(issue\d+).*/$1/ && print'`; if ! [ -z "$ref" ]; then echo $i $ref >> issuelist;fi; done;
And then import the generated list via the hg debugimportlink command:
hg debugimportlink issuelist