Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(322)

Unified Diff: chrome/common/extensions/docs/server2/echo_handler.py

Issue 10387225: Die build.py, Die: Part 1 (BranchUtility and SubversionFetcher) (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Unit tests Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/docs/server2/echo_handler.py
diff --git a/chrome/common/extensions/docs/server2/echo_handler.py b/chrome/common/extensions/docs/server2/echo_handler.py
new file mode 100755
index 0000000000000000000000000000000000000000..7faecccb29d2950206817602a5189ddced034a8a
--- /dev/null
+++ b/chrome/common/extensions/docs/server2/echo_handler.py
@@ -0,0 +1,38 @@
+#!/usr/bin/env python
+# Copyright (c) 2012 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import logging
+
+from google.appengine.ext import webapp
+from google.appengine.ext.webapp.util import run_wsgi_app
+from branch_utility import BranchUtility
+
+
+class MainPage(webapp.RequestHandler):
+ def get(self):
+ path = self.request.path.replace('/chrome/extensions/', '')
+ if path[0] == '/':
+ path = path.strip('/')
+ logging.info(path)
+ b_util = BranchUtility()
+ branch = b_util.GetBranchNumberForURL(path)
+ self.response.out.write(path + ' ' + branch + '<br/>')
+ if branch == 'trunk':
+ self.response.out.write('http://src.chromium.org/viewvc/chrome/trunk/')
+ else:
+ self.response.out.write(
+ 'http://src.chromium.org/viewvc/chrome/branches/' + branch)
+
+application = webapp.WSGIApplication([
+ ('/.*', MainPage),
+], debug=False)
+
+
+def main():
+ run_wsgi_app(application)
+
+
+if __name__ == '__main__':
+ main()

Powered by Google App Engine
This is Rietveld 408576698