1

I'm trying to use p4python's run_reconcile() combined with a changelist I have from fetch_change(). The code is something like this:

p4con.client = 'clientName'
p4con.cwd    = '//' + location
changeList   = p4con.fetch_change()
# update some changeList info, but not _files
clNum        = p4con.save_change(changeList)[0].split()[1]
result       = p4con.run_reconcile('-c', clNum, '-e', '-a', '-d')
p4con.run_submit(changeList)

However, I get the error:

P4Exception: [P4#run] Errors during command execution( "p4 submit -i" )
[Error]: 'No files to submit.'
thechao
  • 367
  • 2
  • 13

1 Answers1

1

The issue is the 'run_submit' command. That command submits a changeList, but the reconciled (and numbered) changelist is "just a number":

p4con.run('submit', '-c', clNum)
thechao
  • 367
  • 2
  • 13
  • 1
    The `run_submit` form can be used if you didn't want to do the `save_change` first, but wanted to go directly from a set of files opened in the default changelist, to a submitted change, supplying all the changelist details (e.g., the description, the submit options, the set of files, etc.). Since all those things were already provided by `save_change` in your final step you just needed to provide the changelist number. So a changelist isn't just a number, but it's **identified** by a number. – Bryan Pendleton Jan 11 '18 at 14:36
  • Ok; cool. So, an alternate (valid) sequence would be: p4con.fetch_change(); (edit changelist); p4con.run_reconcile(...); p4.run_submit()? – thechao Jan 11 '18 at 15:00