Index: gclient_utils.py |
diff --git a/gclient_utils.py b/gclient_utils.py |
index e2cfb11b3fe91b4ecc5af06ca17ff6cb397085b6..3a6438d1c0226dd1bf8d1d288e574dbdef0ed399 100644 |
--- a/gclient_utils.py |
+++ b/gclient_utils.py |
@@ -38,6 +38,17 @@ def SplitUrlRevision(url): |
return tuple(components) |
+def FullUrlFromRelative(base_url, url): |
+ # Find the forth '/' and strip from there. A bit hackish. |
+ return '/'.join(base_url.split('/')[:4]) + url |
+ |
+ |
+def FullUrlFromRelative2(base_url, url): |
M-A Ruel
2009/12/15 18:49:42
Frankly, I would have prefered it to be SCM-depend
Mandeep Singh Baines
2009/12/15 20:54:30
k, I'll send out a CL to do that. I don't want to
|
+ # Strip from last '/' |
+ # Equivalent to unix basename |
+ return base_url[:base_url.rfind('/')] + url |
+ |
+ |
def ParseXML(output): |
try: |
return xml.dom.minidom.parseString(output) |