Error while submitting using p4python

809 views Asked by At

I am working with p4python for the first time, running into an issue where i am not able to submit my changes to perforce server. I am able to connect to the server and open files for editing.

change_spec = p4.fetch_change()
change_spec["Files"] = []
change_spec["Description"] = "change by "+p4.user+" of adding dns for network:"+network
ret = p4.save_change(change_spec)
change_number = ret[0].split( )[1]
editServerfiles = ["db/zone-master","db/zone-slave","db/zone-site","db/zones","db/zone-hidden_slave"]
p4.run_edit("-c",change_number,editServerfiles)


<<making subprocess calls to edit the opened files>>


change_spec = p4.fetch_change(change_number)
changedfiles = ["//ssg/dns_generate/main/db/zone-master","//ssg/dns_generate/main/db/zone-slave","//ssg/dns_generate/main/db/zone-site","//ssg/dns_generate/main/db/zones"] #depot files
change_spec["Files"] = changedfiles
change_spec["Description"] = "change by "+p4.user+" of adding dns for network: "+network
print change_spec
p4.run_submit(change_spec)

The change_spec object(see below) before doing a p4_run_submit(change_spec)looks fine but it still complains about no files to submit. Any pointers ???

{'Status': 'pending', 'Files': ['//ssg/dns_generate/main/db/zone-master', 
'//ssg/dns_generate/main/db/zone-slave', '//ssg/dns_generate/main/db/zone-site', '//ssg/dns_generate/main/db/zones'], 'Description': 'change by skameswa of adding dns for network: 172.30.116.0\n', 'Client': 'skameswa.p4dns', 'User': 'skameswa', 'Date': '2017/08/30 14:21:49', 'Type': 'public', 'Change': '2810898'} 



Traceback (most recent call last):
File "dnsaddperforce.py", line 91, in <module>
p4.run_submit(change_spec)
File "/usr/local/pythonbrew/pythons/Python-2.7.9/lib/python2.7/site-
packages/P4.py", line 631, in run_submit
return self.run("submit", *nargs, **kargs)
File "/usr/local/pythonbrew/pythons/Python-2.7.9/lib/python2.7/site-
packages/P4.py", line 609, in run raise e
P4.P4Exception: [P4#run] Errors during command execution( "p4 submit -i" )

    [Error]: "No files to submit.\nSubmit failed -- fix problems above then use 'p4 submit -c 2810898'."
0

There are 0 answers