According to the API guideline https://www.perforce.com/manuals/v15.1/dvcs/_specify_mappings.html
It seems that I can only specify a one-to-one mapping. Is there any way I can specify a mapping with two sources into one destination?
For example:
//stream/main/... //depot/main/...
//stream/build/... //depot/main/...
Branch mappings are one-to-one. If you want to integrate multiple sources into one target, you need multiple branch mappings and multiple integrate commands. (I would recommend multiple submits as well; it is technically possible to squash multiple integrations into one submit but it multiplies the complexity of the conflict resolution process.)