English 中文(简体)
寻找替代模式的最佳做法、分支和社会方面[封闭]
原标题:Looking for tips about SubVersion s best practices, branching and the social aspect [closed]
Closed. This question is opinion-based. It is not currently accepting answers.

My team and I currently use Perforce for revision control. We used to submit everything into trunk until one day we needed to add several items into the program, so we created a branch for my boss and a branch for me and another branch for testing. Everything works well until we tried to merge the branches back to trunk. We Visual Studio (VS) and it generates solution files that for some reason, it doesn t work well with Perforce. After a lot of effort, we partially merged the branch into the trunk. I’m thinking to move to subversion. I have Subversion in my local pc and I have no issues with Visual Studio branching and maintenances. I suggested to my boss to move to SVN. While my boss is open to the idea to move half a million of line of code, I need to build a strong case for it. I’m the youngest-recent-grad-programmer, so let say that my ideas need more beef than the others =)

我决定在我们的服务器中安装SVN,并通过该代码。 我们不会很快地摆脱武力,但我的目标是以非常缓慢的方式杀害它,并vert弄我的团队人物如何容易使用特别志愿人员,我已经在我的船上有一人。

Since I would be able to configure SVN from scratch, I want to apply the SVN’s best practices. I read the red-bean book and I’m planning to follow their repo’s layout and their backup tips, but I have more questions related to social and branching issues. Below are my questions for social issue,

  1. 是否有办法以社会方式防止来源冲突? 如果是的话,交流相互矛盾变化的最佳方式是什么?

  2. 我也计划安装一个计算机监测系统,安装到该服务器中。 因此,我的团队可以撰写或告知他们有分支机构等,但我不知道是否有其他工具追踪我们项目的历史健康和丑闻。

  3. 尽管我的公司采用统一管理办法,但像我这样看一看,如何说服或强制向高级方案人员进行社会交流,同时又不打破无形的“高级”等级?

分配和标记

  1. 我不想让其他团队在该方案中加入“Hello, World!” 。 我想将分治视为普通的东西。 谁能给我一条在何时增设分支的 rule? 何时合并?

  2. 在什么情况下,分支是一个好的想法?

  3. 就标记而言,我的理解是,标记象征着方案的一个静态点(即:1.0、2.5)是正确的?

  4. 如果我设立一个分支机构并开始撰写我的变动,我的团队结业者是否开始从我的事务部门进行总结? 或者他们是否仍在干线上发展? 或者,它们是否为自己设立了另一个分支?

我对我的所有问题表示歉意,但在修订控制方面,我感到,我在BP清理期间冲淡了墨西哥的鸿沟。

最佳回答

尤其令:

  • Your best defense against excessive conflicts is a well-designed project. DRY code that separates concerns makes it possible to implement changes without tearing apart the entire project. If a change in core code requires updates in 50% of your source files, conflicts will be common.
  • When you make a change, tread lightly. Don t refactor a function that isn t part of your change requirements just because you don t like the look of it. It s perfectly reasonable for two developers to make changes to the same source as long as they re working on different concerns. SVN merging works very well as long as you re not trying to merge the same change implemented twice by different developers. Make refactoring part of a change plan.
  • Evaluate tools that sit on top of SVN and give your team another perspective on code changes. Trac and Fisheye are examples.
  • Judiciously use hook scripts to send out notifications or update a project wiki. This works better than reminding people to send notifications manually. Keep in mind, if you notify too often people will ignore your notifications.
  • Consider continuous integration so developers are given immediate feedback on their changes. Hudson is a nice tool that integrates with SVN. Continuous integration tools sometimes include integration to social tools as well. Hudson s build notifiers are examples.
  • Branches work well for changes that don t fit in a single release development cycle or when the changes will break the project for the rest of the team (always branch versus wait for weeks to check in). Opinions differ on when to branch. Just be sure your team agrees on an approach so the results are consistent.
  • Tags are used differently by different teams but by version number or release sounds reasonable.
  • Only the developers working on a branch s features should work in that branch.
  • Merge early and often from trunk to branch. This makes the final merge back to trunk much easier.
  • As long as you re making a change, evaluate distributed version control systems like Git or Mercurial before you make a decision.
问题回答

