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

Side by Side 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 unified diff | Download patch
OLDNEW
(Empty)
1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
5
6 import logging
7
8 from google.appengine.ext import webapp
9 from google.appengine.ext.webapp.util import run_wsgi_app
10 from branch_utility import BranchUtility
11
12
13 class MainPage(webapp.RequestHandler):
14 def get(self):
15 path = self.request.path.replace('/chrome/extensions/', '')
16 if path[0] == '/':
17 path = path.strip('/')
18 logging.info(path)
19 b_util = BranchUtility()
20 branch = b_util.GetBranchNumberForURL(path)
21 self.response.out.write(path + ' ' + branch + '<br/>')
22 if branch == 'trunk':
23 self.response.out.write('http://src.chromium.org/viewvc/chrome/trunk/')
24 else:
25 self.response.out.write(
26 'http://src.chromium.org/viewvc/chrome/branches/' + branch)
27
28 application = webapp.WSGIApplication([
29 ('/.*', MainPage),
30 ], debug=False)
31
32
33 def main():
34 run_wsgi_app(application)
35
36
37 if __name__ == '__main__':
38 main()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698