Mercurial Extension

Client side

Action upon push

All known links are also pushed to the remote repository. If the operation succeeded, the extension can assume its links made it to the database.

Added commands

Those commands acts on the local issue cache. This one will be transfered to the remote side upon push. the local cache can also be augmented from a remote side if two developpers having the client-side extension enabled push/pull to each other. In such a case, the issues referenced on one side will be duplicated on the other side. And the first one to push to a repository with the server-side extension will publish the full list to the database.

Aded options

hg commit

--issueid

To specify an issue ID for the to-be-commited changeset.

hg push

--issueid

To specify an issue ID for the to-be-pushed changesets.

Server side

Warning

Due to dependencies on (among others) sqlalchemy, this extension cannot works on Windows with a packaged version of Mercurial. Those one having only access to the pre-packaged dependencies.

The server-side extension will mostly reacts on push from a developer and update the database with the pushed information.

Action upon pushkey

Upon a push, initiated from the client-side, a set of changeset will be transmitted from the client side. A client also using the buglink extension will also try to push all its known issue IDs. This will be pushed using mercurial pushkey protocol.

The extension will be pushed a set of key from the client. Each key correspond to a changeset, and the corresponding value is a free string indicating the corresponding issue ID.

For each received key, the server will optionaly parse the free string, and update the database about the link between the changeset and the issueID.

For each pushed changeset, a new entry will be made in the database with the corresponding repository and the parent(s) revision(s).

Added commands

createdb

This will initialise an empty database to the last schema version.

updatedb

This will update an old database schema so that the updated server-side extension can continue to work on the same database. This operation is safe to run multiple time. If the database is up-to-date, this operation will simply do nothing.

It is also possible to downgrade the database to an previous schema version (For instance if stuck by a show-stopper bug in the last version). No command is provided for this operation, but the right mechanism is included as part of the sqlalchemy-migrate versionning.

Configuration

This extension can be configured through the mercurial config file.

The following configuration values have effects:

buglink.db_url
(default to sqlite:///dblink.db) This is a SQLAlchemy database url to the database which should receive the issue links.
buglink.strip
(also notify.strip, or 3) This is the number of directory to be stripped to the base of the repository path for reference into the database.