Reputation: 51
I have downloaded files from a source on to my local in the folder CHANGED_FILES. I want to merge these changes in perforce repo //sw/files/... and add/edit those files appropriately into a changelist 1220
I tried p4 merge -c 1220 -s CHANGED_FILES/ //sw/files which doesn't work. Kindly help me
Upvotes: 0
Views: 88
Reputation: 71454
If you want to have a nice clean merge, here's how to manage it:
1) Branch a version of your local files that corresponds to an ancestor of the source -- for example, if the third party contributor got a snapshot of your source as of the start of the year, branch as of the start of the year, like this:
p4 populate -d "Creating code drop branch." //sw/files/...@2017/01/01 //third-party/CHANGED_FILES/...
2) Check in the modifications to the branch, just as if the third party contributor had checked them in themselves:
p4 sync -k //third-party/CHANGED_FILES/...
(copy the third party work into the CHANGED_FILES folder)
p4 reconcile //third-party/CHANGED_FILES/...
p4 submit -d "Code drop!"
3) Merge from the code drop to your own files.
p4 change
p4 merge -c CHANGE //third-party/CHANGED_FILES/... //sw/files/...
p4 resolve -am
p4 resolve
p4 submit
You can disregard this advice and just do a merge from a plain old baseless code drop, but then you will have baseless merges and your world will be pain. The extra five minutes it takes to set up a base by doing step 1 up front is well worth it.
Upvotes: 1