This question already has answers here:
Closed 13 years ago.
Possible Duplicate:
What is the difference between all the different types of version control?
Dear all:
I have just started to use SVN for version control but there always is a lot of talk going on about Version Control system like GIT, Mercurial, SVN, CVS etc.
What makes one version control system better from another? Or
Is one type of version control system good for one task and another type good for some other task? Or
Are all the version control system basically the same?
No, I don't think they're the same. The centralized (e.g., SVN, CVS, etc.) versus distributed (Git, Mercurial, etc.) repository is a fundamental difference that reflects the way your development team operates.
I use SVN. I think that my organization's collective heads would explode if a distributed SCM system like Git was introduced. It's such a different concept for most people.
Distributed Version Control Systems (DVCSs) like GIT, Mercurial and Bazaar do collectively have advantages in flexibility of workflow and operation compared to centralized CVSs such as SVN or CVS. See the discussion on wikipedia.
As for the choice among DVCSs, that's as highly debated as (say) that between vi and emacs;-). On a "horses for courses" basis you might pragmatically pick hg (Mercurial) if you're going to be using code.google.com, Bazaar if you're going to use Launchpad, GIT if you're going to use github, for example.
Most of it is personal preference; Git and Mercurial are distributed source control systems, and better if you have a distributed team; for the majority of development environments where the team is in the same location or connected to a single server, then the regular version control systems like Subversion are good enough.
I've used Git and like it, but I actually like Subversion better. If you're using SVN you should be fine.
Related
Google stores all its codebase in a single repository called piper [1] [2] [3].
It has an approach that is very different than open source alternatives do (centralized 'cloud' service) and aims at scaling to a repository with billions of files, thousands of developers and millions of commits [1].
It doesn't seem Google open-sourced it nor plan to do so (contrary to their build system blaze and some other tools [4]).
Are you aware of any open source version control system with an approach similar to piper?
The short answer is no, it doesn't seem to exist.
As you can read in a Quora article, "it’s hard to tell where the version control system ends, and where some of the other parts of the development toolchain begin".
So, first, you need to be clear in what "features" you are interested in since you can be interested in a feature that is not Piper's responsibility.
Also, keep in mind that your server disk space and OS would limit the file count/size before the chosen VCS.
If you need a Centralized VCSs and billions of files, you could go with SVN or OpenCVS.
If you need a Distributed one with thousands of developers and millions of commits, take a look at Git, Bazaar, Bitbucket or Mercurial.
But do you really have all those requirements?
AFAIK there's no Piper's open source equivalent on the market.
In order to better understand Centralized and Distributed VCS, take a look at this Comparison between Centralized and Distributed Version Control Systems
Also, take a look at what is Google's repository like?
Two recent developments bring Piper-like features to Git: VFS for Git and sparse-checkout.
The first: Microsoft recently open-sourced VFS for Git which feels like it brings some of Piper's monorepo features to Git.
VFS for Git virtualizes the filesystem beneath your Git repository so that Git tools see what appears to be a normal repository when, in fact, the files are not actually present on disk. VFS for Git only downloads files as they are needed.
VFS for Git also manages Git's internal state so that it only considers the files you have accessed, instead of having to examine every file in the repository. This ensures that operations like status and checkout are as fast as possible.
This is used by Microsoft for >4000 developers in a >300GB repo with >2 million commits in their Windows Git repository.
The second: sparse-checkout for Git v2.25.0 allows you to checkout just a subset of your monorepo. This should speed up commands like git pull and git status. See this blog post for more info. Unfortunately, you have to manually specify which subdirectories you want to check out with Git sparse-checkout, whereas Piper handles this transparently for developers.
Google has built more than one version control tool. Piper is specialized for the needs of the google monorepo.
When google built android, it built gerrit and repo to handle version control. Repo is used to work with many git repositories at once, each of which may have its own maintainers and release cycles. Open source dependencies don't lend themselves to a monorepo, without the control of a single organization enforcing things such as a global build status or global refactoring. Also, the requirements of piper simply don't apply in most places, such as performance of commits keeping up with requests.
Repo Docs
Gerrit Home
There is no open-source equivalent to piper.
Note that piper is old and has an old-fashioned API dating from the perforce era. I guess you would want a more modern workflow, similar to what modern DVCS offer.
I'm pretty sure your codebase isn't as large as Google's 86TB repository. Do you really need the same thing?
I'm pretty sure you could use a monorepo based on git or mercurial. And maybe evolve to a virtual file-system such as
VFS for git if you ever need it.
Meta is open sourcing Sapling which is based on our internal source control system, but also has an added layer that allows it to be backed by a regular Github repository if you want the semantics without the scalability.
I've never worked at Google and don't know how different it is to their mono-repo setup, but I've been at Meta for six years and now that this is open source I have immediately transitioned to Sapling in all of my personal projects.
Hi
I'm currently seeing a need for handling source code for a few projects I'm working on. I have no need for external hosting, but I do need to have a structure internal in my development environment.
So, how would you guys recommend to handle this? To you just place the files on a file share in your environment, or do you set up some kind of versioning systems? I'm quite new to this, but I would like to have some way of getting back to old versions of my code, I would like to have the source code centrally stored so I can reach if from bothmy laptop and workstation.
/Andy.l
Use a source control management system - I would suggest using a distributed one such as Git or Mercurial, so you don't need a server or need to be online to work.
You can still have a central location where you push and pull stuff from if you really want to.
If you must have a server, go with SVN - it is easy to setup and widely used.
With all of these options, there are hosted services that you can use as a central store.
If you are using windows OS, then Visual SVN is quite good. You can install it on the server and use a client like Tortoise SVN to connect to it from other machines. The basic version is free to use.
Definitely use a version control system, it will allow you to do some nice workflows on your coding day and have all securely stored. There are several good free vcs (git, mercurial, subversion, etc). For Some time I used a combination of git + dropbox or sugar sync to back up and share my repos
http://git-scm.com/
Do setup a source control repository. Using a SCM, has nothing but benefits.
With respect of what SCM system to chose, to very simple repositories to setup and learn are Mercurial (distributed), and Subversion (centralized). I know you said you wanted centralized access to your sources, but keep in mind that that doesn't meant you can't use Mercurial for that purpose.
Here's a great tutorial on Mercurial by Joel Spolsky.
Lots of choices based on environment, etc.
SVN is an excellent all-around choice for centralized source control. You can also use Mercurial and Git internally if you prefer DVCS (even in a local environment).
In any case, regardless of what version control system you have - get one. Even if it's just one developer doing personal projects, source control is a must.
There's no question that setting up a SCM makes sense and has only advantages. Which SCM to use depends on several circumstances:
Do your co-workers already know any SCM? We're using SVN and I think it would be quite hard to teach my colleagues the concepts of a DVCS like git
In my opinion, using a DVCS like git needs more discipline during work: you have to remember to push to the central repository.
But this is also an advantage: you can create your own development branches and work on them without publishing them to the rest of your colleagues (saves reputation in some cases :-))
If you or your co-workers often work from remote, using a DVCS is more comfortable than using a centralized one like SVN: you need no connection to your central repository but can still checkin, create branches and (quite important) view the complete history of your project without connecting (e.g. via VPN) to your servers at work.
For a centralized VCS, I can recommend SVN (setup as Hps supposed)
As DVCS I can recommend Git (msysgit with tortoisegit)
If you decide to use SVN, you can still use git-svn on the clients: the repository is being run with SVN, but anyhow, you get the advantages of a DVCS while being offline.
Is there a version control client that would support more VCSs? I'm mainly interested in Subversion, git and Mercurial, but others like TFS would be nice too. Like a bare Eclipse with just the right plugins installed?
Update: I'm looking for a GUI client although a command line one would be technically interesting too.
Amp's goals are to support all major repository formats, all major network protocols, all major workflows and all major commandline interfaces. However, at the moment it only supports Mercurial. Support for Git, Bazaar, Subversion, CVS and darcs is planned.
As for TFS: is there even an open specification for it? If not, then implementing another client would basically amount to massive amounts of reverse engineering. Judging by other attempts at reverse engineering Microsoft protocols, formats and products, we can assume that this is going to take at least 10 years.
Both Git and Mercurial have adapters that let them talk to Mercurial, Git, and Subversion.
I don't know of any implementations of a TFS client other than Microsoft's.
What were the reason for chosing Mercurial as a basis of FogCreek Kiln, a source control management system with tightly integrated code review, and FogBugz integration?
Why Mercurial, and not other (distributed) version control system, like Bazaar, Git or Monotone, or creating own version control system like Fossil (distributed software configuration management, including bug tracking and wiki) did?
What were features that make FogCreek choose Mercurial as Kiln engine?
Here's an answer from one of the Kiln developers.
It provides real branching.
It's easy to use.
Windows support is very good.
It's fast.
It's powerful.
It's easily extensible.
Check out the full details here. They explained themselves quite thoroughly.
Original answer (Nov. 2009, GitHub has only 1 years, Git only 4)
I really do not know, but I would venture "better Windows support", Windows being potentially the main platform for most of their client base.
Git is still too much a "unix/linux" product, with a "hopeful" Windows support through mSysGit.
Just read the tone of some of the MSysGitHerald articles, like the ninth one:
For a very long time, msysGit was pushed forward by the gang formed of Hannes, Steffen, Sebastian Schuberth and myself [Johannes Schindelin]. At some stage I got so frustrated that I stopped working on msysGit altogether. The reason is simple: it was no more fun. Way too many people asked for fixes or enhancements, and none of them offered contributions of their own. As I am not a Windows person (being a happy Linux user since 1994), the work on mSysGit was not rewarding enough for me to continue. So I stopped.
But in the meantime, things have changed.
We got contributions by ...
That does not inspire a great deal of confidence when it comes to push forward that tool to your IT boss. I am very happy with Git for a personal usage, and very grateful from the hard work of all mSysGit contributors, but in a big company, I would have a hard time making Git the default DVCS tool adopted by our Windows developers.
Both because of the learning curve, but mainly because the support level is not there yet.
That is only a personal opinion, and if you have a different experience deploying Git successfully, more power to you.
Mercurial being the closest DVCS to Git, and based on portable Python scripts (and not linux/unix-based sh scripts), it may be a pragmatic choice.
Update 2018, seven years later: yes, the Windows support for Git is now a reality.
And Microsoft has its entire Windows codebase into one (giant) Git repository: See "The largest Git repo on the planet": 3.5M files, 300GB, 4,000 engineers producing 1,760 daily “lab builds” across 440 branches in addition to thousands of pull request validation builds.
But this is with the addition of GVFS (Git Virtual FileSystem), which allows to dynamically download only the portions you need based on what you use.
This is not yet in Git native, although its integration has begun last Dec. 2017, with the implementation of a narrow/partial cloning.
Kiln advertises Git support as well:
Kiln, our best-in-class DVCS hosting solution, supports Git as well as Mercurial! GitHub is great. FogBugz is great. What could
be even better? How about integrating them! FogBugz can be notified by
GitHub Web Hooks whenever an incoming changeset comment mentions a
case.
When I looked at DVCS system I like Mercurial because.
The Mercurial developers seems to care about Microsoft Windows users.
The Mercurial developers do not thinks of Microsoft Windows users as being Unix users that are forced to use Windows.
Unlike a lot of open source developers, the Mercurial developers don't seem to hate Microsoft for making money.
Maybe the Kiln developers thought the same...
(All the main DVCS systems are good enough, otherwise other factors would come into play more)
This answer so now clearly out of date as Microsoft owns github and git is now in very common use on Windows.
I can't speak for FogCreek, but I know when I was choosing which DVCS to use many people commented that git does not work well on Windows (unless it's run in cygwin). Since FogBugz is designed to run on either Windows or a Linux systems (from what I understand--I am not a user myself) having an extra layer (cygwin) to run git may have been the determining factor there. I don't know much about Bazaar or Monotone, so I can't offer any feedback there.
I think the issue of hg vs. git is a red herring, as the OS support issue alone is a major difference. The real question is why hg rather than bzr, as these two are very similar and hg developers themselves consider bzr to be their real competition and vice-versa. Sun conducted an extensive evaluation of both when it came to choosing a DVCS for OpenSolaris and OpenJDK. One would like to know what was the process used for picking hg at FogCreek. All we got so far by way of answers (apart from the OS support issue) are generalities.
So now they add also git:
One of the biggest new features is Kiln Harmony, which lets you
operate on Kiln repositories using either Git or Mercurial. So you can
push changes to a Kiln repo using Git and then pull them using
Mercurial. This means that you never have to decide whether you want
to use Git or Mercurial.
I have just begun working on a project which uses Mercurial as a version control system, and I need some basic tips on how to use this. Please use this question to give some introductory tips on this technology.
The official Mercurial site
Especially, I am looking for tips on the best programs to use and the best techniques to use (branches, in and out-checking etc. I need to learn the best-practices!)
I know you already have the Mercurial site but the resource most useful to me was the Mercurial book. It's an excellent overview of the program and how to use it.
I found the best way to learn Mercurial was just to use it on a project. I imported into Mercurial a project I had exported from subversion and did some regular development with it. I made sure to clone the repository for different changesets so that I could get used to the merging and updating. I haven't learned all of the advanced uses but I'm now on a pretty firm footing with it and haven't switched back to Subversion yet.
A lot of projects have different techniques for commit workflow. Some have changes pushed from the developers, like centralized systems, and some will pull the changes from contributors (Linux, for example). It's hard to generalize too much without knowing the process for your project.
This is how I do my development:
Centralized tree on a file share or http, called project-trunk or project that is the definitive project version
A clean tree on my system that I clone from the remote repository and use to push back to the repository. I then clone from this tree for my changes. I call this tree project-local
Clone the project-local tree for each of my changes: eg. project-addusers, project-141, etc.
After I am finished with the commits to a tree, I then push the changes to the project-local repository
Finally, push the changes in the project-local to project-trunk
I have the clean project-local tree because then I can push all the changesets back to the trunk at one time, which is helpful if there is a group of related changes that need to push back together.
As for tools, it depends on your platform. I just use the vanilla command line tool. Coming from TortoiseSVN, it was a bit of a change to go to the command line. But I'm fine with it now. I tried using TortoiseHg but it didn't function well on my Windows 7 x64 virtual machine. I hear it's much better on the supported 32-bit platforms.
Here is a helpful tutorial on Mercurial written by Joel Spolsky.
It covers basic usage and commands, as well as how to work with Mercurial at a more conceptual level. If you are already familiar with SVN, then the first part is definitely worth reading: it talks about the major conceptual differences between SVN and Mercurial, because trying to use Mercurial in the same way that you use SVN is asking for trouble.
Have a look at the Mercurial book, or at this Mercurial tutorial.
Depending on your background with other source control tools, I would also suggest a specific SCM-whatever to Mercurial guide. For example, have a look at this guide for Subversion users.
Another good resource for getting your head around the whole "distributed" source control idea is: http://betterexplained.com/articles/intro-to-distributed-version-control-illustrated/ ... with helpful diagrams!
If you use the latest TortoiseHG client and include the install directory in your PATH environment, you will be able to use both the nice GUI they provide, and the command line 'hg'
I cannot recommend using the mq extensions too much. They make for a great 'working repository' environment.
I use the queues to manage local changes against a subversion repository. I do my local short term changes and use mercurial to keep in sync with subversion and the rest of the team.
A few of Steve Losh's blog posts are good, even though they're a couple of year old now. They mainly deal with how to work with branching.
Guide to Branching in Mercurial
Branch Workflows - Branching as needed
Branch Workflows - Stable and Default
It's also worth looking at his hgtip.com site.
In addition to the Mercurial Book and the Hg Init tutorial, I'll like to mention the example-driven guide I've written:
Mercurial Kick Start
It shows how to get started with Mercurial and also covers some more advanced concepts such as named branches and hgsubversion. I've used it when teaching Mercurial to new users and they seemed to like it.