comparison mercurial/hgweb.py @ 195:b98bcf66dd9d

hgweb: make age() smarter -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 hgweb: make age() smarter manifest hash: 3aa19b2960d81843e573a8ce79a242defeb80f6a -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) iD8DBQFCm0JYywK+sNU5EO8RAvLUAKCJbWqvnzfirS64LbaWbBaWlkfbfACcCyGq Y9UMZRGDBGCEIVu9f/F/F6U= =+ULo -----END PGP SIGNATURE-----
author mpm@selenic.com
date Mon, 30 May 2005 08:42:00 -0800
parents 767916673e16
children b388603984fc
comparison
equal deleted inserted replaced
194:4ec26766be83 195:b98bcf66dd9d
38 38
39 scales.reverse() 39 scales.reverse()
40 40
41 for t, s in scales: 41 for t, s in scales:
42 n = delta / s 42 n = delta / s
43 if n >= 1: return fmt(t, n) 43 if n >= 2 or s == 1: return fmt(t, n)
44 44
45 def nl2br(text): 45 def nl2br(text):
46 return text.replace('\n', '<br/>') 46 return text.replace('\n', '<br/>')
47 47
48 def obfuscate(text): 48 def obfuscate(text):