[perforce] Submit what you can and skip the errors?

This is a common P4 headache for me:

I have a large change list of maybe 100+ files.
I submit it and maybe 3 files generate some error

The whole submit aborts, leaving me to hunt through and uncheck each error causing file in P4

Is there some way to tell P4 to just Submit what works
and skip the error causing files
then tell me what individually couldn’t submit?

I’m not aware of any way to do that.

Are you doing this in p4v, from the command line, or using the p4 api?

If you have perforce split the changelist for you on submit then surely you’re making a change which cannot have been tested. What if a file which does not generate an error depends on a file which does?

I don’t think you can do this in p4v or the command-line. It kinda goes against the atomic nature of changelists.

You can do a pre-check if you’re using the API by running over the contents of the changelist and making sure they’re not locked or checked out to other people, and then split out the bad ones into a separate change list . It’s definitely a script you’d have to write, not a one shot command line.

I was just wondering about doing it via P4.
I can understand the wisdom of failing out when one item in a big list changes
but these are not code chunks, just art assets.
the failure errors are typically " file could not be found" as a result of having deleted something old from unity.

dupe

You could try doing a p4 reconcile before submitting, that will go through and align your changelist to your current workspace status.

So files deleted from your workspace still in the depot will get marked for delete, new files will get marked for add, and editted files well get checked out. This works even if you checked a file out, and then deleted it, but forgot to mark the file itself for delete. It will sometimes even detect when you’ve done a move/rename, but it isn’t perfect on that one.

Not sure exactly how the command works from the commandline, but in P4V it pops up a separate window and asks you about what you want to do for each detected file.

I’d not run it against your entire workspace, as it can be rather slow if you’ve got a lot of files, but running it against a directory that you know you’ve been monkeying around in can be helpful. Especially when using something like Unity that loves to ignore read/write locks on files.