Эх сурвалжийг харах

Replace non-inclusive terms

Bug: 1118410, 1118413, 1118422, 1118424, 1118426
Bug: 1118428, 1118430, 1118434, 1118438, 1118442
Bug: 1118453, 1118454
Recipe-Nontrivial-Roll: chromiumos
Recipe-Nontrivial-Roll: build
Change-Id: I43e6305f8c3136774f01b57f12bb442bcb863371
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2551388
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Josip Sokcevic 4 жил өмнө
parent
commit
9c0dc3026e

+ 1 - 1
README.git-cl.md

@@ -45,7 +45,7 @@ git-cl simplifies the above in the following ways:
    (Note that this association is tied to a branch, not a commit, which means
    you need a separate branch per review.)
 3. If your branch is _tracking_ (in the `git checkout --track` sense) another
-   one (like origin/master), calls to `git cl upload` will diff against that
+   one (like origin/main), calls to `git cl upload` will diff against that
    branch by default.  (You can still pass arguments to `git diff` on the
    command line, if necessary.)
 

+ 1 - 1
bootstrap/README.md

@@ -47,7 +47,7 @@ same specification, which will cause the remainder of systems to update.
 ### Bundles
 
 Git and Python bundle construction is documented in
-[infra packaging](https://chromium.googlesource.com/infra/infra/+/master/doc/packaging/).
+[infra packaging](https://chromium.googlesource.com/infra/infra/+/HEAD/doc/packaging/).
 
 Note that in order for the update to take effect, `gclient` currently needs to
 run twice. The first time it will update the `depot_tools` repo, and the second

+ 1 - 1
gclient.py

@@ -404,7 +404,7 @@ class Dependency(gclient_utils.WorkItem, DependencySettings):
     self._file_list = []
     # List of host names from which dependencies are allowed.
     # Default is an empty set, meaning unspecified in DEPS file, and hence all
-    # hosts will be allowed. Non-empty set means whitelist of hosts.
+    # hosts will be allowed. Non-empty set means allowlist of hosts.
     # allowed_hosts var is scoped to its DEPS file, and so it isn't recursive.
     self._allowed_hosts = frozenset()
     self._gn_args_from = None

+ 4 - 4
gclient_scm.py

@@ -345,7 +345,7 @@ class GitWrapper(SCMWrapper):
 
     The patch ref is given by |patch_repo|@|patch_rev|.
     |target_rev| is usually the branch that the |patch_rev| was uploaded against
-    (e.g. 'refs/heads/master'), but this is not required.
+    (e.g. 'refs/heads/main'), but this is not required.
 
     We cherry-pick all commits reachable from |patch_rev| on top of the curret
     HEAD, excluding those reachable from |target_rev|
@@ -371,7 +371,7 @@ class GitWrapper(SCMWrapper):
           e.g. 'refs/changes/1234/34/1'.
       target_rev: The revision to use when finding the merge base.
           Typically, the branch that the patch was uploaded against.
-          e.g. 'refs/heads/master' or 'refs/heads/infra/config'.
+          e.g. 'refs/heads/main' or 'refs/heads/infra/config'.
       options: The options passed to gclient.
       file_list: A list where modified files will be appended.
     """
@@ -632,9 +632,9 @@ class GitWrapper(SCMWrapper):
     #      - checkout new branch
     #   c) otherwise exit
 
-    # GetUpstreamBranch returns something like 'refs/remotes/origin/master' for
+    # GetUpstreamBranch returns something like 'refs/remotes/origin/main' for
     # a tracking branch
-    # or 'master' if not a tracking branch (it's based on a specific rev/hash)
+    # or 'main' if not a tracking branch (it's based on a specific rev/hash)
     # or it returns None if it couldn't find an upstream
     if cur_branch is None:
       upstream_branch = None

+ 2 - 2
git_common.py

@@ -75,7 +75,7 @@ FREEZE_MATCHER = re.compile(r'%s.(%s)' % (FREEZE, '|'.join(FREEZE_SECTIONS)))
 
 
 # NOTE: This list is DEPRECATED in favor of the Infra Git wrapper:
-# https://chromium.googlesource.com/infra/infra/+/master/go/src/infra/tools/git
+# https://chromium.googlesource.com/infra/infra/+/HEAD/go/src/infra/tools/git
 #
 # New entries should be added to the Git wrapper, NOT to this list. "git_retry"
 # is, similarly, being deprecated in favor of the Git wrapper.
@@ -629,7 +629,7 @@ def parse_commitrefs(*commitrefs):
 
   A commitref is anything which can resolve to a commit. Popular examples:
     * 'HEAD'
-    * 'origin/master'
+    * 'origin/main'
     * 'cool_branch~2'
   """
   try:

+ 2 - 2
git_footers.py

@@ -192,9 +192,9 @@ def get_position(footers):
   Returns:
     A tuple of the branch and the position on that branch. For example,
 
-    Cr-Commit-Position: refs/heads/master@{#292272}
+    Cr-Commit-Position: refs/heads/main@{#292272}
 
-    would give the return value ('refs/heads/master', 292272).
+    would give the return value ('refs/heads/main', 292272).
   """
 
   position = get_unique(footers, 'Cr-Commit-Position')

+ 1 - 1
git_map_branches.py

@@ -6,7 +6,7 @@
 """Print dependency tree of branches in local repo.
 
 Example:
-origin/master
+origin/main
   cool_feature
     dependent_feature
     other_dependent_feature

+ 1 - 1
git_new_branch.py

@@ -3,7 +3,7 @@
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
 """
-Create new branch tracking origin/master by default.
+Create new branch tracking origin HEAD by default.
 """
 
 import argparse

+ 2 - 2
git_retry.py

@@ -7,7 +7,7 @@
 """Generic retry wrapper for Git operations. 
 
 This is largely DEPRECATED in favor of the Infra Git wrapper:
-https://chromium.googlesource.com/infra/infra/+/master/go/src/infra/tools/git
+https://chromium.googlesource.com/infra/infra/+/HEAD/go/src/infra/tools/git
 """
 
 import logging
@@ -120,7 +120,7 @@ class GitRetry(object):
 
 def main(args):
   # If we're using the Infra Git wrapper, do nothing here.
-  # https://chromium.googlesource.com/infra/infra/+/master/go/src/infra/tools/git
+  # https://chromium.googlesource.com/infra/infra/+/HEAD/go/src/infra/tools/git
   if 'INFRA_GIT_WRAPPER' in os.environ:
     # Remove Git's execution path from PATH so that our call-through re-invokes
     # the Git wrapper.

+ 1 - 1
gsutil.vpython

@@ -1,7 +1,7 @@
 # vpython VirtualEnv protobuf for "gsutil".
 #
 # See:
-# https://chromium.googlesource.com/infra/luci/luci-go/+/master/vpython/api/vpython/spec.proto
+# https://chromium.googlesource.com/infra/luci/luci-go/+/HEAD/vpython/api/vpython/spec.proto
 #
 # This is a "vpython" VirtualEnv specification applied to invocations of "gsutil"
 # by the bootstrap wrapper, "gsutil.py". It ensures that any Python distribution

+ 3 - 3
metrics.README.md

@@ -30,7 +30,7 @@ First, some words about what data we are **NOT** collecting:
 - We won't record information about the current directory or environment flags.
 - We won't record arbitrary strings. We only collect a string if it is in the
   list available at
-  https://source.chromium.org/chromium/infra/infra/+/master:go/src/infra/appengine/depot_tools_metrics/metrics/constants.go
+  https://source.chromium.org/chromium/infra/infra/+/HEAD:go/src/infra/appengine/depot_tools_metrics/metrics/constants.go
 
 The metrics we're collecting are:
 
@@ -72,10 +72,10 @@ The metrics we're collecting are:
   - What was the exit code?
 
 The list of all known strings we collect can be found at
-https://source.chromium.org/chromium/infra/infra/+/master:go/src/infra/appengine/depot_tools_metrics/metrics/constants.go
+https://source.chromium.org/chromium/infra/infra/+/HEAD:go/src/infra/appengine/depot_tools_metrics/metrics/constants.go
 
 The schema for the metrics being collected can be found at
-https://source.chromium.org/chromium/infra/infra/+/master:go/src/infra/appengine/depot_tools_metrics/schema/schema.proto
+https://source.chromium.org/chromium/infra/infra/+/HEAD:go/src/infra/appengine/depot_tools_metrics/schema/schema.proto
 
 ## Why am I seeing this message *again*?
 

+ 5 - 5
recipes/recipe_modules/gerrit/examples/full.expected/basic.json

@@ -52,7 +52,7 @@
     "name": "gerrit get_gerrit_branch (v8/v8 master)",
     "~followup_annotations": [
       "@@@STEP_LOG_LINE@json.output@{@@@",
-      "@@@STEP_LOG_LINE@json.output@  \"ref\": \"refs/heads/master\", @@@",
+      "@@@STEP_LOG_LINE@json.output@  \"ref\": \"refs/heads/main\", @@@",
       "@@@STEP_LOG_LINE@json.output@  \"revision\": \"67ebf73496383c6777035e374d2d664009e2aa5c\"@@@",
       "@@@STEP_LOG_LINE@json.output@}@@@",
       "@@@STEP_LOG_END@json.output@@@"
@@ -136,7 +136,7 @@
       "@@@STEP_LOG_LINE@json.output@[@@@",
       "@@@STEP_LOG_LINE@json.output@  {@@@",
       "@@@STEP_LOG_LINE@json.output@    \"_number\": \"91827\", @@@",
-      "@@@STEP_LOG_LINE@json.output@    \"branch\": \"master\", @@@",
+      "@@@STEP_LOG_LINE@json.output@    \"branch\": \"main\", @@@",
       "@@@STEP_LOG_LINE@json.output@    \"change_id\": \"Ideadbeef\", @@@",
       "@@@STEP_LOG_LINE@json.output@    \"created\": \"2017-01-30 13:11:20.000000000\", @@@",
       "@@@STEP_LOG_LINE@json.output@    \"has_review_started\": false, @@@",
@@ -211,7 +211,7 @@
       "@@@STEP_LOG_LINE@json.output@[@@@",
       "@@@STEP_LOG_LINE@json.output@  {@@@",
       "@@@STEP_LOG_LINE@json.output@    \"_number\": \"91827\", @@@",
-      "@@@STEP_LOG_LINE@json.output@    \"branch\": \"master\", @@@",
+      "@@@STEP_LOG_LINE@json.output@    \"branch\": \"main\", @@@",
       "@@@STEP_LOG_LINE@json.output@    \"change_id\": \"Ideadbeef\", @@@",
       "@@@STEP_LOG_LINE@json.output@    \"created\": \"2017-01-30 13:11:20.000000000\", @@@",
       "@@@STEP_LOG_LINE@json.output@    \"has_review_started\": false, @@@",
@@ -255,7 +255,7 @@
       "@@@STEP_LOG_LINE@json.output@[@@@",
       "@@@STEP_LOG_LINE@json.output@  {@@@",
       "@@@STEP_LOG_LINE@json.output@    \"_number\": \"123\", @@@",
-      "@@@STEP_LOG_LINE@json.output@    \"branch\": \"master\", @@@",
+      "@@@STEP_LOG_LINE@json.output@    \"branch\": \"main\", @@@",
       "@@@STEP_LOG_LINE@json.output@    \"change_id\": \"Ideadbeef\", @@@",
       "@@@STEP_LOG_LINE@json.output@    \"created\": \"2017-01-30 13:11:20.000000000\", @@@",
       "@@@STEP_LOG_LINE@json.output@    \"has_review_started\": false, @@@",
@@ -303,7 +303,7 @@
       "@@@STEP_LOG_LINE@json.output@[@@@",
       "@@@STEP_LOG_LINE@json.output@  {@@@",
       "@@@STEP_LOG_LINE@json.output@    \"_number\": \"91827\", @@@",
-      "@@@STEP_LOG_LINE@json.output@    \"branch\": \"master\", @@@",
+      "@@@STEP_LOG_LINE@json.output@    \"branch\": \"main\", @@@",
       "@@@STEP_LOG_LINE@json.output@    \"change_id\": \"Ideadbeef\", @@@",
       "@@@STEP_LOG_LINE@json.output@    \"created\": \"2017-01-30 13:11:20.000000000\", @@@",
       "@@@STEP_LOG_LINE@json.output@    \"has_review_started\": false, @@@",

+ 2 - 2
recipes/recipe_modules/gerrit/test_api.py

@@ -14,7 +14,7 @@ EXAMPLE_CHANGE = {
   'change_id': 'Ideadbeef',
   'project': 'chromium/src',
   'has_review_started': False,
-  'branch': 'master',
+  'branch': 'main',
   'subject': 'Change title',
   'revisions': {
     '184ebe53805e102605d11f6b143486d15c23a09c': {
@@ -40,7 +40,7 @@ class GerritTestApi(recipe_test_api.RecipeTestApi):
 
   def make_gerrit_get_branch_response_data(self):
     return self._make_gerrit_response_json({
-      "ref": "refs/heads/master",
+      "ref": "refs/heads/main",
       "revision": "67ebf73496383c6777035e374d2d664009e2aa5c"
     })
 

+ 1 - 1
recipes/recipe_modules/tryserver/examples/full.expected/with_gerrit_patch.json

@@ -70,7 +70,7 @@
       "@@@STEP_LOG_LINE@json.output@[@@@",
       "@@@STEP_LOG_LINE@json.output@  {@@@",
       "@@@STEP_LOG_LINE@json.output@    \"_number\": \"91827\", @@@",
-      "@@@STEP_LOG_LINE@json.output@    \"branch\": \"master\", @@@",
+      "@@@STEP_LOG_LINE@json.output@    \"branch\": \"main\", @@@",
       "@@@STEP_LOG_LINE@json.output@    \"change_id\": \"Ideadbeef\", @@@",
       "@@@STEP_LOG_LINE@json.output@    \"created\": \"2017-01-30 13:11:20.000000000\", @@@",
       "@@@STEP_LOG_LINE@json.output@    \"has_review_started\": false, @@@",

+ 1 - 1
recipes/recipe_modules/tryserver/examples/full.expected/with_gerrit_patch_and_target_ref.json

@@ -70,7 +70,7 @@
       "@@@STEP_LOG_LINE@json.output@[@@@",
       "@@@STEP_LOG_LINE@json.output@  {@@@",
       "@@@STEP_LOG_LINE@json.output@    \"_number\": \"91827\", @@@",
-      "@@@STEP_LOG_LINE@json.output@    \"branch\": \"master\", @@@",
+      "@@@STEP_LOG_LINE@json.output@    \"branch\": \"main\", @@@",
       "@@@STEP_LOG_LINE@json.output@    \"change_id\": \"Ideadbeef\", @@@",
       "@@@STEP_LOG_LINE@json.output@    \"created\": \"2017-01-30 13:11:20.000000000\", @@@",
       "@@@STEP_LOG_LINE@json.output@    \"has_review_started\": false, @@@",

+ 2 - 2
recipes/recipes.py

@@ -19,7 +19,7 @@
 ** DO NOT MODIFY **
 *******************
 
-This is a copy of https://chromium.googlesource.com/infra/luci/recipes-py/+/master/recipes.py.
+This is a copy of https://chromium.googlesource.com/infra/luci/recipes-py/+/HEAD/recipes.py.
 To fix bugs, fix in the googlesource repo then run the autoroller.
 """
 
@@ -40,7 +40,7 @@ from collections import namedtuple
 # url (str) - the url to the engine repo we want to use.
 # revision (str) - the git revision for the engine to get.
 # branch (str) - the branch to fetch for the engine as an absolute ref (e.g.
-#   refs/heads/master)
+#   refs/heads/main)
 EngineDep = namedtuple('EngineDep', 'url revision branch')
 
 

+ 6 - 6
roll_dep.py

@@ -6,7 +6,7 @@
 """Rolls DEPS controlled dependency.
 
 Works only with git checkout and git dependencies.  Currently this
-script will always roll to the tip of to origin/master.
+script will always roll to the tip of to origin/main or origin/master.
 """
 
 from __future__ import print_function
@@ -32,11 +32,11 @@ _ROLL_SUBJECT = re.compile(
     # Subject
     r'('
       # Generated by
-      # https://skia.googlesource.com/buildbot/+/master/autoroll/go/repo_manager/deps_repo_manager.go
+      # https://skia.googlesource.com/buildbot/+/HEAdA/autoroll/go/repo_manager/deps_repo_manager.go
       r'Roll [^ ]+ [a-f0-9]+\.\.[a-f0-9]+ \(\d+ commits\)'
       r'|'
       # Generated by
-      # https://chromium.googlesource.com/infra/infra/+/master/recipes/recipe_modules/recipe_autoroller/api.py
+      # https://chromium.googlesource.com/infra/infra/+/HEAD/recipes/recipe_modules/recipe_autoroller/api.py
       r'Roll recipe dependencies \(trivial\)\.'
     r')$')
 
@@ -89,16 +89,16 @@ def is_pristine(root):
 
   raise Error('Couldn\'t find any of origin/main or origin/master')
 
-def get_log_url(upstream_url, head, master):
+def get_log_url(upstream_url, head, tot):
   """Returns an URL to read logs via a Web UI if applicable."""
   if re.match(r'https://[^/]*\.googlesource\.com/', upstream_url):
     # gitiles
-    return '%s/+log/%s..%s' % (upstream_url, head[:12], master[:12])
+    return '%s/+log/%s..%s' % (upstream_url, head[:12], tot[:12])
   if upstream_url.startswith('https://github.com/'):
     upstream_url = upstream_url.rstrip('/')
     if upstream_url.endswith('.git'):
       upstream_url = upstream_url[:-len('.git')]
-    return '%s/compare/%s...%s' % (upstream_url, head[:12], master[:12])
+    return '%s/compare/%s...%s' % (upstream_url, head[:12], tot[:12])
   return None
 
 

+ 3 - 3
scm.py

@@ -187,7 +187,7 @@ class GIT(object):
 
   @staticmethod
   def GetBranchRef(cwd):
-    """Returns the full branch reference, e.g. 'refs/heads/master'."""
+    """Returns the full branch reference, e.g. 'refs/heads/main'."""
     try:
       return GIT.Capture(['symbolic-ref', 'HEAD'], cwd=cwd)
     except subprocess2.CalledProcessError:
@@ -195,7 +195,7 @@ class GIT(object):
 
   @staticmethod
   def GetBranch(cwd):
-    """Returns the short branch name, e.g. 'master'."""
+    """Returns the short branch name, e.g. 'main'."""
     branchref = GIT.GetBranchRef(cwd)
     if branchref:
       return GIT.ShortBranchName(branchref)
@@ -208,7 +208,7 @@ class GIT(object):
   @staticmethod
   def FetchUpstreamTuple(cwd, branch=None):
     """Returns a tuple containing remote and remote ref,
-       e.g. 'origin', 'refs/heads/master'
+       e.g. 'origin', 'refs/heads/main'
     """
     try:
       branch = branch or GIT.GetBranch(cwd)

+ 2 - 2
tests/bot_update_coverage_test.py

@@ -174,7 +174,7 @@ class BotUpdateUnittests(unittest.TestCase):
     setattr(bot_update, 'git', fake_git)
 
     self.old_os_cwd = os.getcwd
-    setattr(os, 'getcwd', lambda: '/b/build/slave/foo/build')
+    setattr(os, 'getcwd', lambda: '/b/build/foo/build')
 
     setattr(bot_update, 'open', self.filesystem.open)
     self.old_codecs_open = codecs.open
@@ -272,7 +272,7 @@ class BotUpdateUnittests(unittest.TestCase):
 
   def testGitCheckoutBreaksLocks(self):
     self.overrideSetupForWindows()
-    path = '/b/build/slave/foo/build/.git'
+    path = '/b/build/foo/build/.git'
     lockfile = 'index.lock'
     removed = []
     old_os_walk = os.walk

+ 1 - 1
weekly

@@ -21,7 +21,7 @@ def show_log(path, authors, since='1 week ago'):
 
   author_option = ' '.join(['--author=' + author for author in authors])
   command = ' '.join(['git log', author_option, '--since="%s"' % since,
-                      'origin/master', '| git shortlog'])
+                      'origin/HEAD', '| git shortlog'])
   status = subprocess.Popen(['sh', '-c', command],
                             cwd=path,
                             stdout=subprocess.PIPE).communicate()[0].rstrip()

+ 2 - 2
win_toolchain/get_toolchain_if_necessary.py

@@ -526,11 +526,11 @@ def main():
         RequestGsAuthentication()
     if not should_use_file and not should_use_gs and not should_use_http:
       if sys.platform not in ('win32', 'cygwin'):
-        doc = 'https://chromium.googlesource.com/chromium/src/+/master/docs/' \
+        doc = 'https://chromium.googlesource.com/chromium/src/+/HEAD/docs/' \
               'win_cross.md'
         print('\n\n\nPlease follow the instructions at %s\n\n' % doc)
       else:
-        doc = 'https://chromium.googlesource.com/chromium/src/+/master/docs/' \
+        doc = 'https://chromium.googlesource.com/chromium/src/+/HEAD/docs/' \
               'windows_build_instructions.md'
         print('\n\n\nNo downloadable toolchain found. In order to use your '
               'locally installed version of Visual Studio to build Chrome '