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

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

Issue 10834144: Extensions Docs Server: Split apps from extensions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: reworked Created 8 years, 4 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/branch_utility.py
diff --git a/chrome/common/extensions/docs/server2/branch_utility.py b/chrome/common/extensions/docs/server2/branch_utility.py
index b1470c2e38c43593282adf2962ec20a2ead361af..166c1a9b52f1ccd5e26041268a1cc6080eea47c0 100644
--- a/chrome/common/extensions/docs/server2/branch_utility.py
+++ b/chrome/common/extensions/docs/server2/branch_utility.py
@@ -15,15 +15,22 @@ class BranchUtility(object):
self._memcache = memcache
def SplitChannelNameFromPath(self, path):
+ prefix = ''
+ if path.startswith('extensions/'):
+ prefix = 'extensions/'
+ path = path[len('extensions/'):]
+ elif path.startswith('apps/'):
+ prefix = 'apps/'
+ path = path[len('apps/'):]
not at google - send to devlin 2012/08/06 08:38:33 Is all of this necessary? The paths will be http:
cduvall 2012/08/06 18:36:16 In the old docs, the branch came last. For example
try:
first, second = path.split('/', 1)
except ValueError:
first = path
second = ''
if first in ['trunk', 'dev', 'beta', 'stable']:
- return (first, second)
+ return (first, prefix + second)
else:
- return (self._default_branch, path)
+ return (self._default_branch, prefix + path)
def GetBranchNumberForChannelName(self, channel_name):
"""Returns an empty string if the branch number cannot be found.

Powered by Google App Engine
This is Rietveld 408576698