~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/revisionspec.py

  • Committer: Martin Pool
  • Date: 2006-06-10 23:16:19 UTC
  • mfrom: (1759 +trunk)
  • mto: This revision was merged to the branch mainline in revision 1761.
  • Revision ID: mbp@sourcefrog.net-20060610231619-05b997deeb005d02
[merge] bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
261
261
        return len(self.revs)
262
262
 
263
263
 
264
 
class RevisionSpec_revs:
265
 
    def __init__(self, revs, branch):
266
 
        self.revs = revs
267
 
        self.branch = branch
268
 
    def __getitem__(self, index):
269
 
        r = self.branch.repository.get_revision(self.revs[index])
270
 
        # TODO: Handle timezone.
271
 
        return datetime.datetime.fromtimestamp(r.timestamp)
272
 
    def __len__(self):
273
 
        return len(self.revs)
274
 
 
275
 
 
276
264
class RevisionSpec_date(RevisionSpec):
277
265
    prefix = 'date:'
278
266
    _date_re = re.compile(