什么版本控制系统最简单的设置和用于玩具项目?

时间:2021-02-24 08:20:56

I teach the third required intro course in a CS department. One of my homework assignments asks students to speed up code they have written for a previous assignment. Factor-of-ten speedups are routine; factors of 100 or 1000 are not unheard of. (For a factor of 1000 speedup you have to have made rookie mistakes with malloc().)

我在CS部门教授第三个必修课程。我的一项家庭作业要求学生加快他们为以前的作业编写的代码。十倍的加速是常规的;因素100或1000并非闻所未闻。 (对于1000倍的加速,你必须使用malloc()犯下新手错误。)

Programs are improved by a sequence is small changes. I ask students to record and describe each change and the resulting improvement.

程序是通过序列改进的小改进。我要求学生记录并描述每个变化以及由此产生的改进。

While you're improving a program it is also possible to break it. Wouldn't it be nice to back out?

在改进程序的同时,也可以打破它。退出不是很好吗?

You can see where I'm going with this: my students would benefit enormously from version control. But there are some caveats:

你可以看到我的目标:我的学生将从版本控制中受益匪浅。但有一些警告:

  • Our computing environment is locked down. Anything that depends on a central repository is suspect.
  • 我们的计算环境被锁定。任何依赖于*存储库的东西都是可疑的。

  • Our students are incredibly overloaded. Not just classes but jobs, sports, music, you name it. For them to use a new tool it has to be incredibly easy and have obvious benefits.
  • 我们的学生非常超载。不仅仅是课程,还有工作,体育,音乐等等。对于他们使用新工具,它必须非常简单并且具有明显的好处。

  • Our students do most work in pairs. Getting bits back and forth between accounts is problematic. Could this problem also be solved by distributed version control?
  • 我们的学生大多数成对工作。在帐户之间来回获取位是有问题的。这个问题也可以通过分布式版本控制来解决吗?

  • Complexity is the enemy. I know setting up a CVS repository is too baffling---I myself still have trouble because I only do it once a year. I'm told SVN is even harder.
  • 复杂性是敌人。我知道建立一个CVS存储库太令人困惑了 - 我自己仍然遇到麻烦,因为我每年只做一次。我被告知SVN更难。

Here are my comments on existing systems:

以下是我对现有系统的评论:

  • I think central version control (CVS or SVN) is ruled out because our students don't have the administrative privileges needed to make a repository that they can share with one other student. (We are stuck with Unix file permissions.) Also, setup on CVS or SVN is too hard.
  • 我认为*版本控制(CVS或SVN)已被排除,因为我们的学生没有制作可与其他学生共享的存储库所需的管理权限。 (我们坚持使用Unix文件权限。)另外,在CVS或SVN上设置太难了。

  • darcs is way easy to set up, but it's not obvious how you share things. darcs send (to send patches by email) seems promising but it's not clear how to set it up.
  • darcs很容易设置,但你分享的方式并不明显。 darcs发送(通过电子邮件发送补丁)似乎很有希望,但目前尚不清楚如何设置它。

  • The introductory documentation for git is not for beginners. Like CVS setup, it's something I myself have trouble with.
  • git的介绍性文档不适合初学者。像CVS设置一样,这是我自己遇到的麻烦。

I'm soliciting suggestions for what source-control to use with beginning students. I suspect we can find resources to put a thin veneer over an existing system and to simplify existing documentation. We probably don't have resources to write new documentation.

我正在征求关于开始学生使用什么源代码控制的建议。我怀疑我们可以找到资源在现有系统上放置薄薄的贴面并简化现有文档。我们可能没有资源来编写新文档。

So, what's really easy to setup, commit, revert, and share changes with a partner but does not have to be easy to merge or to work at scale?

那么,与合作伙伴一起设置,提交,还原和共享更改真的很容易,但是不必很容易合并或大规模工作?

A key constraint is that programming pairs have to be able to share work with each other and only each other, and pairs change every week. Our infrastructure is Linux, Solaris, and Windows with a netapp filer. I doubt my IT staff wants to create a Unix group for each pair of students. Is there an easier solution I've overlooked?

一个关键的限制是编程对必须能够彼此共享工作,并且只能彼此共享工作,并且每周对更改。我们的基础架构是Linux,Solaris和带有netapp文件管理器的Windows。我怀疑我的IT人员想要为每对学生创建一个Unix组。我忽略了一个更简单的解决方案吗?

(Thanks for the accepted answer, which beats the others on account of its excellent reference to Git Magic as well as the helpful comments.)

(感谢您接受的答案,由于其对Git Magic的出色参考以及有用的评论而击败了其他人。)

18 个解决方案

#1


83  

I would say something like Git might fit the bill:

我会说像Git这样的东西可能适合这个法案:

  • As it's a distributed system, you don't need to have a central repository, the repos exist with the source directory
  • 由于它是一个分布式系统,因此您不需要拥有*存储库,存储库与源目录一起存在

  • It is easy to create patch files that can be mailed and applied.
  • 可以轻松创建可以邮寄和应用的补丁文件。

  • Although it might seem that git is difficult to use, the basic ideas of committing, merging, adding and removing files are not that hard to learn.
  • 虽然看起来git很难使用,但提交,合并,添加和删除文件的基本思想并不难理解。

Have a look at this site Git Magic or, even this tip site GitReady

看看这个网站Git Magic,甚至是这个提示网站GitReady

#2


48  

Second the choice of Mercurial

二是Mercurial的选择

Advantages

  • Excellent documentation.
  • Graphical view command to show branching.
  • 用于显示分支的图形视图命令。

  • Cross-platform.
  • Comes with a GUI for all platforms (TortoiseHG, or thg).
  • 附带适用于所有平台的GUI(TortoiseHG或thg)。

  • Built-in web server for viewing the project.
  • 用于查看项目的内置Web服务器。

  • Can keep your project on your thumbdrive.
    • Work can be saved even if only one member of the pair remembered their laptop. Not that that would ever happen.
    • 即使只有一个成员记住他们的笔记本电脑,也可以保存工作。这不会发生。

  • 可以将您的项目保留在您的拇指驱动器上。即使只有一个成员记住他们的笔记本电脑,也可以保存工作。这不会发生。

