diff options
author | Jason Chang <jasonnc@google.com> | 2023-05-26 12:44:50 -0700 |
---|---|---|
committer | LUCI <gerrit-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2023-08-15 22:14:52 +0000 |
commit | 8914b1f86db3903e507b26979f6f137907ea3398 (patch) | |
tree | 6ee19bd7e0f81cccc681729b309a14486787969f /subcmds/gitc_delete.py | |
parent | 082487dcd135463313d772cff19b685ea8623793 (diff) | |
download | git-repo-8914b1f86db3903e507b26979f6f137907ea3398.tar.gz |
gitc: drop support
Bug: b/282775958
Change-Id: Ib6383d6fd82a017d0a6670d6558a905d41be321f
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/375314
Reviewed-by: Mike Frysinger <vapier@google.com>
Tested-by: Jason Chang <jasonnc@google.com>
Commit-Queue: Jason Chang <jasonnc@google.com>
Diffstat (limited to 'subcmds/gitc_delete.py')
-rw-r--r-- | subcmds/gitc_delete.py | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/subcmds/gitc_delete.py b/subcmds/gitc_delete.py deleted file mode 100644 index ae9d4d1f..00000000 --- a/subcmds/gitc_delete.py +++ /dev/null | |||
@@ -1,52 +0,0 @@ | |||
1 | # Copyright (C) 2015 The Android Open Source Project | ||
2 | # | ||
3 | # Licensed under the Apache License, Version 2.0 (the "License"); | ||
4 | # you may not use this file except in compliance with the License. | ||
5 | # You may obtain a copy of the License at | ||
6 | # | ||
7 | # http://www.apache.org/licenses/LICENSE-2.0 | ||
8 | # | ||
9 | # Unless required by applicable law or agreed to in writing, software | ||
10 | # distributed under the License is distributed on an "AS IS" BASIS, | ||
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
12 | # See the License for the specific language governing permissions and | ||
13 | # limitations under the License. | ||
14 | |||
15 | import sys | ||
16 | |||
17 | from command import Command, GitcClientCommand | ||
18 | import platform_utils | ||
19 | |||
20 | |||
21 | class GitcDelete(Command, GitcClientCommand): | ||
22 | COMMON = True | ||
23 | visible_everywhere = False | ||
24 | helpSummary = "Delete a GITC Client." | ||
25 | helpUsage = """ | ||
26 | %prog | ||
27 | """ | ||
28 | helpDescription = """ | ||
29 | This subcommand deletes the current GITC client, deleting the GITC manifest | ||
30 | and all locally downloaded sources. | ||
31 | """ | ||
32 | |||
33 | def _Options(self, p): | ||
34 | p.add_option( | ||
35 | "-f", | ||
36 | "--force", | ||
37 | dest="force", | ||
38 | action="store_true", | ||
39 | help="force the deletion (no prompt)", | ||
40 | ) | ||
41 | |||
42 | def Execute(self, opt, args): | ||
43 | if not opt.force: | ||
44 | prompt = ( | ||
45 | "This will delete GITC client: %s\nAre you sure? (yes/no) " | ||
46 | % self.gitc_manifest.gitc_client_name | ||
47 | ) | ||
48 | response = input(prompt).lower() | ||
49 | if not response == "yes": | ||
50 | print('Response was not "yes"\n Exiting...') | ||
51 | sys.exit(1) | ||
52 | platform_utils.rmtree(self.gitc_manifest.gitc_client_dir) | ||