I have a problem with downloading files from Perforce. I need to use python for it, so p4python
is the best solution i found. Here what I have:
def connect(username, password):
p4 = P4()
p4.port = 'bla.bla.bla.bla:port'
p4.user = username
p4.password = password
p4.client = 'clientname'
p4.connect()
p4.run_login()
return p4
def main(username, password):
try:
p4 = connect(username, password)
p4.run_sync()
p4.disconnect()
except P4Exception:
for e in p4.errors:
print(e)
And it works for me, I get files in my workspace directory. BUT I download files to /tmp
on server, so when I restart it download only files from last revision, not all the files. How can I download all files every time my workspace directory in not fill?