SVNで発生するProject.pbxproj競合問題


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
2つ目は、新しいリソースに追加したり、参照を追加したりすることを、一人の手に制限することです.
...さらに良いことは、スクリプトを書いて処理します::
 
1
2
3
4
5
6
7
8
9
10
11

        
        
        
        
#!/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
1
2
3
4
5
6
7
8
9
10
11

         
         
         
         
#!/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