unknown-cli 0.4.6__tar.gz → 0.4.8__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: unknown-cli
3
- Version: 0.4.6
3
+ Version: 0.4.8
4
4
  Summary: Unknown Commandline Tool
5
5
  Home-page: UNKNOWN
6
6
  Author:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: unknown-cli
3
- Version: 0.4.6
3
+ Version: 0.4.8
4
4
  Summary: Unknown Commandline Tool
5
5
  Home-page: UNKNOWN
6
6
  Author:
@@ -0,0 +1 @@
1
+ 0.4.8
@@ -45,7 +45,9 @@ def main():
45
45
  global p4
46
46
  p4 = connect_p4()
47
47
  ret = get_current_stream()
48
- client = get_current_client()
48
+ ignore_file = (path + ".p4ignore.txt").lower()
49
+ if p4.ignore_file.lower() != ignore_file:
50
+ abort(f"Your p4ignore file should be set to '{ignore_file}', not '{p4.ignore_file}'.\nPlease change the setting in your {p4.env('P4CONFIG')} file")
49
51
 
50
52
  if "Stream" not in ret:
51
53
  abort("Invalid workspace. You must be working in Streams to use this tool")
@@ -55,8 +57,8 @@ def main():
55
57
  if parent.lower() != UE_STREAM and stream_name.lower() != UE_STREAM:
56
58
  abort(f"To use this tool you must be working in the {UE_STREAM} stream but your workspace is set on {stream_name}. Please change your workspace in p4v")
57
59
 
58
- def get_task_streams():
59
- lst = p4.run_streams("-F", f"Owner=jonb Type=task baseParent={BASE_STREAM}")
60
+ def get_task_streams(owner):
61
+ lst = p4.run_streams("-F", f"Owner={owner} Type=task baseParent={BASE_STREAM}")
60
62
  return lst
61
63
 
62
64
  def get_current_stream():
@@ -219,8 +221,8 @@ def switch():
219
221
  """
220
222
  Lists your current task streams and lets you switch between them
221
223
  """
222
- task_streams = get_task_streams()
223
224
  stream = get_current_stream()
225
+ task_streams = get_task_streams(stream["Owner"])
224
226
  parent = None
225
227
  if stream["Type"] == "task":
226
228
  parent = stream["Parent"]
@@ -272,7 +274,7 @@ def mergedown():
272
274
 
273
275
  ret = p4.run_opened()
274
276
  if (len(ret)):
275
- abort("Your default pending changelist must be empty.")
277
+ abort("You must check in all files before merging down from main.")
276
278
 
277
279
  secho(f"Integrating latest from parent {parent} to task stream {stream_name}...", bold=True)
278
280
 
@@ -422,7 +424,8 @@ def delete(current: Optional[bool] = Option(False, help="Delete the current task
422
424
 
423
425
  delete = confirm("Are you sure you want to delete the current task stream?")
424
426
  else:
425
- task_streams = get_task_streams()
427
+ stream = get_current_stream()
428
+ task_streams = get_task_streams(stream["Owner"])
426
429
  parent = None
427
430
  for i, t in enumerate(task_streams):
428
431
  secho(f"{i+1} : {t['Stream']}")
@@ -434,6 +437,8 @@ def delete(current: Optional[bool] = Option(False, help="Delete the current task
434
437
  n = int(n)
435
438
  except:
436
439
  abort("Aborted.")
440
+ if n < 0 or n > len(task_streams):
441
+ abort("Aborted.")
437
442
  stream_name = task_streams[n-1]["Stream"]
438
443
  delete = confirm(f"Are you sure you want to delete the task stream {stream_name}?")
439
444
 
@@ -1 +0,0 @@
1
- 0.4.6
File without changes
File without changes
File without changes