开发者

Subversion, xcode and problem with project.pbxproj

开发者 https://www.devze.com 2023-01-08 05:52 出处:网络
We use subversion to keep track of our code, just sharing code between us two. However we encounter a problem when we both add or remove file at the same time before the next commit. It seems that whe

We use subversion to keep track of our code, just sharing code between us two. However we encounter a problem when we both add or remove file at the same time before the next commit. It seems that whenever we mess with Groups & Files, project.pbxproj under the project package will be modified and subversion cannot take care of that. As a result the project cannot be opened.

My guess is that project.pbxproj keep track of how groups and files are arranged. How do 开发者_StackOverflow社区I make this work under Subversion? It is a text file, but somehow it's doesn't seem to be treated as such.


First, "Project.pbxproj" is a kind of file which keeps track of your XCode bundle updates such as any new file added, deleted, moved.

So you must have to commit this file when you are committing your source code.

If You couldn't open the project after updating, it is because your "Project.pbxproj" file got conflicted with the previous commit. So you have to resolve the issue by opening & editing it.

Usually when a conflict happens SVN adds 3 extra files.

  1. your conflicted file.
  2. your own file. (.mine)
  3. latest committed file in svn.
  4. an old versioned file on top of which you worked.

You need to compare and resolve the issue manually.

Other better way is, Keep latest committed file & remove conflicted, your own file & old version file. Rename the latest committed file as project.pbxproj

Now you can open the xcode project as the conflicted file is removed.

Just make sure you add & remove files previously you have done between last commit & conflict, to the target. Now, the latest commit file will have your changes in project. You can commit the project now to your Repository.

Hope it makes sense.


Firstly, is the .pbxproj file getting corrupted, or is it that the changes you make are not correctly reflected in it? (ie if you remove a file, but do not have the update in the .pbxproj file, does it refuse to load?)

If the .pbxproj file is text, you can tell subversion to store it as such by setting the svn:minme-type property.

Setting it to a text type will give you better merging, so whoever commits first save his changes, then when the other updates his working copy, the changes will be merged into the file. You should review changes when a merge occurs, even though subversion is good at this, its only a computer process and will not do what you expected occasionally.

0

精彩评论

暂无评论...
验证码 换一张
取 消