perforce

p4 - How to make one directory in depot exactly match another?


I have two directories in a depot with their own revision history, A/ and B/, with no or partial integration history linking the two. I need to make directory B/ exactly match directory A/, including deleting files that exist in B/ but never existed in the depot in A/.

Is there a straightforward way to do this with built-in p4 commands? (Or p4v if not.) I'm really looking for a way to do this in a single changelist to avoid breaking the depot by first deleting everything in B/.


Solution

  • The p4 copy command is for doing exactly this.

    p4 copy A/... B/...
    p4 submit