Perforce Stream和git branch的工作原理相同吗?

huangapple go评论57阅读模式
英文:

Is Perforce Stream works same as git branch?

问题

我第一次使用Perforce。
我想创建一个分支,类似于Git,但是当我创建任务流时,它看起来像是从服务器完全复制过来的。
Git分支不会完全复制代码,并且运行非常快速。
我是否对Perforce流有什么误解?

英文:

I'm using perforce first time.

I want to make branch which works as git, but when I create task stream, it looks like full copy from server.

Git branch doesn't copy full code, and it works very fast.

Am I knowing something wrong with perforce stream?

答案1

得分: 0

Perforce和git具有完全不同的数据模型。

其中一个关键区别是,在Perforce中,每个文件都有其自己的分支历史记录。这既有利处(您可以合并单个文件,并且可以独立跟踪每个文件的合并历史记录),也有劣势(由于分支完全在文件级别进行,创建分支意味着为每个文件创建独立的数据库记录)。

请注意,Perforce中的分支只会复制数据库记录(每个文件的大小/常量大小),而不会复制实际的文件内容,后端会对其进行去重(同样是每个单独的文件/版本)。

英文:

Perforce and git have entirely different data models.

One key difference is that in Perforce, each file has its own branching history. This has both benefits (you can merge individual files and have each file's merge history tracked independently) and drawbacks (since branching is all done at the file level, creating a branch means creating individual database records per file).

Note that branches in Perforce only duplicate the database records (which are a small/constant size per file), not the actual file content, which is deduplicated on the back end (again, per individual file/revision).

huangapple
  • 本文由 发表于 2023年5月11日 18:03:42
  • 转载请务必保留本文链接:https://go.coder-hub.com/76226424.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定