Disadvantages

  • Must install Python if not already present.
    • Easy to do, but it is another step.
    • 容易做,但这是另一个步骤。

  • 必须安装Python(如果尚未安装)。容易做,但这是另一个步骤。

  • Understanding the distinction between push/pull vs update/commit.
    • (This is common to all distributed VCS).
    • (这对所有分布式VCS都是通用的)。

  • 理解推/拉与更新/提交之间的区别。 (这对所有分布式VCS都是通用的)。

  • The distinction between heads and tips.
  • 头部和提示之间的区别。

  • Some commands aren't immediately available; they must be explicitly enabled.
    • (This is generally consider advantageous by the community as it keeps things simple; some others disagree though).
    • (这通常被社区视为有利,因为它使事情变得简单;但其他一些人则不同意)。

  • 有些命令不能立即使用;必须明确启用它们。 (这通常被社区视为有利,因为它使事情变得简单;但其他一些人则不同意)。

#3


16  

Subversion is easy to install, on windows, linux and mac os x. I don't know what program they are programming in, but the subclipse plugin for Eclipse is fairly easy to install and hides away some of the repository complexity.

Subversion易于安装,在windows,linux和mac os x上。我不知道他们正在编程什么程序,但Eclipse的subclipse插件相当容易安装并隐藏了一些存储库的复杂性。

And repository complexity? That's simply having a trunk, tags and branches folder within each project anyway. And they might not have much time, but they should get the time to learn SVN (or similar) because it is a skill that looks good on their CV.

和存储库复杂性?无论如何,这只是在每个项目中都有一个trunk,tags和branches文件夹。他们可能没有太多时间,但他们应该有时间学习SVN(或类似的),因为这是一种在他们的简历上看起来很好的技能。

#4


14  

I'd suggest looking at Fossil - It's a single executable with no dependencies to run, operates all traffic over HTTP, keeps its all repository data in a single file which can be named anything, and includes version controlled wiki, bug tracking and a web-server out of the box. Oh, and it's completely distributed.

我建议查看Fossil - 它是一个没有依赖关系的单个可执行文件,通过HTTP操作所有流量,将其所有存储库数据保存在一个文件中,可以命名为任何内容,并包括版本控制的wiki,错误跟踪和Web - 服务器开箱即用。哦,它完全是分布式的。

#5


11  

I would recommend Mercurial (also called 'hg'). It is a distributed open-source VCS, and needs no central repository. Using it day-to day is easy. There is enough documentation on official site. For example check out QuickStart.

我会推荐Mercurial(也称为'hg')。它是一个分布式开源VCS,不需要*存储库。每天使用它很容易。官方网站上有足够的文档。例如,查看QuickStart。

Deciding point for me was a great GUI for Windows - TortoiseHg. It seems it is also supported on Linux (didn't try myself). And of course there are command-line distributions for most Linux versions.

对我而言,决定点是Windows的一个很好的GUI - TortoiseHg。它似乎也支持Linux(没试过自己)。当然,大多数Linux版本都有命令行发行版。

Of course it seems easy from this side of the fence, maybe for busy students concept, advantages, and everyday operation won't be that easy to get used to. But in the end, instant commits, ability to revert to any revision and create a new branch from there automatically, and intelligent diff/merge are just irreplaceable.

当然从篱笆这边看起来很容易,也许对于忙碌的学生来说,概念,优点和日常操作都不会那么容易习惯。但最终,即时提交,恢复到任何修订的能力以及从那里自动创建新分支,以及智能差异/合并都是不可替代的。

Hope this helps!

希望这可以帮助!

#6


8  

For real ease of use for your students, you could install a SVN server with autocommit turned on, shared using webdav. This way they can just mount their directory using WebDAV and will autcommit every time they hit save - accessing the history is easy with TortoiseSVN, the Eclipse / Visual Studio Plugins or some web access solution like ViewVC. For your access restriction needs you could use the integrated subversion authentication (look here) - which uses a simple configuration file for fine grained access control.

为了让您的学生真正轻松使用,您可以安装SVN服务器,并启用自动提交,使用webdav共享。这样他们就可以使用WebDAV安装他们的目录,并且每次他们点击保存时都会自动提交 - 使用TortoiseSVN,Eclipse / Visual Studio插件或某些Web访问解决方案(如ViewVC)可以轻松访问历史记录。对于您的访问限制需求,您可以使用集成的subversion身份验证(在此处查看) - 它使用简单的配置文件进行细粒度访问控制。

Configuration has become a lot easier (and there is better documention now - have a look at the SVN Book), but could get a bit coplicated if you need multiple separate repositories with access restrictions and a web interface.

配置变得更加容易(现在有更好的文档 - 看看SVN书籍),但是如果您需要多个具有访问限制和Web界面的独立存储库,可能会有点复制。

Autocommit is more a solution for the "my office worker / boss" who has no clue whats going on inside a computer needs version control for word documents. Students taking a programming course should perhaps also learn how to use a decent SCM anyway.

Autocommit更像是一个解决方案,对于“我的办公室工作人员/老板”,他不知道计算机内部是否需要对word文档进行版本控制。参加编程课程的学生也许也应该学习如何使用体面的SCM。

Git and Mercurial would be nice because of their distributed nature, which makes sharing easy - but both tools lack GUI interfaces which are really easy to use (TortoiseHg looks promising, and gitk is a very good Repository browser, but your students would still have to wrap their heads around the command line tools to make full use of the tools). Also the concept of distributed SCM's is a little more complex to grasp.

Git和Mercurial因为它们的分布式特性会很好,这使得共享变得容易 - 但是这两种工具都缺乏易于使用的GUI界面(TortoiseHg看起来很有前途,而且gitk是一个非常好的Repository浏览器,但是你的学生仍然需要围绕命令行工具包围他们以充分利用这些工具)。此外,分布式SCM的概念要掌握得更复杂一些。

On the pro side you could use public hosting solutions like GitHub and wouldn't have to worry about a server setup. This also makes sharing solutions really easy, but would break your "only with each other" requirement. But I guess you won't be able to stop them from exchanging code anyway, in my experience with course work I found looking at the code and verifying that it's unique is the only way to prevent copying.

在专业方面,您可以使用GitHub等公共托管解决方案,而不必担心服务器设置。这也使得共享解决方案变得非常简单,但会破坏您的“只有彼此”的要求。但我想你无论如何都无法阻止他们交换代码,根据我的课程工作经验,我发现查看代码并验证它是唯一的防止复制的方法。

You could also use PlasticSCM, which has really nice interfaces for a lot of IDE's and (at least the site claims) free licenses for educational institutions.

您还可以使用PlasticSCM,它具有非常好的接口,适用于许多IDE和(至少网站声称)教育机构的免费许可。

#7


7  

I see no reason for dealing with setting up the source control system. Review the terms for using e.g. google code and dive in.

我认为没有理由处理设置源控制系统。查看使用例如的条款谷歌代码和潜水。

A fellow CS student and I used it last year and it works great and the only precondition is an internet connection :-)

我和CS的一名同学去年使用它并且效果很好,唯一的前提是互联网连接:-)

#8


7  

Bazaar, Mercurial, and Git sound appropriate for your case - trivial to create repositories, and all the students need to share is read access on the filesystem to each other's repositories.

Bazaar,Mercurial和Git听起来很适合您的情况 - 创建存储库非常简单,所有学生需要共享的是文件系统对彼此存储库的读访问权限。

#9


7  

Darcs is an excellent DVCS, especially for smaller projects such as ones for CS classes. I wish I was introduced to Darcs or Git in college, and I also commend you for introducing it to your students.

Darcs是一个优秀的DVCS,特别适用于较小的项目,如CS类的项目。我希望我在大学时被介绍给Darcs或Git,我也赞赏你把它介绍给你的学生。

I use Git on a daily basis. It's a very robust DVCS, but maybe a bit of an overkill for smaller projects.

我每天都使用Git。这是一个非常强大的DVCS,但对于较小的项目可能有点过分。

Take your pick, either of those version control systems are really good.

随便选择,这些版本控制系统都非常好。

#10


5  

darcs send is trivial to setup - when you run darcs send <remote repo>, it looks in _darcs/prefs/email of the remote repo to decide where to sent the email to. If there's nothing there then it prompts the user instead.

darcs发送是微不足道的 - 当你运行darcs发送 时,它会在远程仓库的_darcs / prefs / email中查找以确定将电子邮件发送到的位置。如果那里什么也没有,那么它会提示用户。

The receiver of the patch just saves the file and runs darcs apply <patch file> in the appropriate repo.

补丁的接收者只保存文件并在相应的仓库中运行darcs apply

So each student can just have their own repos with their own email address in _darcs/prefs/email and exchange patches by email.

因此,每个学生都可以在_darcs / prefs / email中使用自己的电子邮件地址拥有自己的回购,并通过电子邮件交换补丁。

#11


5  

I have had some very good experience with Bazaar. Like Git/Mercurial it is distributed. It is serverless - you do not need a daemon installed on the server hosting the repository, even if you are accessing it remotely (ie, it can work just as an FTP/SFTP share).

我和Bazaar有过很好的经历。像Git / Mercurial一样,它是分发的。它是无服务器的 - 您不需要在托管存储库的服务器上安装守护程序,即使您正在远程访问它(即,它可以像FTP / SFTP共享一样工作)。

A distributed VCS is most flexible. You can check out a branch from a more traditional 'central' repository and gain all the benefit of being able to fork off your own little development separate to the central server, etc and then, perhaps, push your changes back up.

分布式VCS最灵活。您可以从更传统的“*”存储库中查看分支,并获得能够将您自己的小开发分离到*服务器等的所有好处,然后,或许可以将您的更改推回原位。

There are import tools for other VCSs such as Subversion though I haven't tried them.

有其他VCS的导入工具,如Subversion,虽然我还没有尝试过。

#12


4  

Regarding permissions, an outside service wouldn't require time from your university's IT staff.

关于权限,外部服务不需要您大学的IT人员的时间。

For example, Bitbucket (using Mercurial) now allows unlimited private repos with up to 5 users. I'm guessing each new weekly pair of students is working on a new project together, which means they can just initialize the repository, add the other user, and away they go.

例如,Bitbucket(使用Mercurial)现在允许最多5个用户的无限私人回购。我猜每个新的每周一对学生正在一起研究一个新项目,这意味着他们可以只是初始化存储库,添加其他用户,然后就可以了。

If they are not working on a new project every week, permissions would have to be removed and added, and I'd encourage them to have multiple repos (one per account) on Bitbucket so each student has continued access. (This would be a good idea anyway, but for only week-long projects, it may be simpler to just have one student account own the repo and the other with permission.)

如果他们不是每周都在处理一个新项目,那么就必须删除并添加权限,我鼓励他们在Bitbucket上有多个repos(每个帐户一个),这样每个学生都可以继续访问。 (无论如何这都是一个好主意,但对于长达一周的项目,只有一个学生账户拥有回购可能更简单,而另一个则允许。)

Regarding which VCS, I believe Mercurial will be best given your platforms—TortoiseHg being particularly good for new users to explore, if they're unfamiliar with (and you don't have time for them to learn) command-line interfaces.

关于哪个VCS,我相信Mercurial最适合你的平台 - 如果他们不熟悉(并且你没有时间让他们学习)命令行界面,TortoiseHg特别适合新用户探索。

Specific to your situation, the advantage of DVCS is their copy on the university server (if there is one) is a fully-fledged repo. You may find it convenient for you or TAs to have access, which should be simpler to setup and would last all semester instead of change weekly.

根据您的具体情况,DVCS的优势在于他们在大学服务器上的副本(如果有的话)是一个完全成熟的回购。您可能会发现方便您或助理可以访问,这应该更容易设置,并且可以持续所有学期而不是每周更改。

#13


3  

Setting up a subversion repository is trivial; I frequently set one up as a one-off thing for small projects (such as developing code for an answer on Stack Overflow!), and I doubt anybody else who could learn an SCM system at all would have any trouble with it.

设置一个subversion存储库是微不足道的;我经常为小项目设置一个一次性的东西(例如在Stack Overflow上开发代码以获得答案!),我怀疑任何能够学习SCM系统的人都会遇到任何问题。

$ svnadmin create /home/cjs/repo
$ mkdir my-project
$ cd my-project
$ vi hello.c
  [...hack hack hack...]
$ svn import -m 'Initial project import.' file:///home/cjs/repo
Adding         hello.c

Committed revision 1.

That said, sharing is certainly an issue. If the students always work together when they work simultaneously, they could use a USB drive, since they can just unplug it and pass it back and forth when one needs to comit, and the person who's going to program alone later can just hang on to it. That's not entirely convenient, though.

也就是说,分享肯定是个问题。如果学生在他们同时工作的时候总是一起工作,他们可以使用USB驱动器,因为他们可以拔掉它并在需要进行调试时来回传递,而以后单独编程的人可以坚持使用它。但这并不完全方便。

Another option, since they all appear to be working on a shared Unix system, is to create a directory with the execute but not read bit set for the rest of the group (or all users) and use a s3cr3t name for the repo under that, one that only the two students know. Passing that secret name on to the prof would allow him to examine student's repos at any time, as well. ("So you submitted the assignment on time, but the e-mail system lost it? Let me just look at the time of that commit....") A script could help set this up.

另一种选择,因为它们似乎都在共享Unix系统上工作,就是创建一个目录,其中包含为该组的其余部分(或所有用户)设置的执行但不是读取位,并在该目录下使用s3cr3t名称作为repo。 ,只有两个学生知道的。将该秘密名称传递给教授将允许他随时检查学生的回购。 (“所以你按时提交了作业,但是电子邮件系统失去了它?让我看看那次提交的时间......”)一个脚本可以帮助你设置它。

In fact, the more I think about that, the more I'm beginning to like it. In certain ways, it's simpler than the git solution because the student doesn't have to deal with passing patches around (or forgetting to do so) and the student will be forced to deal with merges before he commits, rather than once things are in the repository (with the subsequent ability to delay dealing with that indefinitely).

事实上,我越是想到这一点,我就越开始喜欢它。在某些方面,它比git解决方案更简单,因为学生不必处理传递补丁(或忘记这样做)并且学生将在被提交之前*处理合并,而不是一旦事情进入存储库(随后有能力无限期地延迟处理)。

#14


3  

UPDATE: Six years later I would never consider using subversion for anything ever again. Git is the way to go. So, while I still think SVN is a bit "simpler", it is just not even worth teaching anymore.

更新:六年后,我永远不会考虑再次使用颠覆。 Git是要走的路。所以,虽然我仍然认为SVN有点“简单”,但它甚至不值得教学了。

I've used CVS, SVN, Bazaar and Git (in that order of introduction) and I'd have to say for students that SVN is the way to go. In fact, while I was lead TA we implemented SVN as a replacement for the old "submit script" which was a tar and email script. Labstaff setup an Apache SVN-DAV based repository and using the authz file the TAs and instructor could control permissions for per-student directories and group projects at a very fine-grained level leaving students with a very simple path to their first commit. See my tutorial (credentials ripped out by the most recent TAs.. hmm..)

我已经使用过CVS,SVN,Bazaar和Git(按照介绍的顺序),我不得不对学生说SVN是要走的路。事实上,在我担任主要TA的同时,我们实施了SVN,以替代旧的“提交脚本”,这是一个tar和电子邮件脚本。 Labstaff设置了基于Apache SVN-DAV的存储库,并使用authz文件,TA和教师可以在非常细粒度的级别上控制每个学生目录和组项目的权限,使学生有一个非常简单的第一次提交路径。请参阅我的教程(由最新的TA掏出的凭据......嗯..)

Regarding the use of subversion without intervention by sys admins, I've done this as well in a group-project setting where none of my group members had ever used subversion before and most of them were committing with very little confusion (all but one). I also wrote a tutorial for setting up such a secure shared repository with only basic SSH access here.

关于在没有sys管理员干预的情况下使用subversion,我在组项目环境中也做到了这一点,我的组成员之前都没有使用过subversion,而且大部分都没有混淆(除了一个之外) 。我还写了一个教程,用于设置这样一个安全的共享存储库,这里只有基本的SSH访问权限。

I definitely disagree that git is the best VCS for beginners having experienced the blank looks enough at the mention of any VCS system, let alone the mac-daddy-written-by-Linus-himself VCS king, git. It is simply not true that git is no more complex than svn, and the lack of mature n00b tools alone is enough of a reason not to use it in this scenario. I just started using git for a new project that I am developing in Netbeans and already ran into serious limitations with the Netbeans integration. In a single semester you are not going to use any functionality that svn doesn't provide so git is overkill.

我绝对不同意git是初学者在提到任何VCS系统时经历过空白外观的最佳VCS,更不用说由Linus自己写的Mac-dad VCS之王,git。 git并不比svn复杂,并且仅仅缺乏成熟的n00b工具就足以成为不在这种情况下使用它的理由。我刚开始使用git来开发一个我在Netbeans中开发的新项目,并且已经遇到了Netbeans集成的严重限制。在一个学期中,你不会使用svn没有提供的任何功能,所以git是矫枉过正的。

#15


2  

Subversion on Windows can be as simple as setting up TortoiseSVN. There is a bit of a learning curve for using it (especially if you've never used a version control before), but you might help that by dedicating half a lesson to it and providing some powerpoint slides for them to download.

Windows上的Subversion可以像设置TortoiseSVN一样简单。使用它有一点学习曲线(特别是如果你之前从未使用过版本控制),但是你可以通过专门教一半课程并提供一些powerpoint幻灯片来帮助他们下载。

As for centralization - I've heard of websites that offer free SVN project hosting. A quick Google search turned up this page, but there are certainly more.

至于集中化 - 我听说过提供免费SVN项目托管的网站。一个快速的谷歌搜索出现在这个页面,但肯定有更多。

#16


2  

If you are looking for something that is really really esay to set up, then why not go for the free SVN hosting option, you don't have to set up a thing!

如果你正在寻找真正需要设置的东西,那么为什么不去免费的SVN托管选项,你不需要设置一个东西!

Sadly the two older ones that everyone would have pointed you to being Assembla, Unfuddle, have dropped support for their free hosting ( or at lest if you want them to private ), but you can still use Origo this give you both open and closed hosting.

可悲的是,每个人都会指出你是Assembla,Unfuddle的两个旧版本已经放弃了对他们免费托管的支持(或者至少如果你想让他们私有),但你仍然可以使用Origo这给你开放和封闭托管。

The advantage of this is that you can own all the projects and follow them all, and easily control the people who have access, and you don't have to worry about right for creating repos.

这样做的好处是,您可以拥有所有项目并全部跟踪它们,并轻松控制有权访问的人员,而您无需担心创建回购的权利。

If you do go this route, and you want to eliminate complexity then you must use a GUI svn application to make learning near trivial ( since I doubt there will be much merging going on ). I would recommend tortoisesvn, slips right into your windows explorer context menu.

如果你选择这条路线,并且想要消除复杂性,那么你必须使用GUI svn应用程序来使学习变得微不足道(因为我怀疑会有很多合并)。我会推荐tortoisesvn,直接进入你的Windows资源管理器上下文菜单。

#17


1  

I would say your best bet will be to try to work with your IT department to set up a system/method for your students to easily create new SVN/CVS repositories.

我想说最好的办法是尝试与您的IT部门合作,为学生设置一个系统/方法,以便轻松创建新的SVN / CVS存储库。

Probably you could get the IT department to give you the privileges necessary to create repositories for your students even if they won't give the priveleges to the students themselves. You could probably pretty easily write a few scripts to mass-create repositories from lists of students at the beginning of the semester.

也许您可以让IT部门为您提供为学生创建存储库所需的特权,即使他们不会给学生自己提供授权。您可以非常轻松地编写一些脚本,以便在学期开始时从学生列表中批量创建存储库。

#18


1  

RCS for linux.

RCS for linux。

I've found nothing simpler than RCS for Widows but not all the RCS ports work well so you have to try them which makes it non-simple. Windows just isn't simple for developers. The windows port from http://www.cs.purdue.edu/homes/trinkle/RCS/ is pretty good.

我没有发现任何比RCS更简单的Widows,但并不是所有的RCS端口都运行良好,所以你必须尝试它们,这使得它不简单。 Windows对开发人员来说并不简单。来自http://www.cs.purdue.edu/homes/trinkle/RCS/的windows端口非常好。

#1


83  

I would say something like Git might fit the bill:

我会说像Git这样的东西可能适合这个法案:

  • As it's a distributed system, you don't need to have a central repository, the repos exist with the source directory
  • 由于它是一个分布式系统,因此您不需要拥有*存储库,存储库与源目录一起存在

  • It is easy to create patch files that can be mailed and applied.
  • 可以轻松创建可以邮寄和应用的补丁文件。

  • Although it might seem that git is difficult to use, the basic ideas of committing, merging, adding and removing files are not that hard to learn.
  • 虽然看起来git很难使用,但提交,合并,添加和删除文件的基本思想并不难理解。

Have a look at this site Git Magic or, even this tip site GitReady

看看这个网站Git Magic,甚至是这个提示网站GitReady

#2


48  

Second the choice of Mercurial

二是Mercurial的选择

Advantages

  • Excellent documentation.
  • Graphical view command to show branching.
  • 用于显示分支的图形视图命令。

  • Cross-platform.
  • Comes with a GUI for all platforms (TortoiseHG, or thg).
  • 附带适用于所有平台的GUI(TortoiseHG或thg)。

  • Built-in web server for viewing the project.
  • 用于查看项目的内置Web服务器。

  • Can keep your project on your thumbdrive.
    • Work can be saved even if only one member of the pair remembered their laptop. Not that that would ever happen.
    • 即使只有一个成员记住他们的笔记本电脑,也可以保存工作。这不会发生。

  • 可以将您的项目保留在您的拇指驱动器上。即使只有一个成员记住他们的笔记本电脑,也可以保存工作。这不会发生。

Disadvantages

  • Must install Python if not already present.
    • Easy to do, but it is another step.
    • 容易做,但这是另一个步骤。

  • 必须安装Python(如果尚未安装)。容易做,但这是另一个步骤。

  • Understanding the distinction between push/pull vs update/commit.
    • (This is common to all distributed VCS).
    • (这对所有分布式VCS都是通用的)。

  • 理解推/拉与更新/提交之间的区别。 (这对所有分布式VCS都是通用的)。

  • The distinction between heads and tips.
  • 头部和提示之间的区别。

  • Some commands aren't immediately available; they must be explicitly enabled.
    • (This is generally consider advantageous by the community as it keeps things simple; some others disagree though).
    • (这通常被社区视为有利,因为它使事情变得简单;但其他一些人则不同意)。

  • 有些命令不能立即使用;必须明确启用它们。 (这通常被社区视为有利,因为它使事情变得简单;但其他一些人则不同意)。

#3


16  

Subversion is easy to install, on windows, linux and mac os x. I don't know what program they are programming in, but the subclipse plugin for Eclipse is fairly easy to install and hides away some of the repository complexity.

Subversion易于安装,在windows,linux和mac os x上。我不知道他们正在编程什么程序,但Eclipse的subclipse插件相当容易安装并隐藏了一些存储库的复杂性。

And repository complexity? That's simply having a trunk, tags and branches folder within each project anyway. And they might not have much time, but they should get the time to learn SVN (or similar) because it is a skill that looks good on their CV.

和存储库复杂性?无论如何,这只是在每个项目中都有一个trunk,tags和branches文件夹。他们可能没有太多时间,但他们应该有时间学习SVN(或类似的),因为这是一种在他们的简历上看起来很好的技能。

#4


14  

I'd suggest looking at Fossil - It's a single executable with no dependencies to run, operates all traffic over HTTP, keeps its all repository data in a single file which can be named anything, and includes version controlled wiki, bug tracking and a web-server out of the box. Oh, and it's completely distributed.

我建议查看Fossil - 它是一个没有依赖关系的单个可执行文件,通过HTTP操作所有流量,将其所有存储库数据保存在一个文件中,可以命名为任何内容,并包括版本控制的wiki,错误跟踪和Web - 服务器开箱即用。哦,它完全是分布式的。

#5


11  

I would recommend Mercurial (also called 'hg'). It is a distributed open-source VCS, and needs no central repository. Using it day-to day is easy. There is enough documentation on official site. For example check out QuickStart.

我会推荐Mercurial(也称为'hg')。它是一个分布式开源VCS,不需要*存储库。每天使用它很容易。官方网站上有足够的文档。例如,查看QuickStart。

Deciding point for me was a great GUI for Windows - TortoiseHg. It seems it is also supported on Linux (didn't try myself). And of course there are command-line distributions for most Linux versions.

对我而言,决定点是Windows的一个很好的GUI - TortoiseHg。它似乎也支持Linux(没试过自己)。当然,大多数Linux版本都有命令行发行版。

Of course it seems easy from this side of the fence, maybe for busy students concept, advantages, and everyday operation won't be that easy to get used to. But in the end, instant commits, ability to revert to any revision and create a new branch from there automatically, and intelligent diff/merge are just irreplaceable.

当然从篱笆这边看起来很容易,也许对于忙碌的学生来说,概念,优点和日常操作都不会那么容易习惯。但最终,即时提交,恢复到任何修订的能力以及从那里自动创建新分支,以及智能差异/合并都是不可替代的。

Hope this helps!

希望这可以帮助!

#6


8  

For real ease of use for your students, you could install a SVN server with autocommit turned on, shared using webdav. This way they can just mount their directory using WebDAV and will autcommit every time they hit save - accessing the history is easy with TortoiseSVN, the Eclipse / Visual Studio Plugins or some web access solution like ViewVC. For your access restriction needs you could use the integrated subversion authentication (look here) - which uses a simple configuration file for fine grained access control.

为了让您的学生真正轻松使用,您可以安装SVN服务器,并启用自动提交,使用webdav共享。这样他们就可以使用WebDAV安装他们的目录,并且每次他们点击保存时都会自动提交 - 使用TortoiseSVN,Eclipse / Visual Studio插件或某些Web访问解决方案(如ViewVC)可以轻松访问历史记录。对于您的访问限制需求,您可以使用集成的subversion身份验证(在此处查看) - 它使用简单的配置文件进行细粒度访问控制。

Configuration has become a lot easier (and there is better documention now - have a look at the SVN Book), but could get a bit coplicated if you need multiple separate repositories with access restrictions and a web interface.

配置变得更加容易(现在有更好的文档 - 看看SVN书籍),但是如果您需要多个具有访问限制和Web界面的独立存储库,可能会有点复制。

Autocommit is more a solution for the "my office worker / boss" who has no clue whats going on inside a computer needs version control for word documents. Students taking a programming course should perhaps also learn how to use a decent SCM anyway.

Autocommit更像是一个解决方案,对于“我的办公室工作人员/老板”,他不知道计算机内部是否需要对word文档进行版本控制。参加编程课程的学生也许也应该学习如何使用体面的SCM。

Git and Mercurial would be nice because of their distributed nature, which makes sharing easy - but both tools lack GUI interfaces which are really easy to use (TortoiseHg looks promising, and gitk is a very good Repository browser, but your students would still have to wrap their heads around the command line tools to make full use of the tools). Also the concept of distributed SCM's is a little more complex to grasp.

Git和Mercurial因为它们的分布式特性会很好,这使得共享变得容易 - 但是这两种工具都缺乏易于使用的GUI界面(TortoiseHg看起来很有前途,而且gitk是一个非常好的Repository浏览器,但是你的学生仍然需要围绕命令行工具包围他们以充分利用这些工具)。此外,分布式SCM的概念要掌握得更复杂一些。

On the pro side you could use public hosting solutions like GitHub and wouldn't have to worry about a server setup. This also makes sharing solutions really easy, but would break your "only with each other" requirement. But I guess you won't be able to stop them from exchanging code anyway, in my experience with course work I found looking at the code and verifying that it's unique is the only way to prevent copying.

在专业方面,您可以使用GitHub等公共托管解决方案,而不必担心服务器设置。这也使得共享解决方案变得非常简单,但会破坏您的“只有彼此”的要求。但我想你无论如何都无法阻止他们交换代码,根据我的课程工作经验,我发现查看代码并验证它是唯一的防止复制的方法。

You could also use PlasticSCM, which has really nice interfaces for a lot of IDE's and (at least the site claims) free licenses for educational institutions.

您还可以使用PlasticSCM,它具有非常好的接口,适用于许多IDE和(至少网站声称)教育机构的免费许可。

#7


7  

I see no reason for dealing with setting up the source control system. Review the terms for using e.g. google code and dive in.

我认为没有理由处理设置源控制系统。查看使用例如的条款谷歌代码和潜水。

A fellow CS student and I used it last year and it works great and the only precondition is an internet connection :-)

我和CS的一名同学去年使用它并且效果很好,唯一的前提是互联网连接:-)

#8


7  

Bazaar, Mercurial, and Git sound appropriate for your case - trivial to create repositories, and all the students need to share is read access on the filesystem to each other's repositories.

Bazaar,Mercurial和Git听起来很适合您的情况 - 创建存储库非常简单,所有学生需要共享的是文件系统对彼此存储库的读访问权限。

#9


7  

Darcs is an excellent DVCS, especially for smaller projects such as ones for CS classes. I wish I was introduced to Darcs or Git in college, and I also commend you for introducing it to your students.

Darcs是一个优秀的DVCS,特别适用于较小的项目,如CS类的项目。我希望我在大学时被介绍给Darcs或Git,我也赞赏你把它介绍给你的学生。

I use Git on a daily basis. It's a very robust DVCS, but maybe a bit of an overkill for smaller projects.

我每天都使用Git。这是一个非常强大的DVCS,但对于较小的项目可能有点过分。

Take your pick, either of those version control systems are really good.

随便选择,这些版本控制系统都非常好。

#10


5  

darcs send is trivial to setup - when you run darcs send <remote repo>, it looks in _darcs/prefs/email of the remote repo to decide where to sent the email to. If there's nothing there then it prompts the user instead.

darcs发送是微不足道的 - 当你运行darcs发送 时,它会在远程仓库的_darcs / prefs / email中查找以确定将电子邮件发送到的位置。如果那里什么也没有,那么它会提示用户。

