aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJordan Bayles <jophba@chromium.org>2021-04-14 11:39:18 -0700
committerCommit Bot <commit-bot@chromium.org>2021-04-14 19:44:21 +0000
commitc49eea6ccaf616d171f77275eaeb53f277f8c571 (patch)
treeb8520c81748c13edf28d1d858d1adc8128c87ca0
parenta912f7b0d0e9fca88b1bae683f742da404c8cd47 (diff)
downloadopenscreen-c49eea6ccaf616d171f77275eaeb53f277f8c571.tar.gz
Change Chrome primary branch refs to "main"
Now that Chrome has the new "main" primary branch that can be used instead of the legacy branch name, this patch updates all to referencing the main branch where applicable. Other projects, such as Fuchsia, Google Test, and Open Screen itself have not completed migration and thus are left unchanged for now. Bug: b/172242670 Change-Id: I320652888e7b86208b4b5f0bb90746a23fdb8977 Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2823918 Commit-Queue: Jordan Bayles <jophba@chromium.org> Reviewed-by: Takumi Fujimoto <takumif@chromium.org>
-rw-r--r--DEPS2
-rw-r--r--README.md17
-rw-r--r--docs/advanced_gerrit.md56
-rw-r--r--docs/style_guide.md4
-rw-r--r--test/test_main.cc5
-rwxr-xr-xtools/download-clang-update-script.py4
6 files changed, 27 insertions, 61 deletions
diff --git a/DEPS b/DEPS
index 9c0499ea..c44f3e81 100644
--- a/DEPS
+++ b/DEPS
@@ -36,6 +36,8 @@ deps = {
# of the commits to the buildtools directory in the Chromium repository. This
# should be regularly updated with the tip of the MIRRORED master branch,
# found here:
+ # TODO(issuetracker.google.com/172242670): update to "main" when buildtools
+ # has a main branch stood up.
# https://chromium.googlesource.com/chromium/src/buildtools/+/refs/heads/master.
'buildtools': {
'url': Var('chromium_git')+ '/chromium/src/buildtools' +
diff --git a/README.md b/README.md
index 6e3c999b..32db40b0 100644
--- a/README.md
+++ b/README.md
@@ -21,8 +21,8 @@ To get gclient, run the following command in your terminal:
Then add the `depot_tools` folder to your `PATH` environment variable.
Note that openscreen does not use other features of `depot_tools` like `repo` or
-`drover`. However, some `git-cl` functions *do* work, like `git cl try`, `git cl
-lint` and `git cl upload.`
+`drover`. However, some `git-cl` functions *do* work, like `git cl try`,
+`git cl format`, `git cl lint`, and `git cl upload.`
## Checking out code
@@ -44,7 +44,7 @@ and at their appropriate revisions.
## Syncing your local checkout
-To update your local checkout from the openscreen master repository, just run
+To update your local checkout from the openscreen reference repository, just run
```bash
cd ~/my_project_dir/openscreen
@@ -205,8 +205,10 @@ target.
# Continuous build and try jobs
-openscreen uses [LUCI builders](https://ci.chromium.org/p/openscreen/builders)
-to monitor the build and test health of the library. Current builders include:
+Open Screen uses [LUCI builders](https://ci.chromium.org/p/openscreen/builders)
+to monitor the build and test health of the library.
+
+Current builders include:
| Name | Arch | OS | Toolchain | Build | Notes |
|------------------------|--------|--------------------|-----------|---------|------------------------|
@@ -217,6 +219,7 @@ to monitor the build and test health of the library. Current builders include:
| chromium_linux64_debug | x86-64 | Ubuntu Linux 16.04 | clang | debug | built within chromium |
| chromium_mac_debug | x86-64 | Mac OS X/Xcode | clang | debug | built within chromium |
| linux64_coverage_debug | x86-64 | Ubuntu Linux 16.04 | clang | debug | used for code coverage |
+<br />
You can run a patch through the try job queue (which tests it on all
non-chromium builders) using `git cl try`, or through Gerrit (details below).
@@ -226,10 +229,10 @@ experimental trybots and continuous-integration FYI bots.
# Submitting changes
-openscreen library code should follow the [Open Screen Library Style
+Open Screen library code should follow the [Open Screen Library Style
Guide](docs/style_guide.md).
-openscreen uses [Chromium Gerrit](https://chromium-review.googlesource.com/) for
+This library uses [Chromium Gerrit](https://chromium-review.googlesource.com/) for
patch management and code review (for better or worse).
The following sections contain some tips about dealing with Gerrit for code
diff --git a/docs/advanced_gerrit.md b/docs/advanced_gerrit.md
index 790ee359..7b14d922 100644
--- a/docs/advanced_gerrit.md
+++ b/docs/advanced_gerrit.md
@@ -26,58 +26,18 @@ following command:
chmod a+x .git/hooks/commit-msg
```
-### Uploading a new patch for review
+### Uploading a new patch for review
-You should run `PRESUBMIT.sh` in the root of the repository before pushing for
+You should run `git cl presubmit --upload` in the root of the repository before pushing for
review (which primarily checks formatting).
-There is official [Gerrit
-documentation](https://gerrit-documentation.storage.googleapis.com/Documentation/2.14.7/user-upload.html#push_create)
-for this which essentially amounts to:
+After verifying that presubmission works correctly, you can then execute:
+`git cl upload`, which will prompt you to verify the commit message and check
+for owners.
-``` bash
- git push origin HEAD:refs/for/master
-```
-
-Gerrit keeps track of changes using a [Change-Id
-line](https://gerrit-documentation.storage.googleapis.com/Documentation/2.14.7/user-changeid.html)
-in each commit.
-
-When there is no `Change-Id` line, Gerrit creates a new `Change-Id` for the
-commit, and therefore a new change. Gerrit's documentation for
-[replacing a change](https://gerrit-documentation.storage.googleapis.com/Documentation/2.14.7/user-upload.html#push_replace)
-describes this. So if you want to upload a new patchset to an existing review,
-it should contain the matching `Change-Id` line in the commit message.
-
-### Adding a new patchset to an existing change
-
-By default, each commit to your local branch will get its own Gerrit change when
-pushed, unless it has a `Change-Id` corresponding to an existing review.
-
-If you need to modify commits on your local branch to ensure they have the
-correct `Change-Id`, you can do one of two things:
-
-After committing to the local branch, run:
-
-```bash
- git commit --amend
- git show
-```
-
-to attach the current `Change-Id` to the most recent commit. Check that the
-correct one was inserted by comparing it with the one shown on
-`chromium-review.googlesource.com` for the existing review.
-
-If you have made multiple local commits, you can squash them all into a single
-commit with the correct Change-Id:
-
-```bash
- git rebase -i HEAD~4
- git show
-```
-
-where '4' means that you want to squash three additional commits onto an
-existing commit that has been uploaded for review.
+The first time you upload an issue, the issue number is associated with the
+current branch. If you upload again, it uploads on the same issue (which is tied
+to the branch, not the commit). See the [git-cl](https://chromium.googlesource.com/chromium/tools/depot_tools.git/+/HEAD/README.git-cl.md) documentation for more information.
## Uploading a new dependent change
diff --git a/docs/style_guide.md b/docs/style_guide.md
index dfc6ab1a..2174411e 100644
--- a/docs/style_guide.md
+++ b/docs/style_guide.md
@@ -1,6 +1,6 @@
# Open Screen Library Style Guide
-The Open Screen Library follows the [Chromium C++ coding style](https://chromium.googlesource.com/chromium/src/+/master/styleguide/c++/c++.md)
+The Open Screen Library follows the [Chromium C++ coding style](https://chromium.googlesource.com/chromium/src/+/main/styleguide/c++/c++.md)
which, in turn, defers to the [Google C++ Style Guide](https://google.github.io/styleguide/cppguide.html).
We also follow the [Chromium C++ Do's and Don'ts](https://sites.google.com/a/chromium.org/dev/developers/coding-style/cpp-dos-and-donts).
@@ -188,4 +188,4 @@ not explicitly sprinkle "#if OSP_DCHECK_IS_ON()" guards all around any
functions, variables, etc. that will be unused in "DCHECK off" builds.
Use OSP_DCHECK and OSP_CHECK in accordance with the
-[Chromium guidance for DCHECK/CHECK](https://chromium.googlesource.com/chromium/src/+/master/styleguide/c++/c++.md#check_dcheck_and-notreached).
+[Chromium guidance for DCHECK/CHECK](https://chromium.googlesource.com/chromium/src/+/main/styleguide/c++/c++.md#check_dcheck_and-notreached).
diff --git a/test/test_main.cc b/test/test_main.cc
index 443278c7..b678ce9d 100644
--- a/test/test_main.cc
+++ b/test/test_main.cc
@@ -87,8 +87,9 @@ GlobalTestState InitFromArgs(int argc, char** argv) {
// Googletest strongly recommends that we roll our own main
// function if we want to do global test environment setup.
// See the below link for more info;
-// https://github.com/google/googletest/blob/master/googletest/docs/advanced.md#sharing-resources-between-tests-in-the-same-test-case
-//
+// https://github.com/google/googletest/blob/master/docs/advanced.md#sharing-resources-between-tests-in-the-same-test-suite
+// TODO(issuetracker.google.com/172242670): rename reference to "main"
+// once googletest has a "main" branch.
// This main method is a drop-in replacement for anywhere that currently
// depends on gtest_main, meaning it can be linked into any test-only binary
// to provide a main implementation that supports setting flags and other
diff --git a/tools/download-clang-update-script.py b/tools/download-clang-update-script.py
index f3534a10..b8b67a69 100755
--- a/tools/download-clang-update-script.py
+++ b/tools/download-clang-update-script.py
@@ -14,8 +14,8 @@ import argparse
import curlish
import sys
-SCRIPT_DOWNLOAD_URL = ('https://raw.githubusercontent.com/chromium/' +
- 'chromium/master/tools/clang/scripts/update.py')
+SCRIPT_DOWNLOAD_URL = ('https://raw.githubusercontent.com/chromium/'
+ 'chromium/main/tools/clang/scripts/update.py')
def main():