p4cmd 2.0.1__tar.gz → 2.0.3__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.
- {p4cmd-2.0.1 → p4cmd-2.0.3}/PKG-INFO +1 -1
- {p4cmd-2.0.1 → p4cmd-2.0.3}/p4cmd/p4cmd.py +24 -1
- {p4cmd-2.0.1 → p4cmd-2.0.3}/p4cmd/p4file.py +6 -0
- {p4cmd-2.0.1 → p4cmd-2.0.3}/p4cmd.egg-info/PKG-INFO +1 -1
- {p4cmd-2.0.1 → p4cmd-2.0.3}/setup.py +1 -1
- {p4cmd-2.0.1 → p4cmd-2.0.3}/LICENSE +0 -0
- {p4cmd-2.0.1 → p4cmd-2.0.3}/README.md +0 -0
- {p4cmd-2.0.1 → p4cmd-2.0.3}/p4cmd/__init__.py +0 -0
- {p4cmd-2.0.1 → p4cmd-2.0.3}/p4cmd/p4errors.py +0 -0
- {p4cmd-2.0.1 → p4cmd-2.0.3}/p4cmd/resources/__init__.py +0 -0
- {p4cmd-2.0.1 → p4cmd-2.0.3}/p4cmd/resources/perforce_DEPOT_ONLY.png +0 -0
- {p4cmd-2.0.1 → p4cmd-2.0.3}/p4cmd/resources/perforce_MOVED.png +0 -0
- {p4cmd-2.0.1 → p4cmd-2.0.3}/p4cmd/resources/perforce_NEED_SYNC.png +0 -0
- {p4cmd-2.0.1 → p4cmd-2.0.3}/p4cmd/resources/perforce_OPEN_FOR_ADD.png +0 -0
- {p4cmd-2.0.1 → p4cmd-2.0.3}/p4cmd/resources/perforce_OPEN_FOR_DELETE.png +0 -0
- {p4cmd-2.0.1 → p4cmd-2.0.3}/p4cmd/resources/perforce_OPEN_FOR_EDIT.png +0 -0
- {p4cmd-2.0.1 → p4cmd-2.0.3}/p4cmd/resources/perforce_UNKNOWN.png +0 -0
- {p4cmd-2.0.1 → p4cmd-2.0.3}/p4cmd/resources/perforce_UNTRACKED.png +0 -0
- {p4cmd-2.0.1 → p4cmd-2.0.3}/p4cmd/resources/perforce_UP_TO_DATE.png +0 -0
- {p4cmd-2.0.1 → p4cmd-2.0.3}/p4cmd.egg-info/SOURCES.txt +0 -0
- {p4cmd-2.0.1 → p4cmd-2.0.3}/p4cmd.egg-info/dependency_links.txt +0 -0
- {p4cmd-2.0.1 → p4cmd-2.0.3}/p4cmd.egg-info/top_level.txt +0 -0
- {p4cmd-2.0.1 → p4cmd-2.0.3}/setup.cfg +0 -0
|
@@ -24,6 +24,7 @@ class P4Client(object):
|
|
|
24
24
|
:param silent: *bool* if True, suppresses error messages to cut down on terminal spam
|
|
25
25
|
"""
|
|
26
26
|
self.perforce_root = perforce_root
|
|
27
|
+
self.silent = silent
|
|
27
28
|
|
|
28
29
|
self.user = user
|
|
29
30
|
self.client = client
|
|
@@ -46,7 +47,9 @@ class P4Client(object):
|
|
|
46
47
|
if self.server is None:
|
|
47
48
|
raise p4errors.WorkSpaceError("Could not find P4PORT")
|
|
48
49
|
|
|
49
|
-
|
|
50
|
+
|
|
51
|
+
# print(self.user)
|
|
52
|
+
# print(self.client)
|
|
50
53
|
|
|
51
54
|
@classmethod
|
|
52
55
|
def from_env(cls, *args, **kwargs):
|
|
@@ -126,6 +129,21 @@ class P4Client(object):
|
|
|
126
129
|
|
|
127
130
|
return dict_list
|
|
128
131
|
|
|
132
|
+
def get_ticket_expiration(self):
|
|
133
|
+
"""
|
|
134
|
+
Get the time in seconds when the current authentication ticket will expire
|
|
135
|
+
|
|
136
|
+
:return: *int* seconds until authentication ticket expires or *None*
|
|
137
|
+
"""
|
|
138
|
+
if not self.host_online():
|
|
139
|
+
return None
|
|
140
|
+
result = self.run_cmd("login", args=["-s"])
|
|
141
|
+
info_dict = result[0]
|
|
142
|
+
expiration_seconds = self.__get_dict_value(info_dict, "TicketExpiration", None)
|
|
143
|
+
if expiration_seconds is not None:
|
|
144
|
+
return int(expiration_seconds)
|
|
145
|
+
return None
|
|
146
|
+
|
|
129
147
|
def get_p4_setting(self, setting):
|
|
130
148
|
"""
|
|
131
149
|
Gets a Perforce setting
|
|
@@ -836,6 +854,11 @@ class P4Client(object):
|
|
|
836
854
|
if other_open in key and key != other_open:
|
|
837
855
|
value = self.__get_dict_value(file_dict, key)
|
|
838
856
|
opened_by.append(value)
|
|
857
|
+
action_owner = "actionOwner" if sys.version_info == 2 else "actionOwner".encode()
|
|
858
|
+
if action_owner in key:
|
|
859
|
+
value = self.__get_dict_value(file_dict, key)
|
|
860
|
+
value = value.decode() + "@" + self.find_p4_client()
|
|
861
|
+
opened_by.append(value.encode())
|
|
839
862
|
|
|
840
863
|
p4file.set_checked_out_by(opened_by)
|
|
841
864
|
|
|
@@ -10,6 +10,8 @@ class Status:
|
|
|
10
10
|
MOVED = "MOVED"
|
|
11
11
|
UP_TO_DATE = "UP_TO_DATE"
|
|
12
12
|
UNKNOWN = "UNKNOWN"
|
|
13
|
+
DELETED = "DELETED"
|
|
14
|
+
MOVED_DELETED = "MOVED_DELETED"
|
|
13
15
|
|
|
14
16
|
|
|
15
17
|
class P4File(object):
|
|
@@ -117,6 +119,10 @@ class P4File(object):
|
|
|
117
119
|
def get_status(self):
|
|
118
120
|
if self.is_marked_for_delete():
|
|
119
121
|
return Status.OPEN_FOR_DELETE
|
|
122
|
+
if self.is_deleted():
|
|
123
|
+
return Status.DELETED
|
|
124
|
+
if self.is_moved_deleted():
|
|
125
|
+
return Status.MOVED_DELETED
|
|
120
126
|
if self.needs_syncing():
|
|
121
127
|
return Status.NEED_SYNC
|
|
122
128
|
if self.is_depot_only():
|
|
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
|
|
File without changes
|