强制实现像“views”这样的clearcase
我已经阅读了关于 perforce 的文档以及“分支策略”建议。 让我感到困惑的一件事是,一个简单的问题似乎没有得到充分解决。 当我正在处理一个涉及代码库许多部分的项目时,我无法在一天结束时在不检查主干的情况下检查我的代码。那么在这种情况下我需要分支吗?我希望能够在一个漫长而艰巨的项目中拥有我的更改历史记录,这样当我走错路时我可以回去。
我看到的分支问题是我将创建以下副本几乎整个代码库..我在这里缺少一个明显的解决方案吗? 谢谢
I have read through the documentation on perforce and the "branching strategy" advice as well.
One thing thats left me baffled, is how a simple concern is does not seem to adequtely adressed.
When I am working on a project that touches many parts of our code base , I cannot checkin my code at the end of the day without checking into the trunk. So do I need to branch in this situation? I want to be able to have the ability to have a history of my changes in a long and hard project, so I can go back when I I make a wrong turn..
The problem with branching I see is that I will be creating copies of almost the entire codebase .. Am I missing an obvious solution here?
thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
从 Perforce 服务器的角度来看,分支实际上并不是文件的副本。 Perforce 使用一种称为“惰性复制”的机制来最大限度地减少磁盘消耗。来自他们的网站,这是该术语的定义:
From the standpoint of the Perforce server, branches aren't actually copies of the files. Perforce uses a mechanism called "lazy copy" to minimize disc consumption. From their website, here is the definition of the term:
使用 perforce 的最佳方法是在用户/功能分支中工作,这样您就可以避免检查主干,同时仍将更改推送到仓库中。
创建分支时,您不必对整个主干或源分支进行分支 - 您只需对正在处理的文件进行分支 - 您可以通过客户端规范将其余文件映射到您的分支中。
TBH - 只需购买并购买即可阅读'Practical Perforce',它有大量关于如何做到这一点的有用信息,非常值得阅读如果你每天都使用perforce,那就省钱。
perforce 的另一个非常有用的功能是“作业” - 通常仅用于错误跟踪 - 它非常灵活,允许您存储附加到标签的更改列表历史记录,因此允许您创建“元标签”并将修订附加到它,即“NightlyBuild”或“BreakingChanges”或任何您想要的内容。
HTH。
Best approach to working with perforce is to work in a user/feature branch then you can avoid checking into the trunk whilst still pushing your changes into the depot.
When creating a branch, you don't have to branch the entire trunk or source branch - you only need to branch the files you're working on - you can map the rest of the files into your branch via your client spec.
TBH - just buy & read 'Practical Perforce', it has heaps of useful info on how to do this and is very much worth the money if you're using perforce on a daily basis.
Another very useful feature of perforce is 'jobs' - often described only for bug tracking - it's much flexible and allows you to store a changelist history attached to a tag so allowing you to create 'metatags' and attach revisions to it i.e 'NightlyBuild' or 'BreakingChanges or whatever you want.
HTH.
我所知道的最接近的是搁置,您可以在其中“搁置”正在进行的工作,在服务器上保存一份副本。我通常这样做是为了检查我的工作。我认为这最能满足您的需求,您可以在一天结束时保存您的进度。
有关 p4v 中搁置的教程,请参阅此处。
或者输入
p4 help shelve
获取命令行帮助。The closest I know of is shelving, in which you can "shelve" your work in progress, saving a copy on the server. I typically do this to essentially checkpoint my work. I think this comes closest to addressing your need, where you can save your progress at the end of the day.
See here for a tutorial on shelving in p4v.
Or type
p4 help shelve
for help with the command line.使用 PDB - 稀疏分支进行评估。更多信息请参见http://www.releng.com/p5layer.html
Evaluate using PDB - Sparse branches. More information here http://www.releng.com/p5layer.html