summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Frysinger <vapier@google.com>2020-03-14 14:35:26 -0400
committerDavid Pursehouse <dpursehouse@collab.net>2020-03-18 00:24:43 +0000
commit58ac1678e8438fd029a22365741fc57276eda404 (patch)
treeddadc39f70fa728e5cf75f2220716da42cef4d55
parente1111f5710acf16d91975a9ee5e2c9464730becf (diff)
downloadgit-repo-58ac1678e8438fd029a22365741fc57276eda404.tar.gz
init: rename --repo-branch to --repo-rev
We refer to this as "revision" in help text, and in REPO_REV envvar, so rename to --repo-rev to be consistent. We keep --repo-branch for backwards compatibility, but as a hidden option. Bug: https://crbug.com/gerrit/11045 Change-Id: I1ecc282fba32917ed78a63850360c08469db849a Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/259352 Tested-by: Mike Frysinger <vapier@google.com> Reviewed-by: David Pursehouse <dpursehouse@collab.net>
-rw-r--r--docs/internal-fs-layout.md2
-rw-r--r--docs/release-process.md6
-rwxr-xr-xrepo6
-rw-r--r--subcmds/init.py7
-rw-r--r--subcmds/sync.py2
5 files changed, 13 insertions, 10 deletions
diff --git a/docs/internal-fs-layout.md b/docs/internal-fs-layout.md
index b06e898f..5e8690b8 100644
--- a/docs/internal-fs-layout.md
+++ b/docs/internal-fs-layout.md
@@ -34,7 +34,7 @@ For example, if you want to change the manifest branch, you can simply run
34 34
35 It tracks the git repository at `REPO_URL` using the `REPO_REV` branch. 35 It tracks the git repository at `REPO_URL` using the `REPO_REV` branch.
36 Those are specified at `repo init` time using the `--repo-url=<REPO_URL>` 36 Those are specified at `repo init` time using the `--repo-url=<REPO_URL>`
37 and `--repo-branch=<REPO_REV>` options. 37 and `--repo-rev=<REPO_REV>` options.
38 38
39 Any changes made to this directory will usually be automatically discarded 39 Any changes made to this directory will usually be automatically discarded
40 by repo itself when it checks for updates. If you want to update to the 40 by repo itself when it checks for updates. If you want to update to the
diff --git a/docs/release-process.md b/docs/release-process.md
index 121c3bf1..93a0f3e0 100644
--- a/docs/release-process.md
+++ b/docs/release-process.md
@@ -49,11 +49,11 @@ control how repo finds updates:
49 49
50* `--repo-url`: This tells repo where to clone the full repo project itself. 50* `--repo-url`: This tells repo where to clone the full repo project itself.
51 It defaults to the official project (`REPO_URL` in the launcher script). 51 It defaults to the official project (`REPO_URL` in the launcher script).
52* `--repo-branch`: This tells repo which branch to use for the full project. 52* `--repo-rev`: This tells repo which branch to use for the full project.
53 It defaults to the `stable` branch (`REPO_REV` in the launcher script). 53 It defaults to the `stable` branch (`REPO_REV` in the launcher script).
54 54
55Whenever `repo sync` is run, repo will check to see if an update is available. 55Whenever `repo sync` is run, repo will check to see if an update is available.
56It fetches the latest repo-branch from the repo-url. 56It fetches the latest repo-rev from the repo-url.
57Then it verifies that the latest commit in the branch has a valid signed tag 57Then it verifies that the latest commit in the branch has a valid signed tag
58using `git tag -v` (which uses gpg). 58using `git tag -v` (which uses gpg).
59If the tag is valid, then repo will update its internal checkout to it. 59If the tag is valid, then repo will update its internal checkout to it.
@@ -91,7 +91,7 @@ When you want to create a new release, you'll need to select a good version and
91create a signed tag using a key registered in repo itself. 91create a signed tag using a key registered in repo itself.
92Typically we just tag the latest version of the `master` branch. 92Typically we just tag the latest version of the `master` branch.
93The tag could be pushed now, but it won't be used by clients normally (since the 93The tag could be pushed now, but it won't be used by clients normally (since the
94default `repo-branch` setting is `stable`). 94default `repo-rev` setting is `stable`).
95This would allow some early testing on systems who explicitly select `master`. 95This would allow some early testing on systems who explicitly select `master`.
96 96
97### Creating a signed tag 97### Creating a signed tag
diff --git a/repo b/repo
index c6a56c65..6670c0d3 100755
--- a/repo
+++ b/repo
@@ -328,8 +328,10 @@ def GetParser(gitc_init=False):
328 group = parser.add_option_group('repo Version options') 328 group = parser.add_option_group('repo Version options')
329 group.add_option('--repo-url', metavar='URL', 329 group.add_option('--repo-url', metavar='URL',
330 help='repo repository location ($REPO_URL)') 330 help='repo repository location ($REPO_URL)')
331 group.add_option('--repo-branch', metavar='REVISION', 331 group.add_option('--repo-rev', metavar='REV',
332 help='repo branch or revision ($REPO_REV)') 332 help='repo branch or revision ($REPO_REV)')
333 group.add_option('--repo-branch', dest='repo_rev',
334 help=optparse.SUPPRESS_HELP)
333 group.add_option('--no-repo-verify', 335 group.add_option('--no-repo-verify',
334 dest='repo_verify', default=True, action='store_false', 336 dest='repo_verify', default=True, action='store_false',
335 help='do not verify repo source code') 337 help='do not verify repo source code')
@@ -473,7 +475,7 @@ def _Init(args, gitc_init=False):
473 opt.verbose = opt.output_mode is True 475 opt.verbose = opt.output_mode is True
474 476
475 url = opt.repo_url or REPO_URL 477 url = opt.repo_url or REPO_URL
476 branch = opt.repo_branch or REPO_REV 478 branch = opt.repo_rev or REPO_REV
477 479
478 if branch.startswith('refs/heads/'): 480 if branch.startswith('refs/heads/'):
479 branch = branch[len('refs/heads/'):] 481 branch = branch[len('refs/heads/'):]
diff --git a/subcmds/init.py b/subcmds/init.py
index 94bd44ca..431165d4 100644
--- a/subcmds/init.py
+++ b/subcmds/init.py
@@ -166,9 +166,10 @@ to update the working directory files.
166 g.add_option('--repo-url', 166 g.add_option('--repo-url',
167 dest='repo_url', 167 dest='repo_url',
168 help='repo repository location', metavar='URL') 168 help='repo repository location', metavar='URL')
169 g.add_option('--repo-branch', 169 g.add_option('--repo-rev', metavar='REV',
170 dest='repo_branch', 170 help='repo branch or revision')
171 help='repo branch or revision', metavar='REVISION') 171 g.add_option('--repo-branch', dest='repo_rev',
172 help=optparse.SUPPRESS_HELP)
172 g.add_option('--no-repo-verify', 173 g.add_option('--no-repo-verify',
173 dest='repo_verify', default=True, action='store_false', 174 dest='repo_verify', default=True, action='store_false',
174 help='do not verify repo source code') 175 help='do not verify repo source code')
diff --git a/subcmds/sync.py b/subcmds/sync.py
index dadf2e45..de6deecb 100644
--- a/subcmds/sync.py
+++ b/subcmds/sync.py
@@ -850,7 +850,7 @@ later is required to fix a server side protocol bug.
850 base = rp.GetBranch(cb).merge 850 base = rp.GetBranch(cb).merge
851 if not base or not base.startswith('refs/heads/'): 851 if not base or not base.startswith('refs/heads/'):
852 print('warning: repo is not tracking a remote branch, so it will not ' 852 print('warning: repo is not tracking a remote branch, so it will not '
853 'receive updates; run `repo init --repo-branch=stable` to fix.', 853 'receive updates; run `repo init --repo-rev=stable` to fix.',
854 file=sys.stderr) 854 file=sys.stderr)
855 855
856 mp = self.manifest.manifestProject 856 mp = self.manifest.manifestProject