Perforce merge changelist

若如初见. 提交于 2019-12-12 10:47:37

问题


I am facing an issue of merging due to bad scm practices followed. I gave a build off of a perforce branch when the latest changelist # was, lets say, 1000. Now after the dev team has submitted many more changelists the latest changelist # is 1050. Issue is that smoke test on the build failed and now I fixed it and submitted a changelist # 1051.

My question is there a way to somehow merge the change made in 1051 into 1000. Or in other words create a build with all the changes upto changelist # 1000 and including only changelist # 1051 as well.

I hope I was able to explain the issue in a way that makes sense.

P.S: I know the concept of Main, Release, and Dev branches. Somehow now I am in this mess of giving a build off of the dev branch and looking for a solution.


回答1:


One way is to create another branch, as in:

  1. p4 integ //depot/build/branch/...@1000 //depot/bugfix/branch/...
  2. p4 submit
  3. p4 integ //depot/build/branch/...@=1051 //depot/bugfix/branch/...
  4. p4 resolve
  5. p4 submit

Now build //depot/bugfix/branch and give that to your test team.




回答2:


Try

  1. p4 sync //depot/branchname/... @1000
  2. p4 sync //depot/branchname/... @1051,@1051

This tells perforce, sync the workspace to changelist 1000. Then 2 says sync all files from changelist 1051 to 1051, basically it means only sync the changes that are in changelist 1051. You can use p4v as well

  1. Right click on //depot/branchname and Get Revision, then type in 1000 as the changelist.
  2. In the submitted tab on the right, right click on 1051, Get Revision. Click tha add button to add //depot/branchname, type in 1051 as the changelist, and then check the "only get files listed in this changelist" checkbox.


来源:https://stackoverflow.com/questions/6158916/perforce-merge-changelist

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!