p4cmd 2.9.0__tar.gz → 2.9.1__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 (31) hide show
  1. {p4cmd-2.9.0 → p4cmd-2.9.1}/PKG-INFO +1 -1
  2. {p4cmd-2.9.0 → p4cmd-2.9.1}/p4cmd/__init__.py +1 -1
  3. {p4cmd-2.9.0 → p4cmd-2.9.1}/p4cmd/p4cmd.py +7 -1
  4. {p4cmd-2.9.0 → p4cmd-2.9.1}/p4cmd.egg-info/PKG-INFO +1 -1
  5. {p4cmd-2.9.0 → p4cmd-2.9.1}/tests/test_p4client.py +13 -0
  6. {p4cmd-2.9.0 → p4cmd-2.9.1}/LICENSE +0 -0
  7. {p4cmd-2.9.0 → p4cmd-2.9.1}/README.md +0 -0
  8. {p4cmd-2.9.0 → p4cmd-2.9.1}/p4cmd/p4errors.py +0 -0
  9. {p4cmd-2.9.0 → p4cmd-2.9.1}/p4cmd/p4file.py +0 -0
  10. {p4cmd-2.9.0 → p4cmd-2.9.1}/p4cmd/resources/__init__.py +0 -0
  11. {p4cmd-2.9.0 → p4cmd-2.9.1}/p4cmd/resources/perforce_DEPOT_ONLY.png +0 -0
  12. {p4cmd-2.9.0 → p4cmd-2.9.1}/p4cmd/resources/perforce_MOVED.png +0 -0
  13. {p4cmd-2.9.0 → p4cmd-2.9.1}/p4cmd/resources/perforce_NEED_SYNC.png +0 -0
  14. {p4cmd-2.9.0 → p4cmd-2.9.1}/p4cmd/resources/perforce_OPEN_FOR_ADD.png +0 -0
  15. {p4cmd-2.9.0 → p4cmd-2.9.1}/p4cmd/resources/perforce_OPEN_FOR_DELETE.png +0 -0
  16. {p4cmd-2.9.0 → p4cmd-2.9.1}/p4cmd/resources/perforce_OPEN_FOR_EDIT.png +0 -0
  17. {p4cmd-2.9.0 → p4cmd-2.9.1}/p4cmd/resources/perforce_UNKNOWN.png +0 -0
  18. {p4cmd-2.9.0 → p4cmd-2.9.1}/p4cmd/resources/perforce_UNTRACKED.png +0 -0
  19. {p4cmd-2.9.0 → p4cmd-2.9.1}/p4cmd/resources/perforce_UP_TO_DATE.png +0 -0
  20. {p4cmd-2.9.0 → p4cmd-2.9.1}/p4cmd/utils.py +0 -0
  21. {p4cmd-2.9.0 → p4cmd-2.9.1}/p4cmd.egg-info/SOURCES.txt +0 -0
  22. {p4cmd-2.9.0 → p4cmd-2.9.1}/p4cmd.egg-info/dependency_links.txt +0 -0
  23. {p4cmd-2.9.0 → p4cmd-2.9.1}/p4cmd.egg-info/requires.txt +0 -0
  24. {p4cmd-2.9.0 → p4cmd-2.9.1}/p4cmd.egg-info/top_level.txt +0 -0
  25. {p4cmd-2.9.0 → p4cmd-2.9.1}/setup.cfg +0 -0
  26. {p4cmd-2.9.0 → p4cmd-2.9.1}/setup.py +0 -0
  27. {p4cmd-2.9.0 → p4cmd-2.9.1}/tests/__init__.py +0 -0
  28. {p4cmd-2.9.0 → p4cmd-2.9.1}/tests/conftest.py +0 -0
  29. {p4cmd-2.9.0 → p4cmd-2.9.1}/tests/test_integration.py +0 -0
  30. {p4cmd-2.9.0 → p4cmd-2.9.1}/tests/test_p4file.py +0 -0
  31. {p4cmd-2.9.0 → p4cmd-2.9.1}/tests/test_utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: p4cmd
3
- Version: 2.9.0
3
+ Version: 2.9.1
4
4
  Summary: Simple P4 python module
5
5
  Home-page: https://github.com/nielsvaes/p4cmd
6
6
  Author: Niels Vaes
@@ -1,4 +1,4 @@
1
- VERSION = "2.9.0"
1
+ VERSION = "2.9.1"
2
2
 
3
3
  from .p4cmd import P4Client
4
4
  from .p4file import P4File
@@ -605,6 +605,8 @@ class P4Client(object):
605
605
  if verify:
606
606
  local_file_paths = self.get_local_paths(file_list)
607
607
  for local_file_path in local_file_paths:
608
+ if local_file_path is None:
609
+ continue
608
610
  if not os.path.isfile(local_file_path):
609
611
  logging.warning(f"File didn't exist after syncing, try force syncing it instead: {local_file_path}")
610
612
 
@@ -1160,7 +1162,11 @@ class P4Client(object):
1160
1162
  no_rev_paths.append("{}{}".format(path_without_ext, path_ext))
1161
1163
 
1162
1164
  info_dicts = self.run_cmd("where", file_list=no_rev_paths)
1163
- local_paths = [self.__get_dict_value(info, "path") for info in info_dicts]
1165
+ local_paths = [
1166
+ self.__get_dict_value(info, "path")
1167
+ for info in info_dicts
1168
+ if self.__get_dict_value(info, "path") is not None
1169
+ ]
1164
1170
  return local_paths
1165
1171
 
1166
1172
  @validate_not_empty
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: p4cmd
3
- Version: 2.9.0
3
+ Version: 2.9.1
4
4
  Summary: Simple P4 python module
5
5
  Home-page: https://github.com/nielsvaes/p4cmd
6
6
  Author: Niels Vaes
@@ -571,3 +571,16 @@ def test_get_depot_paths_missing_depot_file(p4client):
571
571
  with patch.object(p4client, "run_cmd", return_value=info_dicts):
572
572
  result = p4client.get_depot_paths(["C:/workspace/file.txt", "C:/workspace/other.txt"])
573
573
  assert result == ["//depot/project/file.txt"]
574
+
575
+
576
+ def test_get_local_paths_missing_path(p4client):
577
+ """get_local_paths skips entries where path is missing (e.g. unmapped paths from p4 where)."""
578
+ info_dicts = [
579
+ {b"depotFile": b"//depot/project/file.txt", b"path": b"C:/workspace/file.txt"},
580
+ {b"depotFile": b"//depot/project/unmapped.txt"}, # no path key — unmapped
581
+ ]
582
+ with patch.object(p4client, "run_cmd", return_value=info_dicts):
583
+ result = p4client.get_local_paths(
584
+ ["//depot/project/file.txt", "//depot/project/unmapped.txt"]
585
+ )
586
+ assert result == ["C:/workspace/file.txt"]
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