Skip to content

Commit

Permalink
Implement --repofrompath option in show-changed-rco.py
Browse files Browse the repository at this point in the history
(was already documented but not implemented)
  • Loading branch information
Zdeněk Pavlas committed Mar 21, 2012
1 parent 9cd8df8 commit d3e8a07
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions show-changed-rco.py
Expand Up @@ -194,6 +194,21 @@ def main():
if opts.conffile is not None:
yb.preconf.fn = opts.conffile

# setup the fake repos
for repo in opts.repofrompath or []:
tmp = tuple(repo.split(','))
if len(tmp) != 2:
yb.logger.error("Error: Bad repofrompath argument: %s" %repo)
continue
repoid,repopath = tmp
if repopath[0] == '/':
baseurl = 'file://' + repopath
else:
baseurl = repopath
yb.add_enable_repo(repoid, baseurls=[baseurl],
basecachedir=yb.conf.cachedir)
yb.logger.info("Added %s repo from %s" % (repoid, repopath))

if opts.cache:
yb.conf.cache = 1
elif not yb.setCacheDir():
Expand Down

0 comments on commit d3e8a07

Please sign in to comment.