unknown-cli 0.9.26__tar.gz → 0.9.28__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.26 → unknown-cli-0.9.28}/PKG-INFO +1 -1
- {unknown-cli-0.9.26 → unknown-cli-0.9.28}/unknown_cli.egg-info/PKG-INFO +1 -1
- unknown-cli-0.9.28/unknowncli/VERSION +1 -0
- {unknown-cli-0.9.26 → unknown-cli-0.9.28}/unknowncli/__main__.py +10 -7
- {unknown-cli-0.9.26 → unknown-cli-0.9.28}/unknowncli/commands/preflight.py +10 -5
- unknown-cli-0.9.26/unknowncli/VERSION +0 -1
- {unknown-cli-0.9.26 → unknown-cli-0.9.28}/README.md +0 -0
- {unknown-cli-0.9.26 → unknown-cli-0.9.28}/setup.cfg +0 -0
- {unknown-cli-0.9.26 → unknown-cli-0.9.28}/setup.py +0 -0
- {unknown-cli-0.9.26 → unknown-cli-0.9.28}/unknown_cli.egg-info/SOURCES.txt +0 -0
- {unknown-cli-0.9.26 → unknown-cli-0.9.28}/unknown_cli.egg-info/dependency_links.txt +0 -0
- {unknown-cli-0.9.26 → unknown-cli-0.9.28}/unknown_cli.egg-info/entry_points.txt +0 -0
- {unknown-cli-0.9.26 → unknown-cli-0.9.28}/unknown_cli.egg-info/requires.txt +0 -0
- {unknown-cli-0.9.26 → unknown-cli-0.9.28}/unknown_cli.egg-info/top_level.txt +0 -0
- {unknown-cli-0.9.26 → unknown-cli-0.9.28}/unknowncli/__init__.py +0 -0
- {unknown-cli-0.9.26 → unknown-cli-0.9.28}/unknowncli/commands/__init__.py +0 -0
- {unknown-cli-0.9.26 → unknown-cli-0.9.28}/unknowncli/commands/project.py +0 -0
- {unknown-cli-0.9.26 → unknown-cli-0.9.28}/unknowncli/commands/task.py +0 -0
- {unknown-cli-0.9.26 → unknown-cli-0.9.28}/unknowncli/commands/unreal.py +0 -0
- {unknown-cli-0.9.26 → unknown-cli-0.9.28}/unknowncli/data/.p4ignore.txt +0 -0
- {unknown-cli-0.9.26 → unknown-cli-0.9.28}/unknowncli/set_registry_keys.py +0 -0
- {unknown-cli-0.9.26 → unknown-cli-0.9.28}/unknowncli/set_url_handler.py +0 -0
- {unknown-cli-0.9.26 → unknown-cli-0.9.28}/unknowncli/utils.py +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0.9.28
|
|
@@ -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()
|
|
@@ -385,6 +385,10 @@ def verify_changelist(change_obj, change_obj_list):
|
|
|
385
385
|
abort(f"Selected changelist does not have any opened files: {changelist} ({client})")
|
|
386
386
|
if not any([c for c in change_obj_list if c.client == client and c.change == changelist]):
|
|
387
387
|
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.")
|
|
388
392
|
return
|
|
389
393
|
|
|
390
394
|
|
|
@@ -569,7 +573,7 @@ def get_shelve_preflight_build_id(shelve_changelist, type=PreflightType.FULL, st
|
|
|
569
573
|
secho(e.output.decode("ascii"), fg="red")
|
|
570
574
|
if abort_on_fail:
|
|
571
575
|
abort(f"Failed to {'find' if find else 'trigger'} preflight.")
|
|
572
|
-
if build_id:
|
|
576
|
+
if build_id and print_output:
|
|
573
577
|
secho(f"Found TeamCity build id: {build_id}")
|
|
574
578
|
return build_id
|
|
575
579
|
|
|
@@ -846,7 +850,8 @@ def main(
|
|
|
846
850
|
commit_on_success: Optional[bool] = Option(True, help="Commit the shelve on successful preflight."),
|
|
847
851
|
type: PreflightType = Option(PreflightType.QUICK, help="The type of preflight to run."),
|
|
848
852
|
p4v_config_type: P4VConfigType = Option(None, help="The command to use when running from P4V context menus."),
|
|
849
|
-
use_server_submit: Optional[bool] = Option(True, help="If committing on successful preflight, should server side commit be used.")
|
|
853
|
+
use_server_submit: Optional[bool] = Option(True, help="If committing on successful preflight, should server side commit be used."),
|
|
854
|
+
verbose: Optional[bool] = Option(False, help="Enables extra debug output.")
|
|
850
855
|
):
|
|
851
856
|
"""
|
|
852
857
|
Preflight a changelist
|
|
@@ -890,7 +895,7 @@ def main(
|
|
|
890
895
|
shelve_changelist = attempt_shelve_changelist(change_obj.change)
|
|
891
896
|
if use_server_submit and commit_on_success:
|
|
892
897
|
secho(f"Reverting files from CL {change_obj.change} to allow for submit on the server..")
|
|
893
|
-
revert_file_in_cl("//...", change_obj.change
|
|
898
|
+
revert_file_in_cl("//...", change_obj.change)
|
|
894
899
|
else:
|
|
895
900
|
if change_obj.is_shelved:
|
|
896
901
|
shelve_changelist = change_obj.change
|
|
@@ -899,11 +904,11 @@ def main(
|
|
|
899
904
|
|
|
900
905
|
use_content_build = shelf_is_content_only(changelist)
|
|
901
906
|
build_id = get_shelve_preflight_build_id(
|
|
902
|
-
shelve_changelist, type=type, stream=get_client_stream(change_obj.client), submit_on_server=(use_server_submit and commit_on_success), content_only_build=use_content_build
|
|
907
|
+
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
|
|
903
908
|
)
|
|
904
909
|
|
|
905
910
|
if use_server_submit:
|
|
906
|
-
secho("\nBuild is requested, it is safe to close this window at any time
|
|
911
|
+
secho("\nBuild is requested, it is safe to close this window at any time!\n")
|
|
907
912
|
|
|
908
913
|
wait_on_teamcity_build(build_id, shelve_changelist, use_server_submit)
|
|
909
914
|
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
0.9.26
|
|
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
|