summaryrefslogtreecommitdiffstats
path: root/subcmds
diff options
context:
space:
mode:
Diffstat (limited to 'subcmds')
-rw-r--r--subcmds/gitc_init.py6
-rw-r--r--subcmds/sync.py13
2 files changed, 3 insertions, 16 deletions
diff --git a/subcmds/gitc_init.py b/subcmds/gitc_init.py
index 92b34f72..c0568caa 100644
--- a/subcmds/gitc_init.py
+++ b/subcmds/gitc_init.py
@@ -59,10 +59,10 @@ use for this GITC client.
59 if not opt.gitc_client: 59 if not opt.gitc_client:
60 print('fatal: gitc client (-c) is required', file=sys.stderr) 60 print('fatal: gitc client (-c) is required', file=sys.stderr)
61 sys.exit(1) 61 sys.exit(1)
62 self.client_dir = os.path.join(gitc_utils.GITC_MANIFEST_DIR, 62 self.client_dir = os.path.join(gitc_utils.get_gitc_manifest_dir(),
63 opt.gitc_client) 63 opt.gitc_client)
64 if not os.path.exists(gitc_utils.GITC_MANIFEST_DIR): 64 if not os.path.exists(gitc_utils.get_gitc_manifest_dir()):
65 os.makedirs(gitc_utils.GITC_MANIFEST_DIR) 65 os.makedirs(gitc_utils.get_gitc_manifest_dir())
66 if not os.path.exists(self.client_dir): 66 if not os.path.exists(self.client_dir):
67 os.mkdir(self.client_dir) 67 os.mkdir(self.client_dir)
68 super(GitcInit, self).Execute(opt, args) 68 super(GitcInit, self).Execute(opt, args)
diff --git a/subcmds/sync.py b/subcmds/sync.py
index 934aaa80..2e9bbe70 100644
--- a/subcmds/sync.py
+++ b/subcmds/sync.py
@@ -194,9 +194,6 @@ later is required to fix a server side protocol bug.
194 help="overwrite an existing git directory if it needs to " 194 help="overwrite an existing git directory if it needs to "
195 "point to a different object directory. WARNING: this " 195 "point to a different object directory. WARNING: this "
196 "may cause loss of data") 196 "may cause loss of data")
197 p.add_option('--force-gitc',
198 dest='force_gitc', action='store_true',
199 help="actually sync sources in the gitc client directory.")
200 p.add_option('-l', '--local-only', 197 p.add_option('-l', '--local-only',
201 dest='local_only', action='store_true', 198 dest='local_only', action='store_true',
202 help="only update working tree, don't fetch") 199 help="only update working tree, don't fetch")
@@ -539,16 +536,6 @@ later is required to fix a server side protocol bug.
539 print('error: both -u and -p must be given', file=sys.stderr) 536 print('error: both -u and -p must be given', file=sys.stderr)
540 sys.exit(1) 537 sys.exit(1)
541 538
542 cwd = os.getcwd()
543 if cwd.startswith(gitc_utils.GITC_MANIFEST_DIR) and not opt.force_gitc:
544 print('WARNING this will pull all the sources like a normal repo sync.\n'
545 '\nIf you want to update your GITC Client View please rerun this '
546 'command in \n%s%s.\nOr if you actually want to pull the sources, '
547 'rerun with --force-gitc.' %
548 (gitc_utils.GITC_FS_ROOT_DIR,
549 cwd.split(gitc_utils.GITC_MANIFEST_DIR)[1]))
550 sys.exit(1)
551
552 if opt.manifest_name: 539 if opt.manifest_name:
553 self.manifest.Override(opt.manifest_name) 540 self.manifest.Override(opt.manifest_name)
554 541