我实际上像Perforce一样,我认为Perforce在跟踪合并情况方面比颠覆工作做得更好,但与Perforce存在几个问题,一个是将其与第三方工具——特别是视像素。 而且,这(再加上开发商实际上不喜欢这么多)使许多地点难以建议。

如果你再次提出开始转用的理由,我可以说,你的最佳策略是融入你目前的工具,以及颠覆与其他第三方工具的融合点。

下面是我所打的几点:

  • Subversion s integration with VisualStudio is cleaner and simpler.
  • Subversion integrates into more third party tools. Part of it is that Subversion is simpler and cleaner. There are no views. You don t have to mark files for editing. You can create a working directory anywhere you want. Part of it too is that Subversion is more popular, so most third party tools realize that if they want a shot at being used, they have to integrate with Subversion.

你们还可以指出颠覆与武力之间的相似之处,而你喜欢的关于武力的特征正在颠覆之中:

  • Both Perforce and Subversion practice interfile branching. That s Perforce s term for using directories as branches.
  • Both Subversion and Perforce use change lists/change sets (whatever term you use). In Perforce, change sets are in addition to the file versioning. In Subversion, the repository revision is the change set.
  • Both Subversion and Perforce practice atomic commits.

最佳做法超越了工具,特别是版本控制系统。 你们需要有缺陷的跟踪工具、持续的建筑系统和释放存放处。 最佳做法是沟通和信任:

  • Do you trust your build system?
  • Can you reliably create the build over and over?
  • Do you know what went into your build?
  • Does the QA team know what to test? Do they know what defects were fixed in a particular build?
  • Do the developers know what defects were found?
  • Do your developers know what features they should be adding, or the defects they need to fix?
  • How do you know if a particular build has been approved for release?

If you can show how you plan to answer these questions, you can build a strong case for your plans. Show how Subversion fits into these plans. Show how it works better with VisualStudio and how it will make the developer s job better.

我高度建议,如果你重新建造,请看。 NET指。 (我假定,你通过开放视像和点击F5或建造任何东西来进行正式建设。) 如果你不这样做,你就会走在我所看到的90%的视像场前面。 然后,请将Hudson 作为你的连续建筑服务器。 赫德森也可以充当释放存放地,因为它能够储存建筑工艺品。 这意味着人们可以轻易地进入官方建筑。

重要的是,通过Hudson方案,你可以打上官方释放、tag等的标志。 它与Jira、Tra、Bugzilla、MantisBT和其他数十个缺陷跟踪系统合并。 它还与Redmine

想法是确定这些问题,确定解决办法,并展示颠覆等工具如何适合它们。

认为“最佳做法”只是一种可以反复实施的单一方法。 它为了解你的项目提供了一种途径。 它确保每个人都知道正在发生什么。 它确保每个人都对这一进程完全信任。 它确保你确切了解你产品中的内容。

各种类型的“hints:人们重复并超越最佳做法: 抗药性、早期发现缺陷、使一切自动化、变幻无常的发展、带小ites子而不是进行大规模改变、不破坏建筑等等。 但是,这些只是达到目的的手段。 牢记大局。

我还认为,向使用这些工具的人出售这些工具是绝对重要的,也许你认为这种优势对开发商来说是巨大的。 开发商希望能够拿到他们所需要的档案,进行修改,并检查其变化。 无论他们是武力还是颠覆还是恐怖主义。 他们不关心变化或原子检查。 他们不关心互联网的分支。 他们只是想知道他们重新审视了正确的档案,如果他们作出改变,就会兑现。 如果你再出售颠覆活动,你会告诉开发商如何改进工作,使其生活更加容易。

事情也很简单。 与SCM的联系最好。 如果人们发现这一进程是艰巨的,他们就会尽自己的最大努力来完成这一进程。

灵魂只是从你的问题中引出的;) 试图避免在做事时损失太多的东西。

回答这些问题。

<>>? 如果是的话,交流相互矛盾变化的最佳方式是什么?

我知道,在这项工作相互融合(合并)之前,没有任何主流源控制软件就可能相互矛盾的工作发出执行良好的通知。 除了DRY和C. 结 论orbin 3月提到的关切分离之外,我认为,“日复一日”、“日报”、“承诺往往”和“晚餐”(见下文)是面包和utter。

