Pergunta

I want to create a numbered changelist in my Jenkins job, add files to that changelist and submit that changelist.
In jenkins I can get changelist number by using %P4_CHANGELIST%.
I am adding file to changelist like this p4 edit //abc/xyz.txt -c %P4_CHANGELIST%.
And submitting like this p4 submit -c %P4_CHANGELIST%.
While submitting output says that changelist number is already commited.
Change 100378 is already committed.
Basically, I need a numbered changelist which is not already taken so that I can add my files to this numbered changelist and submit.

Foi útil?

Solução

You mix up things. Jenkins gives you the latest change that led to the build with %P4_CHANGELIST%. But with the perforce command p4 submit -c changenumber you tell perforce to submit a (yet unsubmitted) change. That cannot work.
Obviously you want to submit a completely new change. For that you don't need to refer to any existent changenumber. You just do:

p4 edit //abc/xyz.txt 
p4 submit -d "description"
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top