build - How can I prevent submitting an empty Perforce changelist from being an error? -


attempting submit changelist no files considered perforce error (p4 submit ... returns exit code 1). causes periodic integration build fail on our build server (we're using zutubi's pulse system); in case rather have build succeed, possibly warning.

pulse has exit code remapping functionality, perforce not appear disambiguate between failure submit empty changelist , other submit failure (such validation trigger failure, do want fail build).

the obvious (but, in mind, inelegant) solution comes mind wrap execution of p4 submit in batch file first checks see if target changelist empty counting lines of output p4 opened -- or parsing output of p4 submit "no files" message , returning batch file.

are there better techniques handling i'm not seeing?

there no techniques perforce, if understanding problem correctly. issue, have seen, return codes perforce command line runs are, well, ambiguous. submission of empty changelist error? maybe, maybe not - might depend on ask.

it's not advisable @ return codes 'p4' commands. best bet have suggested parse output of command , need there.

most commands support -ztag option (see 'p4 usage'), could make parsing output bit easier, depending on want do. if case, sufficient enough text in output , decide there.


Comments

Popular posts from this blog

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

apache - Add omitted ? to URLs -

php - How can I stop spam on my custom forum/blog? -