Mercurial > hg
comparison hgext/hgk.py @ 2525:c49dc6f38a19
hgk: Don't choke on empty changelogs
author | Brendan Cully <brendan@kublai.com> |
---|---|
date | Fri, 30 Jun 2006 21:35:22 +0200 |
parents | 6877064c72f7 |
children | b5779a04f208 |
comparison
equal
deleted
inserted
replaced
2524:c1974f65d781 | 2525:c49dc6f38a19 |
---|---|
129 if i1 != -1: print "parent %s" % (h1) | 129 if i1 != -1: print "parent %s" % (h1) |
130 if i2 != -1: print "parent %s" % (h2) | 130 if i2 != -1: print "parent %s" % (h2) |
131 date_ar = changes[2] | 131 date_ar = changes[2] |
132 date = int(float(date_ar[0])) | 132 date = int(float(date_ar[0])) |
133 lines = changes[4].splitlines() | 133 lines = changes[4].splitlines() |
134 if lines[-1].startswith('committer:'): | 134 if lines and lines[-1].startswith('committer:'): |
135 committer = lines[-1].split(': ')[1].rstrip() | 135 committer = lines[-1].split(': ')[1].rstrip() |
136 else: | 136 else: |
137 committer = changes[1] | 137 committer = changes[1] |
138 | 138 |
139 print "author %s %s %s" % (changes[1], date, date_ar[1]) | 139 print "author %s %s %s" % (changes[1], date, date_ar[1]) |