团队工作时svn冲突xcode项目文件

发布于 2024-10-13 02:03:09 字数 458 浏览 5 评论 0原文

我所在的团队正在开发 iPhone 应用程序(大约 7 人)。我们使用SVN对iPhone代码进行源代码控制,我们不断遇到xcode项目文件和iPhone nib文件的冲突问题。我认为有人提出了关于此问题的问题:如何在 Xcode 中使用 svn 合并冲突(文件project.pbxproj)?。我想问一下是否有人对此提出过令人满意的解决方案。由于我们的团队规模相当大(7 人),每次有人更改代码或向 nib 文件中添加新对象时手动解决 xcode 项目文件中的冲突是巨大的生产力浪费。 Apple工程师在编写自己的iPhone应用程序时是否考虑过这个问题?我一直在使用 Google 和 Bing 寻找令人满意的解决方案,但尚未找到。

谢谢,

I'm working in a team that's developing iPhone application (about 7 people). We use SVN for source code control of iPhone code, we keep running into conflict issues with xcode project file and iPhone nib file. I think there has been a question asked about this problem : How to merge conflicts (file project.pbxproj) in Xcode use svn?. I want to ask if anyone has ever come up with a satisfactory solution to this. Since our team is fairly decent in size (7 people), manually resolving conflict in xcode project file everytime someone changes code, or adding new object into nib file is a huge productivity waste. Has Apple engineers ever thought about this issues when they wrote their own iPhone apps ? I have been looking for a satisfactory solution using Google and Bing, not yet found one.

Thanks,

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

不甘平庸 2024-10-20 02:03:09

这绝对是 xcode 的一个巨大缺陷。我在一个规模相似的团队中,为了使这个过程尽可能轻松,我做了以下工作:

SVN 更新(也总是在签入之前执行此操作):

  1. 退出 Xcode。最快的方法是使用 Alfred 并
  2. 从命令行在项目文件夹中输入“forcequit xcode”“svn up”
  3. 如果您与项目文件有任何合并冲突,请点击“编辑”在 emacs 或任何
  4. 搜索 中打开“======”查找合并冲突;删除该行以及“<<<<我的”和“>>”行
  5. 保存&出口。点击“r”将项目标记为已解决。
  6. 重新打开项目 - “open MyProject.xcodeproj/”

通过一些练习,您可以将这个过程缩短到不到一分钟(我每天都会这样做几次)。

对于 NIB 文件,请勿在其他人处理时进行处理。没有真正的方法可以合并它们。快速进行更改并立即签入(无论如何,需要 2 个人同时处理 NIB 文件的情况并不多)。对于不太复杂的视图,只需以编程方式布置它们即可。

This is definitely a HUGE flaw with xcode. I'm on a team of similar size and here's what I do to make the process as painless as possible:

SVN update (ALWAYS do this before a checkin as well):

  1. quit Xcode. The quickest way to do this is to use Alfred and type "forcequit xcode"
  2. "svn up" in the project folder from command line
  3. If you have any merge conflicts with the project file, hit "edit" to open in emacs or whatever
  4. search for "======" to find merge conflicts; delete that line as well as the "<<<< mine" and ">>>>" lines
  5. save & exit. hit "r" to mark project as resolved.
  6. re-open project - "open MyProject.xcodeproj/"

With a bit of practice you can get this process down to under a minute (I do this several times a day).

for NIB files, DO NOT work on while someone else is working on it. There's no real way to merge them. Make your changes quickly and check in right away (there aren't many cases where 2 people need to work on a NIB file at the same time anyway). For less complicated views, just lay them out programmatically.

谎言月老 2024-10-20 02:03:09

尝试安装 SourceGear DiffMerge。这是一个合并工具,可以使合并更改变得更加容易。另请参阅这篇关于配置 XCode 的博客文章使用 DiffMerge

Try installing SourceGear DiffMerge. This is a merge tool that should make it a lot easier to merge the changes. Also see this blog post about configure XCode to use DiffMerge

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文