comparison hglib/context.py @ 99:2b36619ec0a0

client: add date field to revision
author Idan Kamara <idankk86@gmail.com>
date Tue, 17 Jan 2012 22:36:48 +0200
parents 4da6bb8abfcc
children 6e423f7c784f
comparison
equal deleted inserted replaced
98:972d069051c5 99:2b36619ec0a0
1 import client, util, templates 1 import client, util, templates
2 2
3 _nullcset = ['-1', '000000000000000000000000000000000000000', '', '', '', ''] 3 _nullcset = ['-1', '000000000000000000000000000000000000000', '', '', '', '', '']
4 4
5 class changectx(object): 5 class changectx(object):
6 """A changecontext object makes access to data related to a particular 6 """A changecontext object makes access to data related to a particular
7 changeset convenient.""" 7 changeset convenient."""
8 def __init__(self, repo, changeid=''): 8 def __init__(self, repo, changeid=''):
24 if len(cset) > 1: 24 if len(cset) > 1:
25 raise ValueError('changeid must yield a single changeset') 25 raise ValueError('changeid must yield a single changeset')
26 cset = cset[0] 26 cset = cset[0]
27 27
28 self._rev, self._node, self._tags = cset[:3] 28 self._rev, self._node, self._tags = cset[:3]
29 self._branch, self._author, self._description = cset[3:] 29 self._branch, self._author, self._description, self._date = cset[3:]
30 30
31 self._rev = int(self._rev) 31 self._rev = int(self._rev)
32 32
33 self._tags = self._tags.split() 33 self._tags = self._tags.split()
34 try: 34 try: