Mercurial > hg > mercurial-crew-with-dirclash
comparison mercurial/templater.py @ 4779:37e11c768db9
merge with crew-stable
author | Alexis S. L. Carvalho <alexis@cecm.usp.br> |
---|---|
date | Tue, 03 Jul 2007 03:14:18 -0300 |
parents | e21a0e12ff10 |
children | 46c5e1ee8aaa |
comparison
equal
deleted
inserted
replaced
4774:38bf55d2e41f | 4779:37e11c768db9 |
---|---|
243 yield l | 243 yield l |
244 if i < num_lines - 1 or text.endswith('\n'): | 244 if i < num_lines - 1 or text.endswith('\n'): |
245 yield '\n' | 245 yield '\n' |
246 return "".join(indenter()) | 246 return "".join(indenter()) |
247 | 247 |
248 def permissions(flags): | |
249 if "l" in flags: | |
250 return "lrwxrwxrwx" | |
251 if "x" in flags: | |
252 return "-rwxr-xr-x" | |
253 return "-rw-r--r--" | |
254 | |
248 common_filters = { | 255 common_filters = { |
249 "addbreaks": nl2br, | 256 "addbreaks": nl2br, |
250 "basename": os.path.basename, | 257 "basename": os.path.basename, |
251 "age": age, | 258 "age": age, |
252 "date": lambda x: util.datestr(x), | 259 "date": lambda x: util.datestr(x), |
258 "firstline": firstline, | 265 "firstline": firstline, |
259 "tabindent": lambda x: indent(x, '\t'), | 266 "tabindent": lambda x: indent(x, '\t'), |
260 "hgdate": hgdate, | 267 "hgdate": hgdate, |
261 "isodate": isodate, | 268 "isodate": isodate, |
262 "obfuscate": obfuscate, | 269 "obfuscate": obfuscate, |
263 "permissions": lambda x: x and "-rwxr-xr-x" or "-rw-r--r--", | 270 "permissions": permissions, |
264 "person": person, | 271 "person": person, |
265 "rfc822date": lambda x: util.datestr(x, "%a, %d %b %Y %H:%M:%S"), | 272 "rfc822date": lambda x: util.datestr(x, "%a, %d %b %Y %H:%M:%S"), |
266 "short": lambda x: x[:12], | 273 "short": lambda x: x[:12], |
267 "shortdate": shortdate, | 274 "shortdate": shortdate, |
268 "stringify": stringify, | 275 "stringify": stringify, |