~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/revisionspec.py

  • Committer: Matthieu Moy
  • Date: 2006-07-08 19:32:30 UTC
  • mfrom: (1845 +trunk)
  • mto: This revision was merged to the branch mainline in revision 1857.
  • Revision ID: Matthieu.Moy@imag.fr-20060708193230-3eb72d871471bd5b
merge

Show diffs side-by-side

added added

removed removed

Lines of Context:
275
275
        return len(self.revs)
276
276
 
277
277
 
278
 
class RevisionSpec_revs:
279
 
    def __init__(self, revs, branch):
280
 
        self.revs = revs
281
 
        self.branch = branch
282
 
    def __getitem__(self, index):
283
 
        r = self.branch.repository.get_revision(self.revs[index])
284
 
        # TODO: Handle timezone.
285
 
        return datetime.datetime.fromtimestamp(r.timestamp)
286
 
    def __len__(self):
287
 
        return len(self.revs)
288
 
 
289
 
 
290
278
class RevisionSpec_date(RevisionSpec):
291
279
    prefix = 'date:'
292
280
    _date_re = re.compile(