提前交割是有限度的。 免税和依赖你的双轨制/任务安排制度,只应当承诺完成全部的工作。

确实,在你遇到无法解决的源性冲突时,要求帮助的社会技能并不多。

<>I'm Planning tostaling a C. 结 论MS as well.<>2.。 因此,我的团队可以撰写或告知,他们有分支机构等,但我不知道是否有其他工具追踪我们项目的历史健康和丑闻。

This sounds like a pretty "distributed" approach. Not as in location but as in responsibility. You are creating software products and do some sort of release occasionaly do you? Therefore responsibility should increase and focus the further "downstream" it gets. The only branches the whole team should be familar with are the release branches for fixing things (no features there) and your mainline (trunk). All other things, feature-branches, integration branches, "backup" branches, private branches etc. are to be managed by those requesting or enforcing them. Why should you or colleague "A" care that colleague "B" branched the mainline to develop his experimental feature in peace? C. 结 论olleague "B" by developing something groundbreaking, has the responsibility for his branch and to keep it C. 结 论OMPATIBLE with the mainline. Either constantly by merging changes from the mainline to his branch or before reintegration of his new code. Research integration branches if you want to know more.

工具。 在特别志愿人员(Jira, trac, mantis, Redmine )内完全融合的任何助推器都应从事这项工作。 但我不理解这个问题的这一部分与你的冲突问题有何关系。

3.。 即使我的公司采用统一管理办法,那么,我能如何说服或强制向高级方案人员进行社会交流,而不打破无形的“高级”等级?

我认为,你高估了在油井工作流程中所需的通信量。 你提到的情况表明,你公司缺乏工作流程,你在根本上与冲突作斗争(见1和2),在你看来,这增加了沟通的必要,可能会造成不必要的高间接费用。 可能仍然值得考虑的是,有一套C. 结 论MS或某种“I work here”旗帜化系统。

You indicated that some senior developers do not like to talk or socialize so much even in conflict cases where better they should. Don t let them get away with this by doing merges for them. Merges should be done by branch-owners. When conflicts aris, at least one of the conflicting sides has to decide upon the changes. Ideally both sides sit down on the diffs together but not a third party initially uninvolved with the source in question. Failure in conflict solving (selecting the wrong changes) might result in build breakage or, even worse, undetected bugs. People need to be aware.

如果高级开发商“A”(将主线的改动并入其分支)处理冲突,而没有与主要变化与其相冲突的高级开发商“B”交谈,那么担任调解人并不容易。 如果它不喜欢为你越过一条线,则试图与B开发商交谈,说服他接近A,以便更快地解决冲突,减少错误。

But again in the end it is developer "A" s responsibility, not yours. You seem to give an example already to your co-workers. If that is not enough, try to carefully point out that not enough communication was the reason for a broken build when it happens. Maybe talk to one senior in private about your thoughts, be open but not accusive. A "we could to better" sounds nicer than "You guys are doing it wrong". And for you as a younger professional, sentences like "I would feel better about my code if you tell me when it conflicts with yours" might be more appropriate than "You should ask for a second pair of eyes from the right person when you get conflicts", even though the later is more straightforward.

如果这一切都无助于,你可以考虑与你或团队领导讨论你面临的障碍。 如果他不是ool子,他将听。

www.un.org/Depts/DGAC. 结 论M/index_spanish.htm 分配和标签

<>1.>,我不想让其他团队在节目中加入“Hello, World!” 。 我想将分治视为普通的东西。 谁能给我一条在何时增设分支的 rule? 何时合并?

合并见问题4。

For Branching: You are perfectly right with trying to have as few branches as necessary. Branching comes at a price. C. 结 论omplexity, merging overhead etc. I tend to stick to "branch on incompatible policy". What policy you ask? Each of your main branches should have a set of documented rules attached to them.

实例:

  • tag-2.0.4
    • no commit allowed
  • release-2
    • only fixes for existing features allowed
    • checkins should have release-quality
  • trunk
    • must compile/validate
    • Extending developed API allowed
    • renaming and deleting API prohibited
    • only complete bugtracker-issues
    • receives merges from release branches
  • feature-apirefactoring
    • may alter the developed API and break compatibility
    • pulling merges from trunk is feature-developers task

