mercurial/hgweb.py
changeset 1138 51f26e856f3d
parent 1132 92525920ad29
child 1139 916bb2849c4c
equal deleted inserted replaced
1137:c54d03bdf2dc 1138:51f26e856f3d
   945                 repo = repository(ui(), path)
   945                 repo = repository(ui(), path)
   946                 get = repo.ui.config
   946                 get = repo.ui.config
   947 
   947 
   948                 url = os.environ["REQUEST_URI"] + "/" + name
   948                 url = os.environ["REQUEST_URI"] + "/" + name
   949                 url = url.replace("//", "/")
   949                 url = url.replace("//", "/")
       
   950                 changes = repo.changelog.read(repo.changelog.tip())
   950 
   951 
   951                 yield dict(contact=get("web", "contact") or
   952                 yield dict(contact=get("web", "contact") or
   952                                    get("web", "author", "unknown"),
   953                                    get("web", "author", "unknown"),
   953                            name=get("web", "name", name),
   954                            name=get("web", "name", name),
   954                            url=url,
   955                            url=url,
   955                            parity=parity,
   956                            parity=parity,
   956                            shortdesc=get("web", "description", "unknown"),
   957                            shortdesc=get("web", "description", "unknown"),
   957                            lastupdate=os.stat(os.path.join(path, ".hg",
   958                            lastupdate=float(changes[2].split(' ')[0]))
   958                                                 "00changelog.d")).st_mtime)
       
   959 
   959 
   960                 parity = 1 - parity
   960                 parity = 1 - parity
   961 
   961 
   962         try:
   962         try:
   963             virtual = os.environ["PATH_INFO"]
   963             virtual = os.environ["PATH_INFO"]