unknown-cli 0.9.4__tar.gz → 0.9.6__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.
Files changed (23) hide show
  1. {unknown-cli-0.9.4 → unknown-cli-0.9.6}/PKG-INFO +4 -6
  2. {unknown-cli-0.9.4 → unknown-cli-0.9.6}/README.md +2 -2
  3. {unknown-cli-0.9.4 → unknown-cli-0.9.6}/setup.py +101 -101
  4. {unknown-cli-0.9.4 → unknown-cli-0.9.6}/unknown_cli.egg-info/PKG-INFO +4 -6
  5. unknown-cli-0.9.6/unknowncli/VERSION +1 -0
  6. {unknown-cli-0.9.4 → unknown-cli-0.9.6}/unknowncli/__init__.py +16 -16
  7. {unknown-cli-0.9.4 → unknown-cli-0.9.6}/unknowncli/commands/project.py +1 -0
  8. {unknown-cli-0.9.4 → unknown-cli-0.9.6}/unknowncli/commands/task.py +43 -19
  9. {unknown-cli-0.9.4 → unknown-cli-0.9.6}/unknowncli/commands/unreal.py +87 -87
  10. {unknown-cli-0.9.4 → unknown-cli-0.9.6}/unknowncli/data/.p4ignore.txt +152 -152
  11. unknown-cli-0.9.4/unknowncli/VERSION +0 -1
  12. {unknown-cli-0.9.4 → unknown-cli-0.9.6}/setup.cfg +0 -0
  13. {unknown-cli-0.9.4 → unknown-cli-0.9.6}/unknown_cli.egg-info/SOURCES.txt +0 -0
  14. {unknown-cli-0.9.4 → unknown-cli-0.9.6}/unknown_cli.egg-info/dependency_links.txt +0 -0
  15. {unknown-cli-0.9.4 → unknown-cli-0.9.6}/unknown_cli.egg-info/entry_points.txt +0 -0
  16. {unknown-cli-0.9.4 → unknown-cli-0.9.6}/unknown_cli.egg-info/requires.txt +0 -0
  17. {unknown-cli-0.9.4 → unknown-cli-0.9.6}/unknown_cli.egg-info/top_level.txt +0 -0
  18. {unknown-cli-0.9.4 → unknown-cli-0.9.6}/unknowncli/__main__.py +0 -0
  19. {unknown-cli-0.9.4 → unknown-cli-0.9.6}/unknowncli/commands/__init__.py +0 -0
  20. {unknown-cli-0.9.4 → unknown-cli-0.9.6}/unknowncli/commands/preflight.py +0 -0
  21. {unknown-cli-0.9.4 → unknown-cli-0.9.6}/unknowncli/set_registry_keys.py +0 -0
  22. {unknown-cli-0.9.4 → unknown-cli-0.9.6}/unknowncli/set_url_handler.py +0 -0
  23. {unknown-cli-0.9.4 → unknown-cli-0.9.6}/unknowncli/utils.py +0 -0
@@ -1,11 +1,14 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: unknown-cli
3
- Version: 0.9.4
3
+ Version: 0.9.6
4
4
  Summary: Unknown Commandline Tool
5
5
  Home-page: UNKNOWN
6
6
  Author:
7
7
  Author-email:
8
8
  License: MIT
9
+ Description: # Unknown CLI
10
+
11
+ Internal tool
9
12
  Platform: UNKNOWN
10
13
  Classifier: Intended Audience :: Developers
11
14
  Classifier: License :: OSI Approved :: MIT License
@@ -13,8 +16,3 @@ Classifier: Operating System :: OS Independent
13
16
  Classifier: Programming Language :: Python :: 3
14
17
  Requires-Python: >=3.6
15
18
  Description-Content-Type: text/markdown
16
-
17
- # Unknown CLI
18
-
19
- Internal tool
20
-
@@ -1,3 +1,3 @@
1
- # Unknown CLI
2
-
1
+ # Unknown CLI
2
+
3
3
  Internal tool
