0

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/...
rj487
  • 4,476
  • 6
  • 47
  • 88

2 Answers2

1

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.)

Samwise
  • 68,105
  • 3
  • 30
  • 44
  • Thanks, it's much harder than I thought – rj487 Jul 17 '20 at 15:44
  • Does `//stream/build` not get merged into `//stream/main`? If it does, there's no reason you'd need to merge the two into `//depot/main` separately. (If it doesn't, why doesn't it? As a general rule everything is supposed to get merged back to the mainline.) – Samwise Jul 17 '20 at 16:40
0

YMMV, but pretty sure that after 2004.1, you should be able to use the + syntax to append rules instead of overwriting, like:

//stream/main/... //depot/main/...
+//stream/build/... //depot/main/...

Here is the associated reference on perforce views

J. Paulding
  • 494
  • 3
  • 9