I have a branch in Perforce on which I have checked in changes to several thousand files, and then later backed out the changes to approximately half of those files - so the latest revision of some of the files on the branch is unchanged from the baseline, but there are intermediate revisions with changes.
In many cases there have also been out-merges from mainline in the meantime, so the history is a bit more complicated, but the eventual result is that there are no content changes left to merge back to mainline.
I now want to merge that branch to mainline, but I don't want to check in "null" changes to the files that in the end were not modified on the branch.
Normally one can avoid checking in unchanged files with "Revert unchanged files" in p4v, but in this case it won't revert the files, because it believes that the file needs to be checked in to update the integration record. The help for p4 revert
confirms this:
The -a flag reverts only files that are open for edit or integrate and are unchanged or missing. Files with pending integration records are left open. The file arguments are optional when -a is specified.
Is there any way I can avoid checking these files in without going through them one by one? I'm happy to do whatever is necessary on the branch, and I'm not too worried about it it causes future merges to the branch as I will be abandoning it soon after this merge.