[cfe-commits] r56414 - /cfe/trunk/tools/scan-view/ScanView.py
Daniel Dunbar
daniel at zuster.org
Sun Sep 21 16:02:26 PDT 2008
Author: ddunbar
Date: Sun Sep 21 18:02:25 2008
New Revision: 56414
URL: http://llvm.org/viewvc/llvm-project?rev=56414&view=rev
Log:
scan-view tweaks:
- Add simple favicon
- Allow resolving source file paths (should be rethought)
Modified:
cfe/trunk/tools/scan-view/ScanView.py
Modified: cfe/trunk/tools/scan-view/ScanView.py
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/scan-view/ScanView.py?rev=56414&r1=56413&r2=56414&view=diff
==============================================================================
--- cfe/trunk/tools/scan-view/ScanView.py (original)
+++ cfe/trunk/tools/scan-view/ScanView.py Sun Sep 21 18:02:25 2008
@@ -24,6 +24,10 @@
kReportReplacements = [(kReportColRE, kReportColRepl),
(kReportBugRE, kReportBugRepl)]
+# Other simple parameters
+
+kResources = posixpath.join(posixpath.dirname(__file__), 'Resources')
+
###
__version__ = "0.1"
@@ -351,12 +355,27 @@
return self.send_report_submit()
else:
return self.send_404()
+ elif name=='favicon.ico':
+ if len(components)==1:
+ return self.send_path(posixpath.join(kResources,'bugcatcher.ico'))
+ else:
+ return self.send_404()
# Match directory entries.
if components[-1] == '':
components[-1] = 'index.html'
-
- path = posixpath.join(self.server.root, '/'.join(components))
+
+ suffix = '/'.join(components)
+
+ # The summary may reference source files on disk using rooted
+ # paths. Make sure these resolve correctly for now.
+ # FIXME: This isn't a very good idea... we should probably
+ # mark rooted paths somehow.
+ if os.path.exists(posixpath.join('/', suffix)):
+ path = posixpath.join('/', suffix)
+ else:
+ path = posixpath.join(self.server.root, suffix)
+
if self.server.options.debug > 1:
print >>sys.stderr, '%s: SERVER: sending path "%s"'%(sys.argv[0],
path)
More information about the cfe-commits
mailing list