你们看到有3个有活力的部门和一个分支。 “地位-收益”是正确应用的“不相容政策”的一个例子。

应利用各处来减少风险和提高效率,分拨不同类型的发展活动。 分支政策单独界定了哪些发展和风险潜力是可以接受的。 • 要求你的tru子更加稳定? 界定新的政策“不采用W3C. 结 论有效器警告”。 如果开拓性的发展工作为了效率而必须打破这一规则,或提供快速的观念证明(我们先放弃,后再清理),那么,它就成为自己分支的良好候选国。

每当你或同事感觉到有人敦促打破一条规则,因为如果NOT遵守某项政策更为简单或更安全,那么你就会讨论一个分支的形成。

2. In what case branching a branch is a good idea? answered above I think :).

一些实例 我碰到:

  • Branch stable branch from trunk when release gets prepared (no new features)
  • Branch integration branch from feature-branch when integration is too complex and time consuming
  • branch a "special edition" release branch from an allready stable release that has some exclusive features or certain possibly unstable differences for a special customer.
  • branch a translation-branch from your trunk that gets only wording changes and therefore can not break

另有十几个。 你的政策越受重视,你的分行越是令人 ex。

3. For tagging, my understanding is that tag symbolize a static point of the program ( ie : v1.0, v2.5) is that correct?

是的。 对于颠覆行为,可将其描述为其他内容。 “/tags/1.7.2”可以是项目的状况,因为它正在修订30932。 当某些释放准备就绪时,你可以指出修订数目,并将新的来源进行比较,或对这个较老的国家进行核查。 或者,你可以更容易地记住标签。

颠覆的标签也只不过是一个不接受任何承诺的分支。

<>strong>4.If I establish a Branch andstart written my change, should my team-matesstart syncing from my Branch? 或者他们是否仍在干线上发展? 还是应该为自己设立另一个分支?

简短回答: 当你不知觉时,就使用该空白,根本不合并(合成、推、拉)。

长期回答: 在一个理想的世界里,没有必要设立分支机构,因为所有开发商都在当场提供团队检查的所有变化。 在一个理想的世界里,这些变化不会与任何发展者自己不做的工作发生冲突。 无论在我的理想世界内进行什么发展者检查也是完全正确的,没有缺陷和 gl。

Alas,一个编程世界并不完美。 因此,你设立了分支机构,防止您的同事做些改变,或孤立你们的改变,以防出现干净的主线,有时是两者。

The direction of the flow of change (Your co-workers pull from you or you pull from your co-workers) depends on the riskyness expected in a branch. How much risk would it be to "pull" (merge) changes that get checked in to a release-branch? Looking at the policies defined above it should be bugfixes only. The risk seems low. For most release-branch scenarios merging from them into the turnk is absolutely necessary as you would have to refix the bugs by hand before the next release-branch gets created from your trunk.

打破你自己的宝贵工作,或不得不改变自己的法典,多少风险在于把从主角的改动合并到你对tru的检查? 您可以发展新的功能,加强由您共同工作的团队,以完成新的执行方式取代专题处。 这可能会杀 mo。

<>http://www.un.org

我认为,首先提到“难民”规模的是聪明的人。 http://www.perforce.com/perforce/conferences/us/2005/presentations/Wingerd.pdf”rel=“noreferer” http://www.perforce.com/perforce/conferences/us/2005/presentations/Wingerd.pdf

除每个分支的政策外,你还估算了“肯定”和“庇护”的比例。

A feature branch is "soft" as it is in constant flow, not well tested and mostly far away from any paying customer s eyes. It is therefore also more able to absorb changes. If things break you want them to break in "softer" branches.

你的tru子将是“中等”,因为它不是能够释放的,而是比一些偏远的特征部门更好的测试。 (单单单是因为更多的开发商对中继器进行检查,而不是对地分公司进行检查。) 如果不进行适当的整合,如果干线上出现巨大的相容性变化,可能会使开发商脱轨,但正常规模的核对会大大降低。

排放分部门是“最肯定的”分支,因为它们是完善的、经过测试的,有时是仅仅在生产使用时间之外。 如果你打破这种“葬礼”的话,那就是一个更大的痛苦。 另一方面,你对你在这个部门所交付的东西有更好的感觉,对它运作良好的信心(如果没有经过联合测试的证据)也更高。

您应命令各分支机构在难民规模上采取立场。 顶端公司软件。

  • tags (very firm)
  • release-2 (firm)
  • trunk (medium)
  • feature-apirefactoring (soft)

最佳实践言语是Mergedown, 制版”,

Even better "Merge down, C. 结 论opy up at stable state"

合并:

  • All commits that went in release-2, you should merge into the trunk as often as possible. (Bugfix-committer should do this)
  • All commits into the trunk, including merged down fixes from release branches, you should merge into your feature-branches as often as possible. (Feature-Owner should do this)

“选择”

  • When work in a feature-branch is complete "reintegrate" it. Use the SVN --reintegrate merge or do a last merge down into the feature branch and then copy all relevant files. --reintegrate merge is highly recommended.
  • When you decide it is time to stabilize your trunk and target a new release soon, you branch your trunk into a new "release-3" for example. In SVN branching is copying and vice versa.
  • When your release is bugfixed, tested and working well enough you again copy up into a new release tag

最后但并非最不重要的是阅读了这一最佳做法文件。 页: 1 http://www.perforce.com/perforce/papers/bestpractices.html。

• 搜索中继流,或看我对更名为SVN-releated Q &的描述;A。

Oh,知道你如何成功实现你的美好抱负,是空洞的。

有一个月

C. 结 论

虽然颠覆是一种ice的工具,但其强点当然是mer。 这主要是因为颠覆没有跟踪合并的机制——你不能在合并的历史上看到这种机制。

因此,我建议要么使用一种能够适当支持合并的版本控制系统,要么不这样做。 你们拯救了很多痛苦。 rel=“nofollow noreferer”>Git 目前似乎最受欢迎(见)。 视觉演播室集成 视窗的传输。 然而,,Mercurial ,Bazaar, 而类似情况也是可行的选择。

这些工具可能比先天更复杂,但如果你希望定期投入使用和合并,就会有价值。

但是,即使有了这些工具,如果一个分支的寿命已经足够长,就很难合并。 世界上没有任何工具帮助你们。

因此,如果你真的需要投入,或者如果你刚刚与SVN(或武力)打交道并与之生活,就很难想象。

不进行分化和合并,可能比其声音容易。 你们应该做的是建立连续的融合(其中一些人已经提到Hudson),这将让每个人都知道什么时候打破了测试。 如果有的话,小组的不同成员可以就不同的特征进行细致的工作,甚至在同一处。

持续的一体化将比同分支机构和合并工具的战斗更加顺利;尽管你应该有体面的试验。

如果你想把“大的变化”分门别类,就不要。 而是逐渐在路边发展大的变化。 这比在几周后努力整合变化的跳跃要容易得多。

最后,如果你想要试验,就更不用说什么工具了。 试验分支几乎永远不会重新并入主要发展,不管怎么说。 (是,我讲的是经验)

您真正需要高级分支机构的唯一设想是,如果你同时开发和跟踪产品的若干版本/组合。 在此情况下,definitively应当使用先进的控制工具。





相关问题
Tracking Versions, Builds, Revisions, with TortiseSVN

I am the sole developer on a project and have been using tortoiseSVN for quite a while. Now Id like to start getting version information working correctly in the project I.E. show Major Version, Minor ...

Tips on upgrading CVS to git/hg?

We still use CVS, I use git and hg for my personal use though I m still a novice at both, but I realize they re much more modern and better, faster, distributed, etc. It s just everyone is so ...

How to handle different csproj [closed]

I am working in a team of five. We are working on a C# application with five csprojects. The problem is that for each csproject, each of my colleagues has their own ideas on how to reference a DLL; ...

Changing username in SVN+SSH URI on the fly in working copy

I am using SVN+SSH to check out a working copy of repository from an SVN server on which all developers are members of a developer group and have full read/write permissions on the repository ...

How to search for file in subversion server?

Is there a way to search for a file in a subversion repository? Something similar to Unix find command, with which I can find the location of a file in a repository. I know there is svn list, but ...