git,mercurial,bazaar源代码库的可理解性 [英] Understandability of git, mercurial, bazaar source code bases

查看:194
本文介绍了git,mercurial,bazaar源代码库的可理解性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想阅读其中一种流行的版本控制工具的源代码,以了解版本控制如何工作。我想阅读最具可读性的一个。

我不知道这是一个客观的量化指标,所以本着 WTFs / min comic ,我想问问那些已经阅读过这些工具源代码的人,你估计每个项目有多少个WTF / min?

解决方案

如果你读了C语言(还有一些Perl和bash),adymitruk是对的。 Git是一个不错的选择。



然而,如果你更熟悉Python,请阅读Mercurial的源代码。许多WTF / min将来自于熟悉DVCS编写的语言和风格。Git是用C,Perl和Bourne shell编写的,Mercurial是Python(带有一些C IIRC),以及Bzr是用Python,Pyrex和C语言编写的。

您还需要考虑您的选择工具。如果你使用Git,你会明白每个文件正在实现什么。基本上,在选择使用什么工具或语言(或学习)时,一个很好的公理是:按照你所知道的去做。您正试图学习如何实现DVCS,而不是如何使用特定的系统或语言:)

I'd like to read the source code of one of the popular revision control tools to learn how revision control works. I'd like to read the one that is most readable.

I don't know of an objective, quantitative measure of this, so in the spirit of the WTFs/min comic, I'd like to ask those who have read the source codes of these tools, how many WTFs/min do you estimate each project has?

解决方案

If you read C well (and some Perl and bash too), adymitruk is right. Git is a good choice.

However, if you're more comfortable with Python, read Mercurial's source. Many of the WTFs/min are going to come from your familiarity with the language and style that the DVCS is written in. Git is written in C, Perl, and Bourne shell, Mercurial is Python (with a bit of C IIRC), and Bzr is written in Python, Pyrex, and C.

You'll also want to take into account what your tool of choice is. If you use Git, you'll understand what each file is implementing. Likewise with Mercurial or Bzr.

Basically, when choosing what tool or language to use (or study), a good axiom is this: go with what you know. You're trying to learn how to implement a DVCS, not how to use a particular system or language :)

这篇关于git,mercurial,bazaar源代码库的可理解性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