unknown-cli 0.9.27__tar.gz → 0.9.29__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {unknown-cli-0.9.27 → unknown-cli-0.9.29}/PKG-INFO +1 -1
- {unknown-cli-0.9.27 → unknown-cli-0.9.29}/unknown_cli.egg-info/PKG-INFO +1 -1
- unknown-cli-0.9.29/unknowncli/VERSION +1 -0
- {unknown-cli-0.9.27 → unknown-cli-0.9.29}/unknowncli/__main__.py +10 -7
- {unknown-cli-0.9.27 → unknown-cli-0.9.29}/unknowncli/commands/preflight.py +14 -7
- unknown-cli-0.9.27/unknowncli/VERSION +0 -1
- {unknown-cli-0.9.27 → unknown-cli-0.9.29}/README.md +0 -0
- {unknown-cli-0.9.27 → unknown-cli-0.9.29}/setup.cfg +0 -0
- {unknown-cli-0.9.27 → unknown-cli-0.9.29}/setup.py +0 -0
- {unknown-cli-0.9.27 → unknown-cli-0.9.29}/unknown_cli.egg-info/SOURCES.txt +0 -0
- {unknown-cli-0.9.27 → unknown-cli-0.9.29}/unknown_cli.egg-info/dependency_links.txt +0 -0
- {unknown-cli-0.9.27 → unknown-cli-0.9.29}/unknown_cli.egg-info/entry_points.txt +0 -0
- {unknown-cli-0.9.27 → unknown-cli-0.9.29}/unknown_cli.egg-info/requires.txt +0 -0
- {unknown-cli-0.9.27 → unknown-cli-0.9.29}/unknown_cli.egg-info/top_level.txt +0 -0
- {unknown-cli-0.9.27 → unknown-cli-0.9.29}/unknowncli/__init__.py +0 -0
- {unknown-cli-0.9.27 → unknown-cli-0.9.29}/unknowncli/commands/__init__.py +0 -0
- {unknown-cli-0.9.27 → unknown-cli-0.9.29}/unknowncli/commands/project.py +0 -0
- {unknown-cli-0.9.27 → unknown-cli-0.9.29}/unknowncli/commands/task.py +0 -0
- {unknown-cli-0.9.27 → unknown-cli-0.9.29}/unknowncli/commands/unreal.py +0 -0
- {unknown-cli-0.9.27 → unknown-cli-0.9.29}/unknowncli/data/.p4ignore.txt +0 -0
- {unknown-cli-0.9.27 → unknown-cli-0.9.29}/unknowncli/set_registry_keys.py +0 -0
- {unknown-cli-0.9.27 → unknown-cli-0.9.29}/unknowncli/set_url_handler.py +0 -0
- {unknown-cli-0.9.27 → unknown-cli-0.9.29}/unknowncli/utils.py +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0.9.29
|
|
@@ -4,32 +4,35 @@ import pathlib
|
|
|
4
4
|
import requests
|
|
5
5
|
from .utils import console_handler, abort, check_version, check_p4config, check_p4trust, set_url_handler
|
|
6
6
|
from pathlib import Path
|
|
7
|
+
from . import read_version
|
|
7
8
|
|
|
8
9
|
log = logging.getLogger(__name__)
|
|
9
10
|
help_string = """A utility for managing Unknown projects"""
|
|
11
|
+
help_string += f" (unknown-cli/{read_version()})\n"
|
|
10
12
|
|
|
11
13
|
base_path = pathlib.Path(os.path.dirname(__file__))
|
|
12
14
|
commands_folder = base_path / "commands"
|
|
13
15
|
|
|
14
16
|
from typer import Typer, Context, Argument, Option, echo, secho, confirm, prompt
|
|
15
17
|
|
|
18
|
+
help_string += """
|
|
19
|
+
This tool handles the initial setup of Perforce Projects and helps you work with task streams.
|
|
20
|
+
It creates workspaces for you according to naming conventions and sets up a virtual drive.
|
|
21
|
+
Please run the 'project setup' command to get started.
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
check_version()
|
|
16
25
|
app = Typer(add_completion=False)
|
|
17
26
|
|
|
18
|
-
@app.callback(context_settings={"allow_extra_args": True, "ignore_unknown_options": True})
|
|
27
|
+
@app.callback(context_settings={"allow_extra_args": True, "ignore_unknown_options": True}, no_args_is_help=True, help=help_string)
|
|
19
28
|
def cli(
|
|
20
29
|
ctx: Context,
|
|
21
30
|
#verbose: str = Option(None, "-v", "--verbose", help="Verbose logging: info or debug"),
|
|
22
31
|
#output: str = Option("text", "-o", "--output", help="Output text or json"),
|
|
23
32
|
):
|
|
24
|
-
"""
|
|
25
|
-
This tool handles the initial setup of Perforce Projects and helps you work with task streams.
|
|
26
|
-
It creates workspaces for you according to naming conventions and sets up a virtual drive.
|
|
27
|
-
Please run the 'project setup' command to get started.
|
|
28
|
-
"""
|
|
29
33
|
# by default we log out to console WARN and higher but can view info with -v
|
|
30
34
|
#if verbose:
|
|
31
35
|
# console_handler.setLevel(getattr(logging, verbose.upper()))
|
|
32
|
-
check_version()
|
|
33
36
|
set_url_handler()
|
|
34
37
|
check_p4config()
|
|
35
38
|
check_p4trust()
|
|
@@ -375,6 +375,13 @@ def print_change_obj_list(sorted_change_obj_list):
|
|
|
375
375
|
return
|
|
376
376
|
|
|
377
377
|
|
|
378
|
+
def check_for_forbidden_files(changelist):
|
|
379
|
+
describe_shelve = get_describe_shelve(changelist)[0]
|
|
380
|
+
for shelf_file in describe_shelve["depotFile"]:
|
|
381
|
+
if re.search("^\/\/[^\/]*\/[^\/]*\/Raw", shelf_file):
|
|
382
|
+
abort(f"Cannot preflight a CL containing Raw files.")
|
|
383
|
+
return
|
|
384
|
+
|
|
378
385
|
def verify_changelist(change_obj, change_obj_list):
|
|
379
386
|
if not change_obj:
|
|
380
387
|
abort("No changelist selected")
|
|
@@ -385,10 +392,6 @@ def verify_changelist(change_obj, change_obj_list):
|
|
|
385
392
|
abort(f"Selected changelist does not have any opened files: {changelist} ({client})")
|
|
386
393
|
if not any([c for c in change_obj_list if c.client == client and c.change == changelist]):
|
|
387
394
|
abort(f"Selected changelist not owned by current user: {changelist} ({client})")
|
|
388
|
-
describe_shelve = get_describe_shelve(changelist)[0]
|
|
389
|
-
for shelf_file in describe_shelve["depotFile"]:
|
|
390
|
-
if re.search("^\/\/[^\/]*\/[^\/]*\/Raw", shelf_file):
|
|
391
|
-
abort(f"Cannot preflight a CL containing Raw files.")
|
|
392
395
|
return
|
|
393
396
|
|
|
394
397
|
|
|
@@ -857,6 +860,8 @@ def main(
|
|
|
857
860
|
Preflight a changelist
|
|
858
861
|
"""
|
|
859
862
|
|
|
863
|
+
secho("Initializing, this may take a moment...\n", bold=True)
|
|
864
|
+
|
|
860
865
|
# Check for Tailscale connection
|
|
861
866
|
if not "Tailscale" in os.environ["PATH"] or not tailscale_is_connected():
|
|
862
867
|
abort("In order to preflight you must be connected to Tailscale.")
|
|
@@ -891,18 +896,20 @@ def main(
|
|
|
891
896
|
change_obj = sorted_change_obj_list[int(chosen_index)]
|
|
892
897
|
|
|
893
898
|
verify_changelist(change_obj, sorted_change_obj_list)
|
|
899
|
+
shelve_changelist = changelist
|
|
894
900
|
if get_opened_file_list(change_obj.change):
|
|
895
901
|
shelve_changelist = attempt_shelve_changelist(change_obj.change)
|
|
902
|
+
check_for_forbidden_files(shelve_changelist)
|
|
896
903
|
if use_server_submit and commit_on_success:
|
|
897
|
-
secho(f"Reverting files from CL {
|
|
898
|
-
revert_file_in_cl("//...",
|
|
904
|
+
secho(f"Reverting files from CL {shelve_changelist} to allow for submit on the server..")
|
|
905
|
+
revert_file_in_cl("//...", shelve_changelist)
|
|
899
906
|
else:
|
|
900
907
|
if change_obj.is_shelved:
|
|
901
908
|
shelve_changelist = change_obj.change
|
|
902
909
|
else:
|
|
903
910
|
abort(f"No opened files or shelve to work with in changelist '{change_obj.change}'...")
|
|
904
911
|
|
|
905
|
-
use_content_build = shelf_is_content_only(
|
|
912
|
+
use_content_build = shelf_is_content_only(shelve_changelist)
|
|
906
913
|
build_id = get_shelve_preflight_build_id(
|
|
907
914
|
shelve_changelist, type=type, stream=get_client_stream(change_obj.client), print_output=verbose, submit_on_server=(use_server_submit and commit_on_success), content_only_build=use_content_build
|
|
908
915
|
)
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
0.9.27
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|