comparison mercurial/changelog.py @ 3074:ad6aecaf4eed

document changelog format
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Sat, 09 Sep 2006 12:56:08 +0200
parents 345bac2bc4ec
children 394ac87f3b74
comparison
equal deleted inserted replaced
3073:1a792e4a1f3a 3074:ad6aecaf4eed
14 def __init__(self, opener, defversion=REVLOGV0): 14 def __init__(self, opener, defversion=REVLOGV0):
15 revlog.__init__(self, opener, "00changelog.i", "00changelog.d", 15 revlog.__init__(self, opener, "00changelog.i", "00changelog.d",
16 defversion) 16 defversion)
17 17
18 def extract(self, text): 18 def extract(self, text):
19 """
20 format used:
21 nodeid\n : manifest node in ascii
22 user\n : user, no \n or \r allowed
23 time tz\n : date (time is int or float, timezone is int)
24 files\n\n : files modified by the cset, no \n or \r allowed
25 (.*) : comment (free text, ideally utf-8)
26 """
19 if not text: 27 if not text:
20 return (nullid, "", (0, 0), [], "") 28 return (nullid, "", (0, 0), [], "")
21 last = text.index("\n\n") 29 last = text.index("\n\n")
22 desc = text[last + 2:] 30 desc = text[last + 2:]
23 l = text[:last].splitlines() 31 l = text[:last].splitlines()