[grit-i18n] r203 committed - Remove contents of grit's SVN repository....

0 views
Skip to first unread message

grit...@googlecode.com

unread,
Nov 12, 2015, 7:40:01 PM11/12/15
to grit-de...@googlegroups.com
Revision: 203
Author: tha...@chromium.org
Date: Fri Nov 13 00:39:36 2015 UTC
Log: Remove contents of grit's SVN repository.

This code lives elsewhere now, see updated README.

BUG=chromium:553682
R=ne...@chromium.org

Review URL: https://codereview.chromium.org/1442863002
https://code.google.com/p/grit-i18n/source/detail?r=203

Deleted:
/trunk/LICENSE
/trunk/PRESUBMIT.py
/trunk/codereview.settings
/trunk/grit
/trunk/grit.py
/trunk/grit_info.py
Modified:
/trunk/README

=======================================
--- /trunk/LICENSE Wed Aug 26 18:14:31 2015 UTC
+++ /dev/null
@@ -1,25 +0,0 @@
-Copyright (c) 2012 The Chromium Authors.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-Redistributions of source code must retain the above copyright notice,
-this list of conditions and the following disclaimer.
-
-Redistributions in binary form must reproduce the above copyright
-notice, this list of conditions and the following disclaimer in the
-documentation and/or other materials provided with the distribution.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
=======================================
--- /trunk/PRESUBMIT.py Wed Aug 26 18:14:31 2015 UTC
+++ /dev/null
@@ -1,22 +0,0 @@
-# Copyright (c) 2012 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""grit unittests presubmit script.
-
-See
http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for
-details on the presubmit API built into gcl.
-"""
-
-
-def RunUnittests(input_api, output_api):
- return input_api.canned_checks.RunPythonUnitTests(input_api, output_api,
- ['grit.test_suite_all'])
-
-
-def CheckChangeOnUpload(input_api, output_api):
- return RunUnittests(input_api, output_api)
-
-
-def CheckChangeOnCommit(input_api, output_api):
- return RunUnittests(input_api, output_api)
=======================================
--- /trunk/codereview.settings Wed Aug 26 18:14:31 2015 UTC
+++ /dev/null
@@ -1,6 +0,0 @@
-# This file is used by gcl to get repository specific information.
-CODE_REVIEW_SERVER: codereview.chromium.org
-CC_LIST: grit-de...@googlegroups.com
-VIEW_VC: http://code.google.com/p/grit-i18n/source/detail?r=
-TRY_ON_UPLOAD: False
-
=======================================
--- /trunk/grit.py Wed Aug 26 18:14:31 2015 UTC
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/usr/bin/env python
-# Copyright (c) 2012 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-'''Bootstrapping for GRIT.
-'''
-
-import sys
-
-import grit.grit_runner
-
-
-if __name__ == '__main__':
- grit.grit_runner.Main(sys.argv[1:])
-
=======================================
--- /trunk/grit_info.py Wed Aug 26 18:14:31 2015 UTC
+++ /dev/null
@@ -1,193 +0,0 @@
-#!/usr/bin/env python
-# Copyright (c) 2012 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-'''Tool to determine inputs and outputs of a grit file.
-'''
-
-import optparse
-import os
-import posixpath
-import sys
-
-from grit import grd_reader
-from grit import util
-
-class WrongNumberOfArguments(Exception):
- pass
-
-
-def Outputs(filename, defines, ids_file, target_platform=None):
- grd = grd_reader.Parse(
- filename, defines=defines, tags_to_ignore=set(['messages']),
- first_ids_file=ids_file, target_platform=target_platform)
-
- target = []
- lang_folders = {}
- # Add all explicitly-specified output files
- for output in grd.GetOutputFiles():
- path = output.GetFilename()
- target.append(path)
-
- if path.endswith('.h'):
- path, filename = os.path.split(path)
- if output.attrs['lang']:
- lang_folders[output.attrs['lang']] = os.path.dirname(path)
-
- # Add all generated files, once for each output language.
- for node in grd:
- if node.name == 'structure':
- with node:
- # TODO(joi) Should remove the "if sconsdep is true" thing as it is
a
- # hack - see grit/node/structure.py
- if node.HasFileForLanguage() and node.attrs['sconsdep'] == 'true':
- for lang in lang_folders:
- path = node.FileForLanguage(lang, lang_folders[lang],
- create_file=False,
- return_if_not_generated=False)
- if path:
- target.append(path)
-
- return [t.replace('\\', '/') for t in target]
-
-
-def GritSourceFiles():
- files = []
- grit_root_dir = os.path.relpath(os.path.dirname(__file__), os.getcwd())
- for root, dirs, filenames in os.walk(grit_root_dir):
- grit_src = [os.path.join(root, f) for f in filenames
- if f.endswith('.py') and not f.endswith('_unittest.py')]
- files.extend(grit_src)
- return sorted(files)
-
-
-def Inputs(filename, defines, ids_file, target_platform=None):
- grd = grd_reader.Parse(
- filename, debug=False, defines=defines,
tags_to_ignore=set(['message']),
- first_ids_file=ids_file, target_platform=target_platform)
- files = set()
- for lang, ctx, fallback in grd.GetConfigurations():
- # TODO(tdanderson): Refactor all places which perform the action of
setting
- # output attributes on the root. See
crbug.com/503637.
- grd.SetOutputLanguage(lang or grd.GetSourceLanguage())
- grd.SetOutputContext(ctx)
- grd.SetFallbackToDefaultLayout(fallback)
- for node in grd.ActiveDescendants():
- with node:
- if (node.name == 'structure' or node.name == 'skeleton' or
- (node.name == 'file' and node.parent and
- node.parent.name == 'translations')):
- path = node.GetInputPath()
- if path is not None:
- files.add(grd.ToRealPath(path))
-
- # If it's a flattened node, grab inlined resources too.
- if node.name == 'structure' and node.attrs['flattenhtml']
== 'true':
- node.RunPreSubstitutionGatherer()
- files.update(node.GetHtmlResourceFilenames())
- elif node.name == 'grit':
- first_ids_file = node.GetFirstIdsFile()
- if first_ids_file:
- files.add(first_ids_file)
- elif node.name == 'include':
- files.add(grd.ToRealPath(node.GetInputPath()))
- # If it's a flattened node, grab inlined resources too.
- if node.attrs['flattenhtml'] == 'true':
- files.update(node.GetHtmlResourceFilenames())
- elif node.name == 'part':
- files.add(util.normpath(os.path.join(os.path.dirname(filename),
- node.GetInputPath())))
-
- cwd = os.getcwd()
- return [os.path.relpath(f, cwd) for f in sorted(files)]
-
-
-def PrintUsage():
- print 'USAGE: ./grit_info.py --inputs [-D foo] [-f resource_ids]
<grd-file>'
- print (' ./grit_info.py --outputs [-D foo] [-f resource_ids] ' +
- '<out-prefix> <grd-file>')
-
-
-def DoMain(argv):
- parser = optparse.OptionParser()
- parser.add_option("--inputs", action="store_true", dest="inputs")
- parser.add_option("--outputs", action="store_true", dest="outputs")
- parser.add_option("-D", action="append", dest="defines", default=[])
- # grit build also supports '-E KEY=VALUE', support that to share command
- # line flags.
- parser.add_option("-E", action="append", dest="build_env", default=[])
- parser.add_option("-w", action="append", dest="whitelist_files",
default=[])
- parser.add_option("--output-all-resource-defines", action="store_true",
- dest="output_all_resource_defines", default=True,
- help="Unused")
- parser.add_option("--no-output-all-resource-defines",
action="store_false",
- dest="output_all_resource_defines", default=True,
- help="Unused")
- parser.add_option("-f", dest="ids_file",
- default="GRIT_DIR/../gritsettings/resource_ids")
- parser.add_option("-t", dest="target_platform", default=None)
-
- options, args = parser.parse_args(argv)
-
- defines = {}
- for define in options.defines:
- name, val = util.ParseDefine(define)
- defines[name] = val
-
- for env_pair in options.build_env:
- (env_name, env_value) = env_pair.split('=', 1)
- os.environ[env_name] = env_value
-
- if options.inputs:
- if len(args) > 1:
- raise WrongNumberOfArguments("Expected 0 or 1 arguments for
--inputs.")
-
- inputs = []
- if len(args) == 1:
- filename = args[0]
- inputs = Inputs(filename, defines, options.ids_file,
- options.target_platform)
-
- # Add in the grit source files. If one of these change, we want to
re-run
- # grit.
- inputs.extend(GritSourceFiles())
- inputs = [f.replace('\\', '/') for f in inputs]
-
- if len(args) == 1:
- # Include grd file as second input (works around gyp expecting it).
- inputs.insert(1, args[0])
- if options.whitelist_files:
- inputs.extend(options.whitelist_files)
- return '\n'.join(inputs)
- elif options.outputs:
- if len(args) != 2:
- raise WrongNumberOfArguments(
- "Expected exactly 2 arguments for --outputs.")
-
- prefix, filename = args
- outputs = [posixpath.join(prefix, f)
- for f in Outputs(filename, defines,
- options.ids_file, options.target_platform)]
- return '\n'.join(outputs)
- else:
- raise WrongNumberOfArguments("Expected --inputs or --outputs.")
-
-
-def main(argv):
- if sys.version_info < (2, 6):
- print "GRIT requires Python 2.6 or later."
- return 1
-
- try:
- result = DoMain(argv[1:])
- except WrongNumberOfArguments, e:
- PrintUsage()
- print e
- return 1
- print result
- return 0
-
-
-if __name__ == '__main__':
- sys.exit(main(sys.argv))
=======================================
--- /trunk/README Wed Aug 26 18:14:31 2015 UTC
+++ /trunk/README Fri Nov 13 00:39:36 2015 UTC
@@ -1,2 +1,6 @@
-GRIT (Google Resource and Internationalization Tool) is a tool for Windows
-projects to manage resources and simplify the localization workflow.
+GRIT's code now lives in Chromium's repository at
+https://chromium.googlesource.com/chromium/src/+/master/tools/grit
+
+There is a read-only mirror of just that directory at
+https://chromium.googlesource.com/chromium/src/tools/grit/
+if you don't want to check out all of Chromium.
Reply all
Reply to author
Forward
0 new messages