@@ -1,101 +1,101 @@
1
- #!/usr/bin/env python
2
- import os, sys
3
- from setuptools import setup, find_packages, Command
4
-
5
- if sys.version_info < (3, 8):
6
- raise NotImplementedError("""This tool does not support Python versions older than 3.6""")
7
-
8
-
9
- version_file = os.path.abspath(os.path.join("unknowncli", "VERSION"))
10
-
11
-
12
- def get_version():
13
- with open(version_file) as f:
14
- return f.readlines()[0].strip()
15
-
16
-
17
- class BumpCommand(Command):
18
- description = "Version bump"
19
- user_options = [("which=", None, "Specify which part of the version to bump")]
20
-
21
- def initialize_options(self):
22
- self.which = None
23
-
24
- def finalize_options(self):
25
- assert self.which in (None, "major", "minor", "patch"), "Invalid bump pragma"
26
-
27
- def run(self):
28
- bump_version(self.which)
29
-
30
-
31
- def bump_version(which):
32
- major, minor, patch = (0, 1, 0)
33
- old_version = get_version()
34
- major, minor, patch = old_version.split(".")
35
-
36
- if which == "major":
37
- major = int(major) + 1
38
- minor = 0
39
- patch = 0
40
- elif which == "minor":
41
- minor = int(minor) + 1
42
- patch = 0
43
- else:
44
- patch = int(patch.split("-")[0]) + 1
45
-
46
- new_version = "%s.%s.%s" % (major, minor, patch)
47
-
48
- with open(version_file, "w") as f:
49
- f.write(new_version)
50
- print(f"Version has been bumped from {old_version} to {new_version}")
51
-
52
-
53
- with open("README.md", "r") as fh:
54
- long_description = fh.read()
55
-
56
- version = get_version()
57
-
58
- setup(
59
- name="unknown-cli",
60
- python_requires=">=3.6",
61
- version=version,
62
- license="MIT",
63
- author="",
64
- author_email="",
65
- description="Unknown Commandline Tool",
66
- long_description=long_description,
67
- long_description_content_type="text/markdown",
68
- url="",
69
- packages=find_packages(exclude=["tests"]),
70
- package_data={"": ["VERSION", "data/.p4ignore.txt"]},
71
- install_requires=[
72
- "typer",
73
- "click",
74
- "requests",
75
- "boto3",
76
- "psutil",
77
- "jsonpath-rw",
78
- "pyyaml",
79
- "pyjwt",
80
- "tabulate",
81
- "colorama",
82
- "shellingham",
83
- "boto3",
84
- "loguru",
85
- "P4Python",
86
- "rich",
87
- "pyuac",
88
- "pywin32"
89
- ],
90
- extras_require={},
91
- include_package_data=False,
92
- classifiers=[
93
- "Intended Audience :: Developers",
94
- "License :: OSI Approved :: MIT License",
95
- "Operating System :: OS Independent",
96
- "Programming Language :: Python :: 3",
97
- ],
98
- test_suite="tests",
99
- cmdclass={"bump": BumpCommand},
100
- entry_points={"console_scripts": ["unknown = unknowncli.__main__:app", "unk = unknowncli.__main__:app"]},
101
- )
1
+ #!/usr/bin/env python
2
+ import os, sys
3
+ from setuptools import setup, find_packages, Command
4
+
5
+ if sys.version_info < (3, 8):
6
+ raise NotImplementedError("""This tool does not support Python versions older than 3.6""")
7
+
8
+
9
+ version_file = os.path.abspath(os.path.join("unknowncli", "VERSION"))
10
+
11
+
12
+ def get_version():
13
+ with open(version_file) as f:
14
+ return f.readlines()[0].strip()
15
+
16
+
17
+ class BumpCommand(Command):
18
+ description = "Version bump"
19
+ user_options = [("which=", None, "Specify which part of the version to bump")]
20
+
21
+ def initialize_options(self):
22
+ self.which = None
23
+
24
+ def finalize_options(self):
25
+ assert self.which in (None, "major", "minor", "patch"), "Invalid bump pragma"
26
+
27
+ def run(self):
28
+ bump_version(self.which)
29
+
30
+
31
+ def bump_version(which):
32
+ major, minor, patch = (0, 1, 0)
33
+ old_version = get_version()
34
+ major, minor, patch = old_version.split(".")
35
+
36
+ if which == "major":
37
+ major = int(major) + 1
38
+ minor = 0
39
+ patch = 0
40
+ elif which == "minor":
41
+ minor = int(minor) + 1
42
+ patch = 0
43
+ else:
44
+ patch = int(patch.split("-")[0]) + 1
45
+
46
+ new_version = "%s.%s.%s" % (major, minor, patch)
47
+
48
+ with open(version_file, "w") as f:
49
+ f.write(new_version)
50
+ print(f"Version has been bumped from {old_version} to {new_version}")
51
+
52
+
53
+ with open("README.md", "r") as fh:
54
+ long_description = fh.read()
55
+
56
+ version = get_version()
57
+
58
+ setup(
59
+ name="unknown-cli",
60
+ python_requires=">=3.6",
61
+ version=version,
62
+ license="MIT",
63
+ author="",
64
+ author_email="",
65
+ description="Unknown Commandline Tool",
66
+ long_description=long_description,
67
+ long_description_content_type="text/markdown",
68
+ url="",
69
+ packages=find_packages(exclude=["tests"]),
70
+ package_data={"": ["VERSION", "data/.p4ignore.txt"]},
71
+ install_requires=[
72
+ "typer",
73
+ "click",
74
+ "requests",
75
+ "boto3",
76
+ "psutil",
77
+ "jsonpath-rw",
78
+ "pyyaml",
79
+ "pyjwt",
80
+ "tabulate",
81
+ "colorama",
82
+ "shellingham",
83
+ "boto3",
84
+ "loguru",
85
+ "P4Python",
86
+ "rich",
87
+ "pyuac",
88
+ "pywin32"
89
+ ],
90
+ extras_require={},
91
+ include_package_data=False,
92
+ classifiers=[
93
+ "Intended Audience :: Developers",
94
+ "License :: OSI Approved :: MIT License",
95
+ "Operating System :: OS Independent",
96
+ "Programming Language :: Python :: 3",
97
+ ],
98
+ test_suite="tests",
99
+ cmdclass={"bump": BumpCommand},
100
+ entry_points={"console_scripts": ["unknown = unknowncli.__main__:app", "unk = unknowncli.__main__:app"]},
101
+ )
@@ -1,11 +1,14 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: unknown-cli
3
- Version: 0.9.4
3
+ Version: 0.9.6
4
4
  Summary: Unknown Commandline Tool
5
5
  Home-page: UNKNOWN
6
6
  Author:
7
7
  Author-email:
8
8
  License: MIT
9
+ Description: # Unknown CLI
10
+
11
+ Internal tool
9
12
  Platform: UNKNOWN
10
13
  Classifier: Intended Audience :: Developers
11
14
  Classifier: License :: OSI Approved :: MIT License
@@ -13,8 +16,3 @@ Classifier: Operating System :: OS Independent
13
16
  Classifier: Programming Language :: Python :: 3
14
17
  Requires-Python: >=3.6
15
18
  Description-Content-Type: text/markdown
16
-
17
- # Unknown CLI
18
-
19
- Internal tool
20
-
@@ -0,0 +1 @@
1
+ 0.9.6
@@ -1,16 +1,16 @@
1
- import os
2
- from typer import Typer, Context, Argument, Option, echo, secho, confirm
3
-
4
-
5
- def read_version():
6
- directory = os.path.dirname(__file__)
7
- with open(os.path.join(directory, "VERSION"), "r") as version_file:
8
- version = version_file.readline().strip()
9
- return version
10
-
11
-
12
- __version__ = read_version()
13
-
14
-
15
- def get_version_string():
16
- return f"unknown-cli/{__version__}"
1
+ import os
2
+ from typer import Typer, Context, Argument, Option, echo, secho, confirm
3
+
4
+
5
+ def read_version():
6
+ directory = os.path.dirname(__file__)
7
+ with open(os.path.join(directory, "VERSION"), "r") as version_file:
8
+ version = version_file.readline().strip()
9
+ return version
10
+
11
+
12
+ __version__ = read_version()
13
+
14
+
15
+ def get_version_string():
16
+ return f"unknown-cli/{__version__}"
@@ -19,6 +19,7 @@ app = Typer()
19
19
 
20
20
  hostname = socket.gethostname().lower()
21
21
  SUBST_DRIVE = "S:"
22
+ BASE_STREAM = "//Project/SN2-Main"
22
23
  STREAMS = {
23
24
  "sn2-main": "//project/sn2-main-ue"
24
25
  }
@@ -3,7 +3,7 @@ import logging
3
3
  import socket
4
4
  import sys
5
5
  from ..utils import abort
6
- from .project import SUB_STREAMS
6
+ from .project import BASE_STREAM, SUB_STREAMS
7
7
  from P4 import P4, P4Exception
8
8
  from typing import Optional
9
9
  from subprocess import check_call
@@ -18,7 +18,6 @@ app = Typer()
18
18
  hostname = socket.gethostname().lower()
19
19
  SUBST_DRIVE = "S:"
20
20
  path = f"{SUBST_DRIVE}\\sn2-main\\"
21
- BASE_STREAM = "//Project/SN2-Main"
22
21
  STREAM_LIST_LOWER = [s.lower() for s in list(list(SUB_STREAMS.values())[0].values())]
23
22
  STREAM_LIST_STRING = "\n\t" + "\n\t".join(STREAM_LIST_LOWER)
24
23
 
@@ -63,8 +62,9 @@ def main():
63
62
  )
64
63
 
65
64
 
66
- def get_task_streams(owner):
67
- lst = p4.run_streams("-F", f"Owner={owner} Type=task baseParent={BASE_STREAM}")
65
+ def get_task_streams(owner: str=""):
66
+ streams_filter = f"Type=task baseParent={BASE_STREAM}" + ( f" Owner={owner}" if owner else "" )
67
+ lst = p4.run_streams("-F", streams_filter)
68
68
  return lst
69
69
 
70
70
 
@@ -127,9 +127,14 @@ def create(label: str = Option(None, prompt="Task branch label")):
127
127
 
128
128
  if not label:
129
129
  abort("Aborted.")
130
- current_stream = get_current_stream()["Stream"]
131
- if current_stream.lower() not in STREAM_LIST_LOWER:
132
- abort(f"You are working in stream {current_stream}. Please first run 'unk task switch' to a parent stream.\nValid parent streams:{STREAM_LIST_STRING}")
130
+ # This needs to be lower() when used as the parent for the new task stream.
131
+ # TC is case sensitive so the parent stream needs to be '//project/sn2-main-ue'. (bug TW-87208)
132
+ # You can edit a stream if you need to change the parent to lowercase:
133
+ # p4 stream -o -v //project/<stream_name> > spec.txt
134
+ # p4 stream -i -f < spec.txt
135
+ current_stream_lower = get_current_stream()["Stream"].lower()
136
+ if current_stream_lower not in STREAM_LIST_LOWER:
137
+ abort(f"You are working in stream {current_stream_lower}. Please first run 'unk task switch' to a parent stream.\nValid parent streams:{STREAM_LIST_STRING}")
133
138
 
134
139
  ret = p4.run_opened()
135
140
  if len(ret):
@@ -147,12 +152,12 @@ def create(label: str = Option(None, prompt="Task branch label")):
147
152
  label = label.replace(" ", "_").lower()
148
153
  stream_name = f"{p4.user}-{d}-{label}"
149
154
  full_stream_name = f"//Project/{stream_name}"
150
- secho(f"Creating task stream {stream_name} from {current_stream} ...")
155
+ secho(f"Creating task stream {stream_name} from {current_stream_lower} ...")
151
156
  args = f"""
152
157
  Stream: {full_stream_name}
153
158
  Owner: {p4.user}
154
159
  Name: {stream_name}
155
- Parent: {current_stream}
160
+ Parent: {current_stream_lower}
156
161
  Type: task
157
162
  Description:
158
163
  Created by {p4.user}.
@@ -197,25 +202,29 @@ Paths:
197
202
 
198
203
 
199
204
  @app.command()
200
- def switch():
205
+ def switch(owned: Optional[bool] = Option(True, help="See only owned task streams")):
201
206
  """
202
207
  Lists your current task streams and lets you switch between them
203
208
  """
204
209
  stream = get_current_stream()
205
210
  old_stream_name = stream["Stream"]
206
211
  client = p4.run_client("-o")[0]
207
- client_owner = client["Owner"]
208
- task_streams = get_task_streams(client_owner)
212
+ task_streams = get_task_streams(client["Owner"] if owned else "")
213
+ if owned and not task_streams:
214
+ secho("You have no owned task streams. You can create one with the 'create' command.", bold=True)
215
+ if confirm("\nDo you want to instead see other streams that you don't own?"):
216
+ switch(owned=False)
217
+ abort("")
209
218
  parent = None
210
219
  if stream["Type"] == "task":
211
220
  parent = stream["Parent"]
212
221
  for i, t in enumerate(task_streams):
213
222
  secho(f"{i+1} : {t['Stream']}")
214
223
  if parent:
215
- secho(f"0 : {parent}")
224
+ secho(f"0 : (Parent stream) {parent}")
225
+ if owned:
226
+ secho(f"99 : <See other streams, including task streams that you don't own>")
216
227
 
217
- if not task_streams:
218
- abort("You have no task streams. You can create one with the 'create' command")
219
228
  n = prompt("\nSelect a stream to work in")
220
229
  if n is None:
221
230
  abort("No stream selected")
@@ -223,8 +232,11 @@ def switch():
223
232
  n = int(n)
224
233
  except:
225
234
  abort("Aborted.")
226
- if n == 0:
235
+ if parent and n == 0:
227
236
  new_stream = parent
237
+ elif owned and n == 99:
238
+ switch(owned=False)
239
+ abort("")
228
240
  else:
229
241
  try:
230
242
  new_stream = task_streams[n - 1]["Stream"]
@@ -421,7 +433,7 @@ Files:
421
433
 
422
434
 
423
435
  @app.command()
424
- def copyup():
436
+ def copyup(force: Optional[bool] = Option(False, help="Use p4 copy force arguments: -f -F")):
425
437
  """
426
438
  Finish the task and copy into the parent stream
427
439
  """
@@ -440,9 +452,12 @@ def copyup():
440
452
  p4.run_client("-s", "-S", parent)
441
453
 
442
454
  p4.run_sync("-q")
443
- echo(f"Performing copy from {stream_name} to {ret['baseParent']}/...")
455
+ copy_target = f"{ret['baseParent']}/..."
456
+ echo(f"Performing copy from {stream_name} to {copy_target}")
457
+ copy_args = [ "-Af", "-S", stream_name, copy_target ]
458
+ force_copy_args = [ "-f", "-F" ]
444
459
  try:
445
- copy_ret = p4.run_copy("-Af", "-S", stream_name, ret["baseParent"] + "/...")
460
+ copy_ret = p4.run_copy(*(force_copy_args if force else []), *copy_args)
446
461
  except P4Exception as e:
447
462
  if "up-to-date" in str(e):
448
463
  secho(f"Nothing to do. Parent {parent} is identical to task stream {stream_name}", fg="green")
@@ -450,6 +465,15 @@ def copyup():
450
465
  elif "No such file(s)" in str(e):
451
466
  secho(f"Nothing to do. No changes were made yet in task stream {stream_name}", fg="green")
452
467
  return
468
+ elif not force and "cannot 'copy' over outstanding 'merge' changes" in str(e):
469
+ # Occurs when mergedown is not complete but it can be the case when P4 has issues
470
+ # merging rename/move+edit and the fix is to force merge which causes "outstanding...".
471
+ secho(f"\n{str(e)}", fg="yellow")
472
+ if confirm("Try a force copy? (Do this if you're sure that you're done with mergedowns)"):
473
+ copy_ret = p4.run_copy(*force_copy_args, *copy_args)
474
+ else:
475
+ secho("No action taken.")
476
+ return
453
477
  else:
454
478
  raise
455
479
  else:
@@ -1,87 +1,87 @@
1
- import time
2
- import requests
3
- import logging
4
- from pathlib import Path
5
- from ..utils import abort
6
- from subprocess import Popen
7
- import psutil
8
- from urllib.parse import quote_plus
9
- from typer import echo, secho, Typer
10
- from ..utils import set_url_handler
11
-
12
- log = logging.getLogger(__name__)
13
-
14
- UNREAL_EDITOR = r"s:\sn2-main\UE\Engine\Binaries\Win64\UnrealEditor.exe s:\sn2-main\UE\Subnautica2\Subnautica2.uproject"
15
- EDITOR_URL = "http://127.0.0.1:8082"
16
-
17
- app = Typer()
18
-
19
- def ensure_editor_running():
20
- for proc in psutil.process_iter():
21
- if "UnrealEditor" in proc.name():
22
- return
23
- echo(f"Running editor: {UNREAL_EDITOR}")
24
- Popen(UNREAL_EDITOR, shell=True)
25
- time.sleep(3.0)
26
- echo("Checking for response...")
27
- n = 0
28
- num_tries = 10
29
- while n < num_tries:
30
- try:
31
- url = f"http://127.0.0.1:8082/"
32
- resp = requests.get(url)
33
- return
34
- except:
35
- time.sleep(1.0)
36
- abort("Could not start editor.")
37
-
38
-
39
- @app.command()
40
- def diff(first, second):
41
- """
42
- Diff two .uasset files in the editor.
43
- """
44
- ensure_editor_running()
45
- try:
46
- first_file = Path(first)
47
- second_file = Path(second)
48
- if not first_file.is_file() or not second_file.is_file():
49
- abort(f"{first} or {second} not found")
50
- secho(f"Diffing the following files:\n {first}\n {second}", bold=True)
51
-
52
- # with open("c:/temp/out.log", "w") as f:
53
- # f.write(f"Diffing the following files:\n {first}\n {second}")
54
- left = quote_plus(first)
55
- right = quote_plus(second)
56
- left = first.replace("#", "%23")
57
- url = f"{EDITOR_URL}/diff?left={left}&right={right}"
58
- echo(url)
59
- resp = requests.get(url)
60
- print(resp.text)
61
- except Exception as e:
62
- raise
63
- # with open("c:/temp/out.log", "w") as f:
64
- # f.write(str(e))
65
-
66
- @app.command()
67
- def asset(name):
68
- """
69
- Open an asset in a running editor or spawn an editor
70
- """
71
- ensure_editor_running()
72
- p = Path(name)
73
- if p.is_file():
74
- asset_name = p.stem
75
- else:
76
- asset_name = p.name
77
- print(f"Getting {asset_name}...")
78
- resp = requests.get(f"{EDITOR_URL}/asset/{asset_name}")
79
- print(resp.text)
80
- time.sleep(5.0)
81
-
82
- @app.command()
83
- def handler():
84
- """
85
- Set the URL handler
86
- """
87
- set_url_handler(True)
1
+ import time
2
+ import requests
3
+ import logging
4
+ from pathlib import Path
5
+ from ..utils import abort
6
+ from subprocess import Popen
7
+ import psutil
8
+ from urllib.parse import quote_plus
9
+ from typer import echo, secho, Typer
10
+ from ..utils import set_url_handler
11
+
12
+ log = logging.getLogger(__name__)
13
+
14
+ UNREAL_EDITOR = r"s:\sn2-main\UE\Engine\Binaries\Win64\UnrealEditor.exe s:\sn2-main\UE\Subnautica2\Subnautica2.uproject"
15
+ EDITOR_URL = "http://127.0.0.1:8082"
16
+
17
+ app = Typer()
18
+
19
+ def ensure_editor_running():
20
+ for proc in psutil.process_iter():
21
+ if "UnrealEditor" in proc.name():
22
+ return
23
+ echo(f"Running editor: {UNREAL_EDITOR}")
24
+ Popen(UNREAL_EDITOR, shell=True)
25
+ time.sleep(3.0)
26
+ echo("Checking for response...")
27
+ n = 0
28
+ num_tries = 10
29
+ while n < num_tries:
30
+ try:
31
+ url = f"http://127.0.0.1:8082/"
32
+ resp = requests.get(url)
33
+ return
34
+ except:
35
+ time.sleep(1.0)
36
+ abort("Could not start editor.")
37
+
38
+
39
+ @app.command()
40
+ def diff(first, second):
41
+ """
42
+ Diff two .uasset files in the editor.
43
+ """
44
+ ensure_editor_running()
45
+ try:
46
+ first_file = Path(first)
47
+ second_file = Path(second)
48
+ if not first_file.is_file() or not second_file.is_file():
49
+ abort(f"{first} or {second} not found")
50
+ secho(f"Diffing the following files:\n {first}\n {second}", bold=True)
51
+
52
+ # with open("c:/temp/out.log", "w") as f:
53
+ # f.write(f"Diffing the following files:\n {first}\n {second}")
54
+ left = quote_plus(first)
55
+ right = quote_plus(second)
56
+ left = first.replace("#", "%23")
57
+ url = f"{EDITOR_URL}/diff?left={left}&right={right}"
58
+ echo(url)
59
+ resp = requests.get(url)
60
+ print(resp.text)
61
+ except Exception as e:
62
+ raise
63
+ # with open("c:/temp/out.log", "w") as f:
64
+ # f.write(str(e))
65
+
66
+ @app.command()
67
+ def asset(name):
68
+ """
69
+ Open an asset in a running editor or spawn an editor
70
+ """
71
+ ensure_editor_running()
72
+ p = Path(name)
73
+ if p.is_file():
74
+ asset_name = p.stem
75
+ else:
76
+ asset_name = p.name
77
+ print(f"Getting {asset_name}...")
78
+ resp = requests.get(f"{EDITOR_URL}/asset/{asset_name}")
79
+ print(resp.text)
80
+ time.sleep(5.0)
81
+
82
+ @app.command()
83
+ def handler():
84
+ """
85
+ Set the URL handler
86
+ """
87
+ set_url_handler(True)
@@ -1,152 +1,152 @@
1
- # Here you can specify files to ignore when adding files to the depot.
2
- #
3
- # The syntax for P4IGNORE files is not the same as Perforce syntax.
4
- # Instead, it is similar to that used by other versioning systems:
5
- #
6
- # - Files are specified in local syntax
7
- # - a # character at the beginning of a line denotes a comment
8
- # - a ! character at the beginning of a line excludes the file specification
9
- # - a * wildcard matches substrings.
10
- #
11
- # http://stackoverflow.com/questions/18240084/how-does-perforce-ignore-file-syntax-differ-from-gitignore-syntax
12
-
13
- /*.sln
14
- /.p4sync.txt
15
-
16
- # Ignore all Visual Studio temp files.
17
- *.suo
18
- *.opensdf
19
- *.sdf
20
- .patch_*
21
-
22
- */DerivedDataCache/
23
- **/DerivedDataCache/Boot.ddc
24
- **/DerivedDataCache/**/*.udd
25
-
26
- # Ignore all Intermediate and Saved directories
27
- */Intermediate/*
28
- */Saved/*
29
-
30
- # Ignore UBT's configuration.xml
31
- Engine/Programs/UnrealBuildTool/*
32
- *.uatbuildrecord
33
- *.tmp
34
-
35
- # Ignore built binaries and temporary build files
36
- */obj/*
37
- *.csprojAssemblyReference.cache
38
-
39
- # Ignore UBT's log output files
40
- /Engine/Programs/UnrealBuildTool/*.txt
41
-
42
- # Ignore Python cached files
43
- *.pyc
44
-
45
- # Ignore JetBrain's IDE folders
46
- .idea/
47
- .gradle/
48
-
49
- # Ignore autogenerated files from HoloLens WMRInterop
50
- /Engine/Source/ThirdParty/WindowsMixedRealityInterop/packages/*
51
- /Engine/Source/ThirdParty/WindowsMixedRealityInterop/MixedRealityInteropHoloLens/Generated Files/*
52
- /Engine/Source/ThirdParty/WindowsMixedRealityInterop/MixedRealityInteropHoloLens/x64/*
53
- /Engine/Source/ThirdParty/WindowsMixedRealityInterop/MixedRealityInteropHoloLens/ARM64/*
54
- /Engine/Source/ThirdParty/WindowsMixedRealityInterop/MixedRealityInterop/x64/*
55
- /Engine/Source/ThirdParty/WindowsMixedRealityInterop/MixedRealityInterop/ARM64/*
56
-
57
- Saved/
58
- LocalBuilds/
59
- *.csproj.*
60
- .vs/*
61
- .vsconfig
62
- *.pdb
63
- *.suo
64
- *.opensdf
65
- *.sdf
66
- *.tmp
67
- *.mdb
68
- obj/
69
- *.vcxproj
70
- *.sln
71
- *-Debug.*
72
- FileOpenOrder/
73
- *.xcworkspace
74
- *.xcodeproj
75
- ./Makefile
76
- ./CMakeLists.txt
77
- .ue4dependencies
78
- Samples/*
79
- FeaturePacks/*
80
- Templates/*
81
- Engine/Documentation/*
82
-
83
- # Engine intermediates
84
- Engine/Intermediate/*
85
- Intermediate/
86
-
87
- # Intermediate folders for programs should not be checked in
88
- Engine\Programs\*\Intermediate\*
89
-
90
- # Intermediate folders created for various C# programs
91
- Engine\Source\Programs\*\obj\*
92
-
93
- # Saved folders for programs should not be checked in
94
- Engine\Programs\*\Saved\*
95
- Engine\Programs\UnrealBuildTool\*
96
-
97
- # Derived data cache should never be checked in
98
- Engine/DerivedDataCache/*
99
-
100
- # Ignore any build receipts
101
- Engine/Build/Receipts/*
102
-
103
- # Ignore personal workspace vars
104
- p4config.txt
105
-
106
- # Ignore Unix backup files
107
- *~
108
-
109
- # Ignore Mac desktop services store files
110
- .DS_Store
111
-
112
- # Ignore crash reports
113
- crashinfo--*
114
-
115
- # Ignore linux project files
116
- *.user
117
- *.pro
118
- *.pri
119
- *.kdev4
120
-
121
- # Obj-C/Swift specific
122
- *.hmap
123
- *.ipa
124
- *.dSYM.zip
125
- *.dSYM
126
-
127
- # Ignore documentation generated for C# tools
128
- Engine/Binaries/DotNET/UnrealBuildTool.xml
129
- Engine/Binaries/DotNET/AutomationScripts/BuildGraph.Automation.xml
130
-
131
- # Ignore version files in the Engine/Binaries directory created by UBT
132
- /Engine/Binaries/**/*.version
133
-
134
- # Ignore exp files in the the Engine/Binaries directory as they aren't C/C++ source files
135
- /Engine/Binaries/**/*.exp
136
-
137
- # Ignore Swarm local save files
138
- Engine/Binaries/DotNET/SwarmAgent.DeveloperOptions.xml
139
- Engine/Binaries/DotNET/SwarmAgent.Options.xml
140
-
141
- # Intermediary Files
142
- *.target.xml
143
- *.exe.config
144
- *.exe.manifest
145
-
146
- # Ignore project-specific files
147
- */Build/Receipts/*
148
- */DerivedDataCache/*
149
- */Binaries/*-Shipping.*
150
- */Intermediate/*
151
-
152
- */Logs/*
1
+ # Here you can specify files to ignore when adding files to the depot.
2
+ #
3
+ # The syntax for P4IGNORE files is not the same as Perforce syntax.
4
+ # Instead, it is similar to that used by other versioning systems:
5
+ #
6
+ # - Files are specified in local syntax
7
+ # - a # character at the beginning of a line denotes a comment
8
+ # - a ! character at the beginning of a line excludes the file specification
9
+ # - a * wildcard matches substrings.
10
+ #
11
+ # http://stackoverflow.com/questions/18240084/how-does-perforce-ignore-file-syntax-differ-from-gitignore-syntax
12
+
13
+ /*.sln
14
+ /.p4sync.txt
15
+
16
+ # Ignore all Visual Studio temp files.
17
+ *.suo
18
+ *.opensdf
19
+ *.sdf
20
+ .patch_*
21
+
22
+ */DerivedDataCache/
23
+ **/DerivedDataCache/Boot.ddc
24
+ **/DerivedDataCache/**/*.udd
25
+
26
+ # Ignore all Intermediate and Saved directories
27
+ */Intermediate/*
28
+ */Saved/*
29
+
30
+ # Ignore UBT's configuration.xml
31
+ Engine/Programs/UnrealBuildTool/*
32
+ *.uatbuildrecord
33
+ *.tmp
34
+
35
+ # Ignore built binaries and temporary build files
36
+ */obj/*
37
+ *.csprojAssemblyReference.cache
38
+
39
+ # Ignore UBT's log output files
40
+ /Engine/Programs/UnrealBuildTool/*.txt
41
+
42
+ # Ignore Python cached files
43
+ *.pyc
44
+
45
+ # Ignore JetBrain's IDE folders
46
+ .idea/
47
+ .gradle/
48
+
49
+ # Ignore autogenerated files from HoloLens WMRInterop
50
+ /Engine/Source/ThirdParty/WindowsMixedRealityInterop/packages/*
51
+ /Engine/Source/ThirdParty/WindowsMixedRealityInterop/MixedRealityInteropHoloLens/Generated Files/*
52
+ /Engine/Source/ThirdParty/WindowsMixedRealityInterop/MixedRealityInteropHoloLens/x64/*
53
+ /Engine/Source/ThirdParty/WindowsMixedRealityInterop/MixedRealityInteropHoloLens/ARM64/*
54
+ /Engine/Source/ThirdParty/WindowsMixedRealityInterop/MixedRealityInterop/x64/*
55
+ /Engine/Source/ThirdParty/WindowsMixedRealityInterop/MixedRealityInterop/ARM64/*
56
+
57
+ Saved/
58
+ LocalBuilds/
59
+ *.csproj.*
60
+ .vs/*
61
+ .vsconfig
62
+ *.pdb
63
+ *.suo
64
+ *.opensdf
65
+ *.sdf
66
+ *.tmp
67
+ *.mdb
68
+ obj/
69
+ *.vcxproj
70
+ *.sln
71
+ *-Debug.*
72
+ FileOpenOrder/
73
+ *.xcworkspace
74
+ *.xcodeproj
75
+ ./Makefile
76
+ ./CMakeLists.txt
77
+ .ue4dependencies
78
+ Samples/*
79
+ FeaturePacks/*
80
+ Templates/*
81
+ Engine/Documentation/*
82
+
83
+ # Engine intermediates
84
+ Engine/Intermediate/*
85
+ Intermediate/
86
+
87
+ # Intermediate folders for programs should not be checked in
88
+ Engine\Programs\*\Intermediate\*
89
+
90
+ # Intermediate folders created for various C# programs
91
+ Engine\Source\Programs\*\obj\*
92
+
93
+ # Saved folders for programs should not be checked in
94
+ Engine\Programs\*\Saved\*
95
+ Engine\Programs\UnrealBuildTool\*
96
+
97
+ # Derived data cache should never be checked in
98
+ Engine/DerivedDataCache/*
99
+
100
+ # Ignore any build receipts
101
+ Engine/Build/Receipts/*
102
+
103
+ # Ignore personal workspace vars
104
+ p4config.txt
105
+
106
+ # Ignore Unix backup files
107
+ *~
108
+
109
+ # Ignore Mac desktop services store files
110
+ .DS_Store
111
+
112
+ # Ignore crash reports
113
+ crashinfo--*
114
+
115
+ # Ignore linux project files
116
+ *.user
117
+ *.pro
118
+ *.pri
119
+ *.kdev4
120
+
121
+ # Obj-C/Swift specific
122
+ *.hmap
123
+ *.ipa
124
+ *.dSYM.zip
125
+ *.dSYM
126
+
127
+ # Ignore documentation generated for C# tools
128
+ Engine/Binaries/DotNET/UnrealBuildTool.xml
129
+ Engine/Binaries/DotNET/AutomationScripts/BuildGraph.Automation.xml
130
+
131
+ # Ignore version files in the Engine/Binaries directory created by UBT
132
+ /Engine/Binaries/**/*.version
133
+
134
+ # Ignore exp files in the the Engine/Binaries directory as they aren't C/C++ source files
135
+ /Engine/Binaries/**/*.exp
136
+
137
+ # Ignore Swarm local save files
138
+ Engine/Binaries/DotNET/SwarmAgent.DeveloperOptions.xml
139
+ Engine/Binaries/DotNET/SwarmAgent.Options.xml
140
+
141
+ # Intermediary Files
142
+ *.target.xml
143
+ *.exe.config
144
+ *.exe.manifest
145
+
146
+ # Ignore project-specific files
147
+ */Build/Receipts/*
148
+ */DerivedDataCache/*
149
+ */Binaries/*-Shipping.*
150
+ */Intermediate/*
151
+
152
+ */Logs/*
@@ -1 +0,0 @@
1
- 0.9.4
File without changes