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 It tracks the git repository at `REPO_URL` using the `REPO_REV` branch. Those are specified at `repo init` time using the `--repo-url=` - and `--repo-branch=` options. + and `--repo-rev=` options. Any changes made to this directory will usually be automatically discarded 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: * `--repo-url`: This tells repo where to clone the full repo project itself. It defaults to the official project (`REPO_URL` in the launcher script). -* `--repo-branch`: This tells repo which branch to use for the full project. +* `--repo-rev`: This tells repo which branch to use for the full project. It defaults to the `stable` branch (`REPO_REV` in the launcher script). Whenever `repo sync` is run, repo will check to see if an update is available. -It fetches the latest repo-branch from the repo-url. +It fetches the latest repo-rev from the repo-url. Then it verifies that the latest commit in the branch has a valid signed tag using `git tag -v` (which uses gpg). If 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 create a signed tag using a key registered in repo itself. Typically we just tag the latest version of the `master` branch. The tag could be pushed now, but it won't be used by clients normally (since the -default `repo-branch` setting is `stable`). +default `repo-rev` setting is `stable`). This would allow some early testing on systems who explicitly select `master`. ### 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): group = parser.add_option_group('repo Version options') group.add_option('--repo-url', metavar='URL', help='repo repository location ($REPO_URL)') - group.add_option('--repo-branch', metavar='REVISION', + group.add_option('--repo-rev', metavar='REV', help='repo branch or revision ($REPO_REV)') + group.add_option('--repo-branch', dest='repo_rev', + help=optparse.SUPPRESS_HELP) group.add_option('--no-repo-verify', dest='repo_verify', default=True, action='store_false', help='do not verify repo source code') @@ -473,7 +475,7 @@ def _Init(args, gitc_init=False): opt.verbose = opt.output_mode is True url = opt.repo_url or REPO_URL - branch = opt.repo_branch or REPO_REV + branch = opt.repo_rev or REPO_REV if branch.startswith('refs/heads/'): 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. g.add_option('--repo-url', dest='repo_url', help='repo repository location', metavar='URL') - g.add_option('--repo-branch', - dest='repo_branch', - help='repo branch or revision', metavar='REVISION') + g.add_option('--repo-rev', metavar='REV', + help='repo branch or revision') + g.add_option('--repo-branch', dest='repo_rev', + help=optparse.SUPPRESS_HELP) g.add_option('--no-repo-verify', dest='repo_verify', default=True, action='store_false', 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. base = rp.GetBranch(cb).merge if not base or not base.startswith('refs/heads/'): print('warning: repo is not tracking a remote branch, so it will not ' - 'receive updates; run `repo init --repo-branch=stable` to fix.', + 'receive updates; run `repo init --repo-rev=stable` to fix.', file=sys.stderr) mp = self.manifest.manifestProject