p4cmd 2.4.8__tar.gz → 2.4.10__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.4.8 → p4cmd-2.4.10}/PKG-INFO +1 -1
- {p4cmd-2.4.8 → p4cmd-2.4.10}/p4cmd/p4cmd.py +19 -18
- {p4cmd-2.4.8 → p4cmd-2.4.10}/p4cmd/p4file.py +16 -1
- {p4cmd-2.4.8 → p4cmd-2.4.10}/p4cmd.egg-info/PKG-INFO +1 -1
- {p4cmd-2.4.8 → p4cmd-2.4.10}/setup.py +1 -1
- {p4cmd-2.4.8 → p4cmd-2.4.10}/LICENSE +0 -0
- {p4cmd-2.4.8 → p4cmd-2.4.10}/README.md +0 -0
- {p4cmd-2.4.8 → p4cmd-2.4.10}/p4cmd/__init__.py +0 -0
- {p4cmd-2.4.8 → p4cmd-2.4.10}/p4cmd/p4errors.py +0 -0
- {p4cmd-2.4.8 → p4cmd-2.4.10}/p4cmd/resources/__init__.py +0 -0
- {p4cmd-2.4.8 → p4cmd-2.4.10}/p4cmd/resources/perforce_DEPOT_ONLY.png +0 -0
- {p4cmd-2.4.8 → p4cmd-2.4.10}/p4cmd/resources/perforce_MOVED.png +0 -0
- {p4cmd-2.4.8 → p4cmd-2.4.10}/p4cmd/resources/perforce_NEED_SYNC.png +0 -0
- {p4cmd-2.4.8 → p4cmd-2.4.10}/p4cmd/resources/perforce_OPEN_FOR_ADD.png +0 -0
- {p4cmd-2.4.8 → p4cmd-2.4.10}/p4cmd/resources/perforce_OPEN_FOR_DELETE.png +0 -0
- {p4cmd-2.4.8 → p4cmd-2.4.10}/p4cmd/resources/perforce_OPEN_FOR_EDIT.png +0 -0
- {p4cmd-2.4.8 → p4cmd-2.4.10}/p4cmd/resources/perforce_UNKNOWN.png +0 -0
- {p4cmd-2.4.8 → p4cmd-2.4.10}/p4cmd/resources/perforce_UNTRACKED.png +0 -0
- {p4cmd-2.4.8 → p4cmd-2.4.10}/p4cmd/resources/perforce_UP_TO_DATE.png +0 -0
- {p4cmd-2.4.8 → p4cmd-2.4.10}/p4cmd.egg-info/SOURCES.txt +0 -0
- {p4cmd-2.4.8 → p4cmd-2.4.10}/p4cmd.egg-info/dependency_links.txt +0 -0
- {p4cmd-2.4.8 → p4cmd-2.4.10}/p4cmd.egg-info/top_level.txt +0 -0
- {p4cmd-2.4.8 → p4cmd-2.4.10}/setup.cfg +0 -0
|
@@ -51,7 +51,6 @@ class P4Client(object):
|
|
|
51
51
|
if self.server is None:
|
|
52
52
|
raise p4errors.WorkSpaceError("Could not find P4PORT")
|
|
53
53
|
|
|
54
|
-
|
|
55
54
|
@classmethod
|
|
56
55
|
def from_env(cls, *args, **kwargs):
|
|
57
56
|
"""
|
|
@@ -116,23 +115,24 @@ class P4Client(object):
|
|
|
116
115
|
if len(command) > MAX_CMD_LEN:
|
|
117
116
|
# This shouldn't happen, but just in case the command prefix end up really long
|
|
118
117
|
logging.warning(f"Command length: {format(len(command))} exceeds MAX_CMD_LEN {MAX_CMD_LEN} on command: {MAX_CMD_LEN}")
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
118
|
+
|
|
119
|
+
with subprocess.Popen(command, stdin=subprocess.PIPE, stdout=subprocess.PIPE, shell=True) as pipe:
|
|
120
|
+
output = pipe.stdout
|
|
121
|
+
try:
|
|
122
|
+
while True:
|
|
123
|
+
value_dict = marshal.load(output)
|
|
124
|
+
dict_list.append(value_dict)
|
|
125
|
+
except EOFError:
|
|
126
|
+
pass
|
|
127
|
+
except ValueError as error:
|
|
128
|
+
output_dict = {
|
|
129
|
+
"command": command,
|
|
130
|
+
"code": "error",
|
|
131
|
+
"error": str(error),
|
|
132
|
+
"raw_output": subprocess.check_output(command, stderr=subprocess.STDOUT, shell=True)
|
|
133
|
+
}
|
|
134
|
+
dict_list.append(output_dict)
|
|
135
|
+
pipe.kill()
|
|
136
136
|
|
|
137
137
|
return dict_list
|
|
138
138
|
|
|
@@ -869,6 +869,7 @@ class P4Client(object):
|
|
|
869
869
|
|
|
870
870
|
try:
|
|
871
871
|
sock = socket.create_connection((host, port), timeout=2)
|
|
872
|
+
sock.close()
|
|
872
873
|
return True
|
|
873
874
|
except:
|
|
874
875
|
return False
|
|
@@ -211,4 +211,19 @@ class P4File(object):
|
|
|
211
211
|
return self.__last_submitted_by
|
|
212
212
|
|
|
213
213
|
def set_last_submitted_by(self, value):
|
|
214
|
-
self.__last_submitted_by = value
|
|
214
|
+
self.__last_submitted_by = value
|
|
215
|
+
|
|
216
|
+
def __eq__(self, other):
|
|
217
|
+
if not isinstance(other, P4File):
|
|
218
|
+
return NotImplemented
|
|
219
|
+
|
|
220
|
+
private_attributes = [
|
|
221
|
+
'_P4File__local_file_path', '_P4File__depot_file_path', '_P4File__last_submitted_by',
|
|
222
|
+
'_P4File__have_revision', '_P4File__head_revision', '_P4File__checked_out_by',
|
|
223
|
+
'_P4File__last_submit_time', '_P4File__action', '_P4File__raw_data', '_P4File__head_action'
|
|
224
|
+
]
|
|
225
|
+
|
|
226
|
+
for attr in private_attributes:
|
|
227
|
+
if getattr(self, attr) != getattr(other, attr):
|
|
228
|
+
return False
|
|
229
|
+
return True
|
|
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
|