强制实现像“views”这样的clearcase

发布于 2024-10-02 04:05:43 字数 231 浏览 5 评论 0原文

我已经阅读了关于 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 技术交流群。

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

发布评论

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

评论(4

她如夕阳 2024-10-09 04:05:43

从 Perforce 服务器的角度来看,分支实际上并不是文件的副本。 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:

A method used by Perforce to make
internal copies of files without
duplicating file content in the depot.
Lazy copies minimize the consumption
of disk space by storing references to
the original file instead of copies of
the file.

没有你我更好 2024-10-09 04:05:43

使用 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.

饭团 2024-10-09 04:05:43

我所知道的最接近的是搁置,您可以在其中“搁置”正在进行的工作,在服务器上保存一份副本。我通常这样做是为了检查我的工作。我认为这最能满足您的需求,您可以在一天结束时保存您的进度。

有关 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.

不知在何时 2024-10-09 04:05:43

使用 PDB - 稀疏分支进行评估。更多信息请参见http://www.releng.com/p5layer.html

Evaluate using PDB - Sparse branches. More information here http://www.releng.com/p5layer.html

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