mirror of
https://gerrit.googlesource.com/git-repo
synced 2025-06-26 20:17:52 +00:00
Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
75c02fe4cb | |||
afd1b4023f |
2
repo
2
repo
@ -16,7 +16,7 @@ import os
|
|||||||
REPO_URL = os.environ.get('REPO_URL', None)
|
REPO_URL = os.environ.get('REPO_URL', None)
|
||||||
if not REPO_URL:
|
if not REPO_URL:
|
||||||
REPO_URL = 'https://gerrit.googlesource.com/git-repo'
|
REPO_URL = 'https://gerrit.googlesource.com/git-repo'
|
||||||
REPO_REV = 'stable'
|
REPO_REV = 'repo-1'
|
||||||
|
|
||||||
# Copyright (C) 2008 Google Inc.
|
# Copyright (C) 2008 Google Inc.
|
||||||
#
|
#
|
||||||
|
@ -50,7 +50,7 @@ use for this GITC client.
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
def _Options(self, p):
|
def _Options(self, p):
|
||||||
super(GitcInit, self)._Options(p)
|
super(GitcInit, self)._Options(p, gitc_init=True)
|
||||||
g = p.add_option_group('GITC options')
|
g = p.add_option_group('GITC options')
|
||||||
g.add_option('-f', '--manifest-file',
|
g.add_option('-f', '--manifest-file',
|
||||||
dest='manifest_file',
|
dest='manifest_file',
|
||||||
|
@ -81,7 +81,7 @@ manifest, a subsequent `repo sync` (or `repo sync -d`) is necessary
|
|||||||
to update the working directory files.
|
to update the working directory files.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def _Options(self, p):
|
def _Options(self, p, gitc_init=False):
|
||||||
# Logging
|
# Logging
|
||||||
g = p.add_option_group('Logging options')
|
g = p.add_option_group('Logging options')
|
||||||
g.add_option('-q', '--quiet',
|
g.add_option('-q', '--quiet',
|
||||||
@ -96,7 +96,12 @@ to update the working directory files.
|
|||||||
g.add_option('-b', '--manifest-branch',
|
g.add_option('-b', '--manifest-branch',
|
||||||
dest='manifest_branch',
|
dest='manifest_branch',
|
||||||
help='manifest branch or revision', metavar='REVISION')
|
help='manifest branch or revision', metavar='REVISION')
|
||||||
g.add_option('-c', '--current-branch',
|
cbr_opts = ['--current-branch']
|
||||||
|
# The gitc-init subcommand allocates -c itself, but a lot of init users
|
||||||
|
# want -c, so try to satisfy both as best we can.
|
||||||
|
if gitc_init:
|
||||||
|
cbr_opts += ['-c']
|
||||||
|
g.add_option(*cbr_opts,
|
||||||
dest='current_branch_only', action='store_true',
|
dest='current_branch_only', action='store_true',
|
||||||
help='fetch only current manifest branch from server')
|
help='fetch only current manifest branch from server')
|
||||||
g.add_option('-m', '--manifest-name',
|
g.add_option('-m', '--manifest-name',
|
||||||
|
Reference in New Issue
Block a user