comparison mercurial/commands.py @ 967:1f3710636b45

[PATCH] Print timezone offset when outputting dates Example: % hg log | head -12 changeset: 791:41440890e57d2dbacde03a2a114e5114a031ea4a tag: tip user: Samuel Tardieu <sam@rfc1149.net> date: Mon Jul 25 13:24:15 2005 +0200 summary: Parse various date formats when accepting user specified dates [...] changeset: 787:ba5c2021364ee876dae170e8f153e43bd0b2bd73 parent: 785:31a80e3723cee0a5991340facb2707e71983eb41 user: Bryan O'Sullivan <bos@serpentine.com> date: Sun Jul 24 00:39:24 2005 -0800 summary: Get "forget" command to use new walk code. [...]
author Samuel Tardieu <sam@rfc1149.net>
date Fri, 19 Aug 2005 23:23:42 -0800
parents 022bcc738389
children a51991ebf229
comparison
equal deleted inserted replaced
966:022bcc738389 967:1f3710636b45
220 ui.write("%d:%s\n" % (rev, hg.short(node))) 220 ui.write("%d:%s\n" % (rev, hg.short(node)))
221 return 221 return
222 222
223 changes = changelog.read(changenode) 223 changes = changelog.read(changenode)
224 224
225 t, tz = changes[2].split(' ')
226 date = time.asctime(time.localtime(float(t))) + " %+05d" % (int(tz)/-36)
227
225 parents = [(log.rev(p), ui.verbose and hg.hex(p) or hg.short(p)) 228 parents = [(log.rev(p), ui.verbose and hg.hex(p) or hg.short(p))
226 for p in log.parents(node) 229 for p in log.parents(node)
227 if ui.debugflag or p != hg.nullid] 230 if ui.debugflag or p != hg.nullid]
228 if not ui.debugflag and len(parents) == 1 and parents[0][0] == rev-1: 231 if not ui.debugflag and len(parents) == 1 and parents[0][0] == rev-1:
229 parents = [] 232 parents = []
245 ui.write("branch: %s\n" % " ".join(br)) 248 ui.write("branch: %s\n" % " ".join(br))
246 249
247 ui.debug("manifest: %d:%s\n" % (repo.manifest.rev(changes[0]), 250 ui.debug("manifest: %d:%s\n" % (repo.manifest.rev(changes[0]),
248 hg.hex(changes[0]))) 251 hg.hex(changes[0])))
249 ui.status("user: %s\n" % changes[1]) 252 ui.status("user: %s\n" % changes[1])
250 ui.status("date: %s\n" % time.asctime( 253 ui.status("date: %s\n" % date)
251 time.localtime(float(changes[2].split(' ')[0]))))
252 254
253 if ui.debugflag: 255 if ui.debugflag:
254 files = repo.changes(changelog.parents(changenode)[0], changenode) 256 files = repo.changes(changelog.parents(changenode)[0], changenode)
255 for key, value in zip(["files:", "files+:", "files-:"], files): 257 for key, value in zip(["files:", "files+:", "files-:"], files):
256 if value: 258 if value: