| OLD | NEW |
| (Empty) | |
| 1 # Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. |
| 4 |
| 5 from appengine_url_fetcher import AppEngineUrlFetcher |
| 6 from appengine_wrappers import GetAppVersion |
| 7 from object_store_creator import ObjectStoreCreator |
| 8 #from servlet import Servlet |
| 9 |
| 10 PATCH_BASEURL = '_patch/' |
| 11 PATCH_CHANNEL_NAME = 'trunk' |
| 12 |
| 13 class PatchServlet(object): |
| 14 '''Servlet which renders patched docs. |
| 15 ''' |
| 16 @staticmethod |
| 17 def SplitPatchFromPath(path): |
| 18 if path.startswith(PATCH_BASEURL): |
| 19 remaining_path = path.split(PATCH_BASEURL, 1)[1] |
| 20 if not '/' in remaining_path: |
| 21 return (None, None, None) |
| 22 issue, real_path = remaining_path.split('/', 1) |
| 23 if not issue.isdigit() or len(real_path) == 0: |
| 24 return (None, None, None) |
| 25 return (PATCH_CHANNEL_NAME, issue, real_path) |
| 26 else: |
| 27 return (None, None, None) |
| OLD | NEW |