Search
j0ke.net Open Build Service
>
Projects
>
devel
:
python
>
trac-bazaar-plugin
> trac-bazaar-timestamp.patch
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File trac-bazaar-timestamp.patch of Package trac-bazaar-plugin (Revision 5)
Currently displaying revision
5
,
show latest
# Bazaar revision bundle v0.9 # # message: # * Set timestamp on 'current:' and 'null:' changesets to their nearest # neighbors. This keeps RSS feeds of timeline from having a new entry every # time it's loaded. Partial fix of launchpad bug #116659. # # committer: Toshio Kuratomi <badger@Clingman> # date: Sat 2007-09-22 10:26:55.203999996 -0700 === modified file tracbzr/backend.py --- tracbzr/backend.py +++ tracbzr/backend.py @@ -1069,13 +1069,20 @@ self.log = log self.bzr_repo = bzr_repo if branch is None: - if revid in ('current:', 'null:'): - self.revision = revision.Revision(revid, committer='', - message='', timezone='') - versioncontrol.Changeset.__init__(self, urllib.quote(revid), - '', '', time.time()) - else: + if revid not in ('current:', 'null:'): raise errors.NoSuchRevision(None, revid) + + self.revision = revision.Revision(revid, committer='', + message='', timezone='') + # Get a neighboring revision so we can submit a real timestamp + if revid == 'current:': + neighbor_revid = bzr_repo.previous_rev(revid) + else: + neighbor_revid = bzr_repo.next_rev(revid) + neighbor = bzr_repo.get_changeset(neighbor_revid).revision + self.revision.timestamp = neighbor.timestamp + versioncontrol.Changeset.__init__(self, urllib.quote(revid), + '', '', self.revision.timestamp) else: self.revision = bzr_repo.get_branch_cache(branch).get_revision(revid) versioncontrol.Changeset.__init__(self, === modified directory // last-changed:badger@clingman-20070922172655-wewiwy4h ... 6lf191wk # revision id: badger@clingman-20070922172655-wewiwy4h6lf191wk # sha1: 496f1f81dab7c8dd8ddfaeb044177ae01be7b398 # inventory sha1: 7074183389cb4e01d0729a322f8937d6f54a4e95 # parent ids: # aaron.bentley@utoronto.ca-20070829221812-uwanjrj5pe5he33j # base id: aaron.bentley@utoronto.ca-20070829221812-uwanjrj5pe5he33j # properties: # branch-nick: trac+bzr