p4cmd 2.8.1__tar.gz → 2.8.4__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 (24) hide show
  1. {p4cmd-2.8.1 → p4cmd-2.8.4}/PKG-INFO +1 -1
  2. {p4cmd-2.8.1 → p4cmd-2.8.4}/p4cmd/__init__.py +1 -1
  3. {p4cmd-2.8.1 → p4cmd-2.8.4}/p4cmd/p4cmd.py +49 -5
  4. {p4cmd-2.8.1 → p4cmd-2.8.4}/p4cmd.egg-info/PKG-INFO +1 -1
  5. {p4cmd-2.8.1 → p4cmd-2.8.4}/LICENSE +0 -0
  6. {p4cmd-2.8.1 → p4cmd-2.8.4}/README.md +0 -0
  7. {p4cmd-2.8.1 → p4cmd-2.8.4}/p4cmd/p4errors.py +0 -0
  8. {p4cmd-2.8.1 → p4cmd-2.8.4}/p4cmd/p4file.py +0 -0
  9. {p4cmd-2.8.1 → p4cmd-2.8.4}/p4cmd/resources/__init__.py +0 -0
  10. {p4cmd-2.8.1 → p4cmd-2.8.4}/p4cmd/resources/perforce_DEPOT_ONLY.png +0 -0
  11. {p4cmd-2.8.1 → p4cmd-2.8.4}/p4cmd/resources/perforce_MOVED.png +0 -0
  12. {p4cmd-2.8.1 → p4cmd-2.8.4}/p4cmd/resources/perforce_NEED_SYNC.png +0 -0
  13. {p4cmd-2.8.1 → p4cmd-2.8.4}/p4cmd/resources/perforce_OPEN_FOR_ADD.png +0 -0
  14. {p4cmd-2.8.1 → p4cmd-2.8.4}/p4cmd/resources/perforce_OPEN_FOR_DELETE.png +0 -0
  15. {p4cmd-2.8.1 → p4cmd-2.8.4}/p4cmd/resources/perforce_OPEN_FOR_EDIT.png +0 -0
  16. {p4cmd-2.8.1 → p4cmd-2.8.4}/p4cmd/resources/perforce_UNKNOWN.png +0 -0
  17. {p4cmd-2.8.1 → p4cmd-2.8.4}/p4cmd/resources/perforce_UNTRACKED.png +0 -0
  18. {p4cmd-2.8.1 → p4cmd-2.8.4}/p4cmd/resources/perforce_UP_TO_DATE.png +0 -0
  19. {p4cmd-2.8.1 → p4cmd-2.8.4}/p4cmd/utils.py +0 -0
  20. {p4cmd-2.8.1 → p4cmd-2.8.4}/p4cmd.egg-info/SOURCES.txt +0 -0
  21. {p4cmd-2.8.1 → p4cmd-2.8.4}/p4cmd.egg-info/dependency_links.txt +0 -0
  22. {p4cmd-2.8.1 → p4cmd-2.8.4}/p4cmd.egg-info/top_level.txt +0 -0
  23. {p4cmd-2.8.1 → p4cmd-2.8.4}/setup.cfg +0 -0
  24. {p4cmd-2.8.1 → p4cmd-2.8.4}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: p4cmd
3
- Version: 2.8.1
3
+ Version: 2.8.4
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.8.1"
1
+ VERSION = "2.8.4"
2
2
 
3
3
  from .p4cmd import P4Client
4
4
  from .p4file import P4File
@@ -582,11 +582,14 @@ class P4Client(object):
582
582
  return info_dicts
583
583
 
584
584
  @validate_not_empty
585
- def reconcile_offline_files(self, file_list, changelist="default"):
585
+ def reconcile_offline_files(self, file_list, add=True, edit=True, delete=True, changelist="default"):
586
586
  """
587
587
  Adds, opens for edit or delete any files that were changed outside Perforce
588
588
 
589
589
  :param file_list: *list* of local files
590
+ :param add: *bool* if True, adds new files
591
+ :param edit: *bool* if True, opens modified files for edit
592
+ :param delete: *bool* if True, marks deleted files for delete
590
593
  :param changelist: string or int value
591
594
  :return: *list* of info dicts
592
595
  """
@@ -594,15 +597,37 @@ class P4Client(object):
594
597
 
595
598
  changelist = self.__ensure_changelist(changelist)
596
599
 
597
- info_dicts = self.run_cmd("reconcile", args=["-c", changelist], file_list=file_list)
600
+ # Build args based on which operations are enabled
601
+ args = ["-c", changelist]
602
+
603
+ # Add flags for specific operations
604
+ if not add and not edit and not delete:
605
+ # If nothing is enabled, don't do anything
606
+ return []
607
+ elif add and edit and delete:
608
+ # Default behavior - reconcile everything (no additional flags needed)
609
+ pass
610
+ else:
611
+ # Specific operations requested
612
+ if add:
613
+ args.append("-a")
614
+ if edit:
615
+ args.append("-e")
616
+ if delete:
617
+ args.append("-d")
618
+
619
+ info_dicts = self.run_cmd("reconcile", args=args, file_list=file_list)
598
620
  return info_dicts
599
621
 
600
622
  @validate_not_empty
601
- def reconcile_offline_folders(self, folder_list, changelist="default"):
623
+ def reconcile_offline_folders(self, folder_list, add=True, edit=True, delete=True, changelist="default"):
602
624
  """
603
625
  Adds, opens for edit or delete any files in the rootfolder + subfolders that were changed outside Perforce
604
626
 
605
627
  :param folder_list: *list* folders
628
+ :param add: *bool* if True, adds new files
629
+ :param edit: *bool* if True, opens modified files for edit
630
+ :param delete: *bool* if True, marks deleted files for delete
606
631
  :param changelist: string or int value
607
632
  :return: *list* of info dicts
608
633
  """
@@ -619,7 +644,26 @@ class P4Client(object):
619
644
 
620
645
  changelist = self.__ensure_changelist(changelist)
621
646
 
622
- info_dicts = self.run_cmd("reconcile", args=["-c", changelist], file_list=cleaned_folder_list)
647
+ # Build args based on which operations are enabled
648
+ args = ["-c", changelist]
649
+
650
+ # Add flags for specific operations
651
+ if not add and not edit and not delete:
652
+ # If nothing is enabled, don't do anything
653
+ return []
654
+ elif add and edit and delete:
655
+ # Default behavior - reconcile everything (no additional flags needed)
656
+ pass
657
+ else:
658
+ # Specific operations requested
659
+ if add:
660
+ args.append("-a")
661
+ if edit:
662
+ args.append("-e")
663
+ if delete:
664
+ args.append("-d")
665
+
666
+ info_dicts = self.run_cmd("reconcile", args=args, file_list=cleaned_folder_list)
623
667
  return info_dicts
624
668
 
625
669
  @validate_not_empty
@@ -1129,7 +1173,7 @@ class P4Client(object):
1129
1173
 
1130
1174
  return info_dicts
1131
1175
 
1132
- def host_online(self, timeout=0.001):
1176
+ def host_online(self, timeout=2.0):
1133
1177
  """
1134
1178
  Checks if the host for this client is online
1135
1179
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: p4cmd
3
- Version: 2.8.1
3
+ Version: 2.8.4
4
4
  Summary: Simple P4 python module
5
5
  Home-page: https://github.com/nielsvaes/p4cmd
6
6
  Author: Niels Vaes
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