Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: ensure_dependencies.py

Issue 5135047623442432: Issue 1808 - ensure_dependencies.py generates wrong repository path for local roots (Closed)
Patch Set: Created Jan. 14, 2015, 9:23 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ensure_dependencies.py
===================================================================
--- a/ensure_dependencies.py
+++ b/ensure_dependencies.py
@@ -182,17 +182,21 @@ def ensure_repo(parentrepo, target, root
parenttype = get_repo_type(parentrepo)
type = None
for key in roots:
if key == parenttype or (key in repo_types and type is None):
type = key
if type is None:
raise Exception("No valid source found to create %s" % target)
- url = urlparse.urljoin(roots[type], sourcename)
+ if os.path.exists(roots[type]):
+ url = os.path.join(roots[type], sourcename)
+ else:
+ url = urlparse.urljoin(roots[type], sourcename)
+
logging.info("Cloning repository %s into %s" % (url, target))
repo_types[type].clone(url, target)
for repo in repo_types.itervalues():
if repo.istype(parentrepo):
repo.ignore(target, parentrepo)
def update_repo(target, revisions):
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld