最小的,玩具,分布式版本控制系统学习

发布于 2024-09-09 01:37:42 字数 87 浏览 1 评论 0原文

我有兴趣写一个玩具 DVCS。
需要研究的最小 DVCS 是什么?
(我不需要 ssl、ssh、svn 兼容性等...它应该能够执行本地存储库)

I am interested in writing a toy DVCS.
What is the smallest DVCS around to study ?
(I don't need ssl, ssh, svn compatibility etc... it should just be able to do local repositories)

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

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

发布评论

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

评论(4

鱼忆七猫命九 2024-09-16 01:37:42

Git 的实际核心相当小。不幸的是,它不是用易于理解的编程语言编写的,并且充满了与实际操作无关的性能优化。

但是,Git 有多种替代实现,特别是用 Python 编写的 Dulwich 库。

还有 Amp,其目标是为所有主要的分布式版本控制系统提供统一的接口。目前,他们只实现了 Mercurial,但 Git、Bazaar 和 Darcs 也在计划中。现在,Mercurial 是用 Python 编写的,而 Amp 是用 Ruby 编写的,它们的表达能力相似,因此您可能会认为差异并没有那么大。然而,Amp 的设计使您可以在 Git 存储库上使用 Mercurial 命令,或者在 Mercurial 存储库上使用具有 Bazaar 语义的 Darcs 命令,因此这些层之间有非常清晰的分离。 并且 Amp 的设计使得即使非程序员也可以使用 Amp 的构建块编写自己的个性化版本控制系统,因此代码极其简单明了。

The actual core of Git is rather small. Unfortunately, it's not written in a programming language that is amenable to easy understanding, and it is riddled with performance optimizations that are not relevant to the actual operation.

However, there are several alternative implementations of Git, in particular the Dulwich library, which is written in Python.

There's also Amp, whose goal is to provide unified interfaces to all major distributed version control systems. At the moment, they only implement Mercurial, but Git, Bazaar and Darcs are planned as well. Now, Mercurial is written in Python and Amp in Ruby which are both similarly expressive, so you might think that the difference isn't that big. However, Amp is designed so that you e.g. use the Mercurial commands on a Git repository or Darcs commands with Bazaar semantics on a Mercurial repository, so there is a very clear separation between those layers. And Amp is designed so that even non-programmers can write their own personalized version control system using Amp's building blocks, so the code is extremely simple and straightforward.

东风软 2024-09-16 01:37:42

git 的初始版本

commit e83c5163316f89bfbde7d9ab23ca2e25604af290
Author: Linus Torvalds <[email protected]>
Date:   Thu Apr 7 15:13:13 2005 -0700

有 1,064 行代码(ansic=822,sh=242)。

有关历史记录,请参阅:

最初进行提交如下所示:

$ init-db 
$ edit file 
$ update-cache –-add file 
$ edit file 
$ show-diff 
$ update-cache file 
$ T=$(write-tree) 
$ P=$(cat .dircache/HEAD) 
$ C=$(echo "My commit" | commit-tree $T -p $P) 
$ echo $C >.dircache/HEAD

The initial version of git

commit e83c5163316f89bfbde7d9ab23ca2e25604af290
Author: Linus Torvalds <[email protected]>
Date:   Thu Apr 7 15:13:13 2005 -0700

had 1,064 lines of code (ansic=822,sh=242).

For a chronicle, see:

Initially making a commit looked like this:

$ init-db 
$ edit file 
$ update-cache –-add file 
$ edit file 
$ show-diff 
$ update-cache file 
$ T=$(write-tree) 
$ P=$(cat .dircache/HEAD) 
$ C=$(echo "My commit" | commit-tree $T -p $P) 
$ echo $C >.dircache/HEAD
后eg是否自 2024-09-16 01:37:42

看看化石分布式版本控制,它只有 350kb。

http://www.fossil-scm.org

Have a look at fossil distributed versioning it's only 350kb.

http://www.fossil-scm.org

皇甫轩 2024-09-16 01:37:42

Darcs 是用 Haskell 编写的,但它相当大:40 KLOC。 Mercurial 也是 40 KLOC 左右,但它的核心是 20 KLOC 左右。

Darcs is written in Haskell, but it is quite large: 40 KLOC. Mercurial is about 40 KLOC too, but its core is about 20 KLOC.

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