Difference between revisions of "Dvcs"

From Joomla! Documentation

(Additional Reading Material)
Line 52: Line 52:
* [ How Git Encourages Open Source Contribution]
* [ How Git Encourages Open Source Contribution]
* [ Subversion Re-education]
* [ Subversion Re-education]
* [ How Git shines above Subversion at Merging]
=DVCS comparison=
=DVCS comparison=

Revision as of 11:12, 6 September 2010


What is a DVCS?

Using distributed version control means that everyone is able to commit without affecting others, and this is the case because everyone has a personal repository. In a distributed model like this, anyone can be a server and a client. Imagine SVN gone P2P.

In more concrete words, you do not need to connect to a server to commit, committing is personal, and until you are sure you have the final version you then share your changes, but what really matters is that, along the way, versioning was helpful to you and not intrusive to everyone else, you don't need to refrain from committing, at all; in a centralized system you would have to pollute everyone's code to achieve that level convenience, but with a distributed system you no longer face the "to commit or not to commit" dilema, you commit when you want to share all your changes. You can even commit offline. In a DVCS everyone represents a different branch, so branch merging is a thing that happens extremely often and mostly without conflicts, at all.

The distributed nature of these systems make them need to gather more data about the changes in the files, specially branches, and this allows the DVCS to handle conflicts more intelligently (meaning getting around conflicts automatically) and adapt to more complex workflows without hassle, take for instance how Mootools development looks before and after switching to git (thumbnails at right).

Mootools before git, development was linear, changes must happen one after another
Mootools after git, changes happen when they naturally happen.

Today there are lots of services such as (Mercurial), Google Code (Mercurial) (Git), (Git) and (Bazaar), that allow everyone to get a public repository that anyone can see, that anyone can fork (i.e. checkout, clone), and more importantly, that anyone can contribute to by simple social dynamics.

The typical setup of a centralized system such as CVS and Subversion involve a server with a repository and users as clients that push and pull the changes remotely. Everyone must be in tone with the same repository at the same time, if they want to commit.


In a DVCS setup there is often also a server that has a central repository where everyone pushes changes, however this time, each one of the clients has its own local repository (to which they commit their own changes), so they only need to connect to the central repository when feeling like sharing the changes. Now commits and updates happen locally, and repository synchronization through push/pull is the only thing one needs to be connected for.


But because anyone with a repository can also act as server in a distributed model like this, peers can push/pull between themselves, and this allows people to cluster in teams and then integrate their changes with other teams. The following diagram denotes what would happen in a LAN/VPN environment using a DVCS, when each person opens up their local repository.

DistributedVCS Complex.png

There is no need for commit access for local repositories, one commits locally and authorization only happens when writing to or reading from other repositories. IDE and graphical integrations for DVCSs are mature and widely used.

Why would Joomla! benefit from this

The Joomla! community can benefit from this kind of tools because collaboration turns out to be more accessible, fluent and open. This way Joomla! can get more contributors and be more visible to developers through services like github and bitbucket.

After laying out in the previous section the kinds of setups there can be, the following diagram shows what actually happens in the real life of an open source project:


  • Contributors can step in immediately, since:
    • All they would need is to fork the project from the official Joomla repository in a service like or
    • No need for them build patches, once they are finished, they can just ask others to pull from their repository.
  • A more open development process for everyone.
  • Contributors can team up and handle their own merging, thus giving greater quality contributions in the end.
  • Less work for integrators (merging branches is trivial (under 5 minutes))
  • Contributors can have their own branches without affecting others' (but being able to share them if necessary).
  • ...

However, there are some potential problems:

  • Grasping the distributed model represents somewhat of a learning curve (unbiasing oneself from CVS/SVN is a general recommendation).
  • Everyone must be willing to adopt the tool.
  • ...

Additional Reading Material

DVCS comparison

Aspects taken into account to consider both git and Mercurial:

  • IDE Compatibility
  • 3rd party hosting
  • MacOS Compatibility
  • Windows Compatibility
  • Linux Compatibility
  • Shell integration


OS Binaries

Shell Integration

IDE Integration

Patching procedure

Where to start

Public Repository Hosting


  • Has, probably the most prominent online service of its type
  • Lots of advanced utilities


  • Harder to learn
  • Not official (but well maintained) and quirky Windows support


OS Binaries

Shell Integration

IDE Integration

Patching procedure

Where to start

Public Repository Hosting


  • Easy to learn
  • Good Windows support (works the same in al OSs)
  • Has Google Code and


  • Short in advanced comands in comparison with git (for example, git rebase)

The case for Joomla

Git is probably the most popular DVCS to date, however, it has a relative weakness that sets it appart from Mercurial: its Windows support is not as good and straight forward.

The possibility for adopting both DVCSs was discussed in the mailing list for the reason that it is possible for Mercurial users to push to a git repository in a lossless fashion thanks to a plugin developed by the guys at github. Since both Git and Mercurial communities are big enough, the project would be lowering the barrier to an even broader contributor audience.


  • Core Repository within JoomlaCode
  • Official repositories in Github and Bitbucket
  • ...




Action Plan