在SVN中发生的Project.pbxproj冲突问题

来源:互联网 发布:c语言用数组求回文数 编辑:程序博客网 时间:2024/04/29 08:45

The project.pbxproj contains all of the metadata about your project that Xcode uses to build it; the settings, the file references, configuration, targeted platforms, etc...

I.e. it is a critically important.

There really isn't a great answer for this. Typically, teams will avoid conflict by limiting edits to the project to one team member at a time.

The Xcode team has put a lot of effort into making the file merge-friendly. In managing several large projects via svn, I've generally found that the merges are automatic and painless.

Until they aren't. And when they aren't, revert, merge changes by hand (i.e. make the changes in the project that conflicted), and move on.

..

..

总结就是 xcode在往好的地方发展,如果通过xcode的git,那么xcode会努力处理好,merge

第二个就是,对于加入新资源,添加引用之类的事情,要限制在一个人手里..

...更有好事者,写了脚本来处理:::



 
1234567891011
#!/bin/sh

projectfile=`find -d . -name 'project.pbxproj'`
projectdir=`echo *.xcodeproj`
projectfile="${projectdir}/project.pbxproj"
tempfile="${projectdir}/project.pbxproj.out"
savefile="${projectdir}/project.pbxproj.mergesave"

cat $projectfile | grep -v "<<<<<<< HEAD" | grep -v "=======" | grep -v "^>>>>>>> " > $tempfile
cp $projectfile $savefile
mv $tempfile $projectfile


...

...


embed 
raw
1234567891011
#!/bin/sh

projectfile=`find -d . -name 'project.pbxproj'`
projectdir=`echo *.xcodeproj`
projectfile="${projectdir}/project.pbxproj"
tempfile="${projectdir}/project.pbxproj.out"
savefile="${projectdir}/project.pbxproj.mergesave"

cat $projectfile | grep -v "<<<<<<< HEAD" | grep -v "=======" | grep -v "^>>>>>>> " > $tempfile
cp $projectfile $savefile
mv $tempfile $projectfile
原创粉丝点击