mirror of
https://gerrit.googlesource.com/git-repo
synced 2025-06-19 12:34:17 +00:00
GITC: Pull GITC Manifest Dir from the config.
Updates the repo launcher and gitc_utils to pull the manifest directory location out of the gitc config file. Change-Id: Id08381b8a7d61962093d5cddcb3ff6afbb13004b
This commit is contained in:
committed by
Dan Willemsen
parent
f7a51898d3
commit
8ce5041596
@ -59,10 +59,10 @@ use for this GITC client.
|
||||
if not opt.gitc_client:
|
||||
print('fatal: gitc client (-c) is required', file=sys.stderr)
|
||||
sys.exit(1)
|
||||
self.client_dir = os.path.join(gitc_utils.GITC_MANIFEST_DIR,
|
||||
self.client_dir = os.path.join(gitc_utils.get_gitc_manifest_dir(),
|
||||
opt.gitc_client)
|
||||
if not os.path.exists(gitc_utils.GITC_MANIFEST_DIR):
|
||||
os.makedirs(gitc_utils.GITC_MANIFEST_DIR)
|
||||
if not os.path.exists(gitc_utils.get_gitc_manifest_dir()):
|
||||
os.makedirs(gitc_utils.get_gitc_manifest_dir())
|
||||
if not os.path.exists(self.client_dir):
|
||||
os.mkdir(self.client_dir)
|
||||
super(GitcInit, self).Execute(opt, args)
|
||||
|
@ -194,9 +194,6 @@ later is required to fix a server side protocol bug.
|
||||
help="overwrite an existing git directory if it needs to "
|
||||
"point to a different object directory. WARNING: this "
|
||||
"may cause loss of data")
|
||||
p.add_option('--force-gitc',
|
||||
dest='force_gitc', action='store_true',
|
||||
help="actually sync sources in the gitc client directory.")
|
||||
p.add_option('-l', '--local-only',
|
||||
dest='local_only', action='store_true',
|
||||
help="only update working tree, don't fetch")
|
||||
@ -539,16 +536,6 @@ later is required to fix a server side protocol bug.
|
||||
print('error: both -u and -p must be given', file=sys.stderr)
|
||||
sys.exit(1)
|
||||
|
||||
cwd = os.getcwd()
|
||||
if cwd.startswith(gitc_utils.GITC_MANIFEST_DIR) and not opt.force_gitc:
|
||||
print('WARNING this will pull all the sources like a normal repo sync.\n'
|
||||
'\nIf you want to update your GITC Client View please rerun this '
|
||||
'command in \n%s%s.\nOr if you actually want to pull the sources, '
|
||||
'rerun with --force-gitc.' %
|
||||
(gitc_utils.GITC_FS_ROOT_DIR,
|
||||
cwd.split(gitc_utils.GITC_MANIFEST_DIR)[1]))
|
||||
sys.exit(1)
|
||||
|
||||
if opt.manifest_name:
|
||||
self.manifest.Override(opt.manifest_name)
|
||||
|
||||
|
Reference in New Issue
Block a user