blob: 4d12e01fe3610ea6d7a01da95377f7470eeed003 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
from .base import Resource
from .repos import Author, Commit
class Blob(Resource):
def __str__(self):
return "<Blob (%s)>" % getattr(self, 'content', '')
class Reference(Resource):
def __str__(self):
return '<Reference (%s)>' % getattr(self, 'ref', '')
class Tag(Resource):
_maps = {'object': Commit,
'tagger': Author} # committer? tagger?
def __str__(self):
return '<Tag (%s)>' % getattr(self, 'tag', '')
class Tree(Resource):
def __str__(self):
return '<Tree (%s)>' % getattr(self, 'sha', '')
|