##// END OF EJS Templates
hgweb: use lrwxrwxrwx as the permissions of a symlink
Alexis S. L. Carvalho -
r4745:e21a0e12 default
parent child Browse files
Show More
@@ -404,7 +404,7 b' class hgweb(object):'
404 parent=self.siblings(fctx.parents()),
404 parent=self.siblings(fctx.parents()),
405 child=self.siblings(fctx.children()),
405 child=self.siblings(fctx.children()),
406 rename=self.renamelink(fl, n),
406 rename=self.renamelink(fl, n),
407 permissions=fctx.manifest().execf(f))
407 permissions=fctx.manifest().flags(f))
408
408
409 def fileannotate(self, fctx):
409 def fileannotate(self, fctx):
410 f = fctx.path()
410 f = fctx.path()
@@ -440,7 +440,7 b' class hgweb(object):'
440 rename=self.renamelink(fl, n),
440 rename=self.renamelink(fl, n),
441 parent=self.siblings(fctx.parents()),
441 parent=self.siblings(fctx.parents()),
442 child=self.siblings(fctx.children()),
442 child=self.siblings(fctx.children()),
443 permissions=fctx.manifest().execf(f))
443 permissions=fctx.manifest().flags(f))
444
444
445 def manifest(self, ctx, path):
445 def manifest(self, ctx, path):
446 mf = ctx.manifest()
446 mf = ctx.manifest()
@@ -477,7 +477,7 b' class hgweb(object):'
477 "parity": parity.next(),
477 "parity": parity.next(),
478 "basename": f,
478 "basename": f,
479 "size": ctx.filectx(full).size(),
479 "size": ctx.filectx(full).size(),
480 "permissions": mf.execf(full)}
480 "permissions": mf.flags(full)}
481
481
482 def dirlist(**map):
482 def dirlist(**map):
483 fl = files.keys()
483 fl = files.keys()
@@ -245,6 +245,13 b' def indent(text, prefix):'
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,
@@ -260,7 +267,7 b' common_filters = {'
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],
General Comments 0
You need to be logged in to leave comments. Login now