diff options
author | robertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-14 17:58:21 +0000 |
---|---|---|
committer | robertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-14 17:58:21 +0000 |
commit | a332692bfdab2ce4383391886554e8ae9282805e (patch) | |
tree | c9016c9714e348aa904f7a32c2b7c97d994f1d76 /tools/symsrc | |
parent | c30317ad286963ae4f5349f5f20ae24ce9174ef7 (diff) | |
download | chromium_src-a332692bfdab2ce4383391886554e8ae9282805e.zip chromium_src-a332692bfdab2ce4383391886554e8ae9282805e.tar.gz chromium_src-a332692bfdab2ce4383391886554e8ae9282805e.tar.bz2 |
Remove the ridiculous log spew in the archive_build.py step of official builds.
BUG=NONE
TEST=NONE
Review URL: http://codereview.chromium.org/6518009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74826 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/symsrc')
-rw-r--r-- | tools/symsrc/source_index.py | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/tools/symsrc/source_index.py b/tools/symsrc/source_index.py index 152fe22..8160872 100644 --- a/tools/symsrc/source_index.py +++ b/tools/symsrc/source_index.py @@ -119,7 +119,7 @@ def ExtractSvnInfo(local_filename): return [root, path, rev] -def UpdatePDB(pdb_filename): +def UpdatePDB(pdb_filename, verbose=False): """Update a pdb file with source information.""" dir_blacklist = { } # TODO(deanm) look into "compressing" our output, by making use of vars @@ -145,11 +145,13 @@ def UpdatePDB(pdb_filename): for filename in filelist: filedir = os.path.dirname(filename) - print "Processing: %s" % filename + if verbose: + print "Processing: %s" % filename # This directory is blacklisted, either because it's not part of the SVN # repository, or from one we're not interested in indexing. if dir_blacklist.get(filedir, False): - print " skipping, directory is blacklisted." + if verbose: + print " skipping, directory is blacklisted." continue info = ExtractSvnInfo(filename) @@ -160,7 +162,8 @@ def UpdatePDB(pdb_filename): if not info: if not ExtractSvnInfo(filedir): dir_blacklist[filedir] = True - print " skipping, file is not in an SVN repository" + if verbose: + print " skipping, file is not in an SVN repository" continue root = info[0] @@ -170,7 +173,8 @@ def UpdatePDB(pdb_filename): # Check if file was from a svn repository we don't know about, or don't # want to index. Blacklist the entire directory. if not REPO_MAP.has_key(info[0]): - print " skipping, file is from an unknown SVN repository %s" % root + if verbose: + print " skipping, file is from an unknown SVN repository %s" % root dir_blacklist[filedir] = True continue @@ -179,15 +183,20 @@ def UpdatePDB(pdb_filename): root = REPO_MAP[root] lines.append('%s*%s*%s*%s' % (filename, root, path, rev)) - print " indexed file." + if verbose: + print " indexed file." lines.append('SRCSRV: end ------------------------------------------------') WriteSourceStream(pdb_filename, '\r\n'.join(lines)) if __name__ == '__main__': - if len(sys.argv) != 2: - print "usage: file.pdb" + if len(sys.argv) < 2 or len(sys.argv) > 3: + print "usage: file.pdb [-v]" sys.exit(1) - UpdatePDB(sys.argv[1]) + verbose = False + if len(sys.argv) == 3: + verbose = (sys.argv[2] == '-v') + + UpdatePDB(sys.argv[1], verbose=verbose) |