The receiver of the patch just saves the file and runs darcs apply <patch file> in the appropriate repo.

补丁的接收者只保存文件并在相应的仓库中运行darcs apply

So each student can just have their own repos with their own email address in _darcs/prefs/email and exchange patches by email.

因此,每个学生都可以在_darcs / prefs / email中使用自己的电子邮件地址拥有自己的回购,并通过电子邮件交换补丁。

#11


5  

I have had some very good experience with Bazaar. Like Git/Mercurial it is distributed. It is serverless - you do not need a daemon installed on the server hosting the repository, even if you are accessing it remotely (ie, it can work just as an FTP/SFTP share).

我和Bazaar有过很好的经历。像Git / Mercurial一样,它是分发的。它是无服务器的 - 您不需要在托管存储库的服务器上安装守护程序,即使您正在远程访问它(即,它可以像FTP / SFTP共享一样工作)。

A distributed VCS is most flexible. You can check out a branch from a more traditional 'central' repository and gain all the benefit of being able to fork off your own little development separate to the central server, etc and then, perhaps, push your changes back up.

分布式VCS最灵活。您可以从更传统的“*”存储库中查看分支,并获得能够将您自己的小开发分离到*服务器等的所有好处,然后,或许可以将您的更改推回原位。

There are import tools for other VCSs such as Subversion though I haven't tried them.

有其他VCS的导入工具,如Subversion,虽然我还没有尝试过。

#12


4  

Regarding permissions, an outside service wouldn't require time from your university's IT staff.

关于权限,外部服务不需要您大学的IT人员的时间。

For example, Bitbucket (using Mercurial) now allows unlimited private repos with up to 5 users. I'm guessing each new weekly pair of students is working on a new project together, which means they can just initialize the repository, add the other user, and away they go.

例如,Bitbucket(使用Mercurial)现在允许最多5个用户的无限私人回购。我猜每个新的每周一对学生正在一起研究一个新项目,这意味着他们可以只是初始化存储库,添加其他用户,然后就可以了。

If they are not working on a new project every week, permissions would have to be removed and added, and I'd encourage them to have multiple repos (one per account) on Bitbucket so each student has continued access. (This would be a good idea anyway, but for only week-long projects, it may be simpler to just have one student account own the repo and the other with permission.)

如果他们不是每周都在处理一个新项目,那么就必须删除并添加权限,我鼓励他们在Bitbucket上有多个repos(每个帐户一个),这样每个学生都可以继续访问。 (无论如何这都是一个好主意,但对于长达一周的项目,只有一个学生账户拥有回购可能更简单,而另一个则允许。)

Regarding which VCS, I believe Mercurial will be best given your platforms—TortoiseHg being particularly good for new users to explore, if they're unfamiliar with (and you don't have time for them to learn) command-line interfaces.

关于哪个VCS,我相信Mercurial最适合你的平台 - 如果他们不熟悉(并且你没有时间让他们学习)命令行界面,TortoiseHg特别适合新用户探索。

Specific to your situation, the advantage of DVCS is their copy on the university server (if there is one) is a fully-fledged repo. You may find it convenient for you or TAs to have access, which should be simpler to setup and would last all semester instead of change weekly.

根据您的具体情况,DVCS的优势在于他们在大学服务器上的副本(如果有的话)是一个完全成熟的回购。您可能会发现方便您或助理可以访问,这应该更容易设置,并且可以持续所有学期而不是每周更改。

#13


3  

Setting up a subversion repository is trivial; I frequently set one up as a one-off thing for small projects (such as developing code for an answer on Stack Overflow!), and I doubt anybody else who could learn an SCM system at all would have any trouble with it.

设置一个subversion存储库是微不足道的;我经常为小项目设置一个一次性的东西(例如在Stack Overflow上开发代码以获得答案!),我怀疑任何能够学习SCM系统的人都会遇到任何问题。

$ svnadmin create /home/cjs/repo
$ mkdir my-project
$ cd my-project
$ vi hello.c
  [...hack hack hack...]
$ svn import -m 'Initial project import.' file:///home/cjs/repo
Adding         hello.c

Committed revision 1.

That said, sharing is certainly an issue. If the students always work together when they work simultaneously, they could use a USB drive, since they can just unplug it and pass it back and forth when one needs to comit, and the person who's going to program alone later can just hang on to it. That's not entirely convenient, though.

也就是说,分享肯定是个问题。如果学生在他们同时工作的时候总是一起工作,他们可以使用USB驱动器,因为他们可以拔掉它并在需要进行调试时来回传递,而以后单独编程的人可以坚持使用它。但这并不完全方便。

Another option, since they all appear to be working on a shared Unix system, is to create a directory with the execute but not read bit set for the rest of the group (or all users) and use a s3cr3t name for the repo under that, one that only the two students know. Passing that secret name on to the prof would allow him to examine student's repos at any time, as well. ("So you submitted the assignment on time, but the e-mail system lost it? Let me just look at the time of that commit....") A script could help set this up.

另一种选择,因为它们似乎都在共享Unix系统上工作,就是创建一个目录,其中包含为该组的其余部分(或所有用户)设置的执行但不是读取位,并在该目录下使用s3cr3t名称作为repo。 ,只有两个学生知道的。将该秘密名称传递给教授将允许他随时检查学生的回购。 (“所以你按时提交了作业,但是电子邮件系统失去了它?让我看看那次提交的时间......”)一个脚本可以帮助你设置它。

In fact, the more I think about that, the more I'm beginning to like it. In certain ways, it's simpler than the git solution because the student doesn't have to deal with passing patches around (or forgetting to do so) and the student will be forced to deal with merges before he commits, rather than once things are in the repository (with the subsequent ability to delay dealing with that indefinitely).

事实上,我越是想到这一点,我就越开始喜欢它。在某些方面,它比git解决方案更简单,因为学生不必处理传递补丁(或忘记这样做)并且学生将在被提交之前*处理合并,而不是一旦事情进入存储库(随后有能力无限期地延迟处理)。

#14


3  

