Entry IDs for Atom feeds generated from Bazaar branches
James Henstridge
james at jamesh.id.au
Thu Mar 29 06:43:18 BST 2007
There are a number of tools that can generate an Atom feed for a Bazaar branch:
* bzr-branchfeed (https://launchpad.net/bzr-branchfeed)
* loggerhead (http://lag.net/loggerhead)
* bzr-feed (http://bzr.mfd-consult.dk/bzr-feed/)
One of the features of Atom is a globally unique identifier associated
with each entry, which can be used to remove duplicate information
when aggregating multiple feeds together. For the feeds generated by
the above tools, the Bazaar revision ID covers this use case pretty
well. Unfortunately, each tool uses it in a different way so they all
generate the entry ID.
bzr-branchfeed just uses the revision ID directly, which is invalid
because the entry IDs need to be URIs.
loggerhead uses the URL of its revision page, which includes the
revision ID, but will be different for each branch you generate a feed
for, so won't end up removing duplicates.
The bzr-feed script breaks up a standard format revision ID into
username, date and random components and forms a "tag:" URL from it.
Unfortunately, this will not work for all revision IDs (such as those
generated by bzr-svn or arch imports).
It would be nice to have a single entry ID format that we can
recommend that such tools produce. After some discussions with
Robert, the format we thought might be worth suggesting is:
http://bazaar-vcs.org/RevisionId#$REVISION_ID
The reasons for choosing this are:
* it is a URL, and uses a domain controlled by the project.
* it includes the revision ID, so inherits the same global uniqueness
properties
* if someone types the entry ID into their web browser they'll get to
http://bazaar-vcs.org/RevisionId, which could be a wiki page
explaining the purpose of the URI.
How does this sound? Does anyone have any objections or suggestions
for a better format?
James.
More information about the bazaar
mailing list