mercurial/changelog.py
changeset 1195 f92af8d53330
parent 1095 0a18374c0769
child 1196 3738e85ead07
equal deleted inserted replaced
1194:c165cbf56bb1 1195:f92af8d53330
    29     def read(self, node):
    29     def read(self, node):
    30         return self.extract(self.revision(node))
    30         return self.extract(self.revision(node))
    31 
    31 
    32     def add(self, manifest, list, desc, transaction, p1=None, p2=None,
    32     def add(self, manifest, list, desc, transaction, p1=None, p2=None,
    33                   user=None, date=None):
    33                   user=None, date=None):
    34         if not date:
    34         if date:
       
    35             when, offset = map(int, date.split())
       
    36             assert abs(offset) < 43200, 'bad time zone offset: %d' % offset
       
    37         else:
    35             if time.daylight: offset = time.altzone
    38             if time.daylight: offset = time.altzone
    36             else: offset = time.timezone
    39             else: offset = time.timezone
    37             date = "%d %d" % (time.time(), offset)
    40             date = "%d %d" % (time.time(), offset)
    38         list.sort()
    41         list.sort()
    39         l = [hex(manifest), user, date] + list + ["", desc]
    42         l = [hex(manifest), user, date] + list + ["", desc]