UPDATE: Six years later I would never consider using subversion for anything ever again. Git is the way to go. So, while I still think SVN is a bit "simpler", it is just not even worth teaching anymore.

更新:六年后,我永远不会考虑再次使用颠覆。 Git是要走的路。所以,虽然我仍然认为SVN有点“简单”,但它甚至不值得教学了。

I've used CVS, SVN, Bazaar and Git (in that order of introduction) and I'd have to say for students that SVN is the way to go. In fact, while I was lead TA we implemented SVN as a replacement for the old "submit script" which was a tar and email script. Labstaff setup an Apache SVN-DAV based repository and using the authz file the TAs and instructor could control permissions for per-student directories and group projects at a very fine-grained level leaving students with a very simple path to their first commit. See my tutorial (credentials ripped out by the most recent TAs.. hmm..)

我已经使用过CVS,SVN,Bazaar和Git(按照介绍的顺序),我不得不对学生说SVN是要走的路。事实上,在我担任主要TA的同时,我们实施了SVN,以替代旧的“提交脚本”,这是一个tar和电子邮件脚本。 Labstaff设置了基于Apache SVN-DAV的存储库,并使用authz文件,TA和教师可以在非常细粒度的级别上控制每个学生目录和组项目的权限,使学生有一个非常简单的第一次提交路径。请参阅我的教程(由最新的TA掏出的凭据......嗯..)

Regarding the use of subversion without intervention by sys admins, I've done this as well in a group-project setting where none of my group members had ever used subversion before and most of them were committing with very little confusion (all but one). I also wrote a tutorial for setting up such a secure shared repository with only basic SSH access here.

关于在没有sys管理员干预的情况下使用subversion,我在组项目环境中也做到了这一点,我的组成员之前都没有使用过subversion,而且大部分都没有混淆(除了一个之外) 。我还写了一个教程,用于设置这样一个安全的共享存储库,这里只有基本的SSH访问权限。

I definitely disagree that git is the best VCS for beginners having experienced the blank looks enough at the mention of any VCS system, let alone the mac-daddy-written-by-Linus-himself VCS king, git. It is simply not true that git is no more complex than svn, and the lack of mature n00b tools alone is enough of a reason not to use it in this scenario. I just started using git for a new project that I am developing in Netbeans and already ran into serious limitations with the Netbeans integration. In a single semester you are not going to use any functionality that svn doesn't provide so git is overkill.

我绝对不同意git是初学者在提到任何VCS系统时经历过空白外观的最佳VCS,更不用说由Linus自己写的Mac-dad VCS之王,git。 git并不比svn复杂,并且仅仅缺乏成熟的n00b工具就足以成为不在这种情况下使用它的理由。我刚开始使用git来开发一个我在Netbeans中开发的新项目,并且已经遇到了Netbeans集成的严重限制。在一个学期中,你不会使用svn没有提供的任何功能,所以git是矫枉过正的。

#15


2  

Subversion on Windows can be as simple as setting up TortoiseSVN. There is a bit of a learning curve for using it (especially if you've never used a version control before), but you might help that by dedicating half a lesson to it and providing some powerpoint slides for them to download.

Windows上的Subversion可以像设置TortoiseSVN一样简单。使用它有一点学习曲线(特别是如果你之前从未使用过版本控制),但是你可以通过专门教一半课程并提供一些powerpoint幻灯片来帮助他们下载。

As for centralization - I've heard of websites that offer free SVN project hosting. A quick Google search turned up this page, but there are certainly more.

至于集中化 - 我听说过提供免费SVN项目托管的网站。一个快速的谷歌搜索出现在这个页面,但肯定有更多。

#16


2  

If you are looking for something that is really really esay to set up, then why not go for the free SVN hosting option, you don't have to set up a thing!

如果你正在寻找真正需要设置的东西,那么为什么不去免费的SVN托管选项,你不需要设置一个东西!

Sadly the two older ones that everyone would have pointed you to being Assembla, Unfuddle, have dropped support for their free hosting ( or at lest if you want them to private ), but you can still use Origo this give you both open and closed hosting.

可悲的是,每个人都会指出你是Assembla,Unfuddle的两个旧版本已经放弃了对他们免费托管的支持(或者至少如果你想让他们私有),但你仍然可以使用Origo这给你开放和封闭托管。

The advantage of this is that you can own all the projects and follow them all, and easily control the people who have access, and you don't have to worry about right for creating repos.

这样做的好处是,您可以拥有所有项目并全部跟踪它们,并轻松控制有权访问的人员,而您无需担心创建回购的权利。

If you do go this route, and you want to eliminate complexity then you must use a GUI svn application to make learning near trivial ( since I doubt there will be much merging going on ). I would recommend tortoisesvn, slips right into your windows explorer context menu.

如果你选择这条路线,并且想要消除复杂性,那么你必须使用GUI svn应用程序来使学习变得微不足道(因为我怀疑会有很多合并)。我会推荐tortoisesvn,直接进入你的Windows资源管理器上下文菜单。

#17


1  

I would say your best bet will be to try to work with your IT department to set up a system/method for your students to easily create new SVN/CVS repositories.

我想说最好的办法是尝试与您的IT部门合作,为学生设置一个系统/方法,以便轻松创建新的SVN / CVS存储库。

Probably you could get the IT department to give you the privileges necessary to create repositories for your students even if they won't give the priveleges to the students themselves. You could probably pretty easily write a few scripts to mass-create repositories from lists of students at the beginning of the semester.

也许您可以让IT部门为您提供为学生创建存储库所需的特权,即使他们不会给学生自己提供授权。您可以非常轻松地编写一些脚本,以便在学期开始时从学生列表中批量创建存储库。

#18


1  

RCS for linux.

RCS for linux。

I've found nothing simpler than RCS for Widows but not all the RCS ports work well so you have to try them which makes it non-simple. Windows just isn't simple for developers. The windows port from http://www.cs.purdue.edu/homes/trinkle/RCS/ is pretty good.

我没有发现任何比RCS更简单的Widows,但并不是所有的RCS端口都运行良好,所以你必须尝试它们,这使得它不简单。 Windows对开发人员来说并不简单。来自http://www.cs.purdue.edu/homes/trinkle/RCS/的windows端口非常好。