|
SCM feature: |
Git [-] |
Mercurial [-] |
Subversion [-] |
Visual SourceSafe [-] |
Add to comparison: +CVS |
|
Atomic Commits |
Git: Yes. Commits are atomic. |
Mercurial: Yes. |
Subversion: Commits are atomic. |
Visual SourceSafe: No. VSS commits are not atomic. |
|
|
Files and Directories Moves or Renames |
Git: Renames are supported for most practical purposes. Git even detects renames when a file has been changed afterward the rename. However, due to a peculiar repository structure, renames are not recorded explicitly, and Git has to deduce them (which works well in practice). |
Mercurial: Yes. Renames are supported. |
Subversion: Yes. Renames are supported. |
Visual SourceSafe: Affects the whole history, it's like renaming a file in the CVS repository. There is a kludgy workaround using "share-rename,move,delete" that gets what you want. |
|
|
Intelligent Merging after Moves or Renames |
Git: No. As detailed in the Git FAQ: "Git has a rename command git mv, but that is just a convenience. The effect is indistinguishable from removing the file and adding another with different name and the same content." |
Mercurial: Yes, intelligent merging after renames is supported. the Mercurial book says: "If I modify a file, and you rename it to a new name, and then we merge our respective changes, my modifications to the file under its original name will be propagated into the file under its new name. (This is something you might expect to 'simply work,' but not all revision control systems actually do this.)" |
Subversion: No. "svn help me" says "Note: this subcommand is equivalent to a 'copy' and 'delete'." There's a bug report about it. |
Visual SourceSafe: No, renames are not intelligent. |
|
|
File and Directory Copies |
Git: No. Copies are not supported. |
Mercurial: Yes. Copies are supported |
Subversion: Yes. And it's a very cheap operation (O(1)) that is also utilized for branching. |
Visual SourceSafe: Yes. Copies are supported up to a point. |
|
|
Remote Repository Replication |
Git: Yes. This is very intrinsic feature of Git. |
Mercurial: Yes. |
Subversion: Indirectly, by using Chia-liang Kao'sSVN::Mirror add-on or Shlomi Fish' SVN-Pusherutility. |
Visual SourceSafe: Not directly possible with the included GUI or command line tools; ssarc and ssrestor might be useable |
|
|
Propagating Changes to Parent Repositories |
Git: Yes. (The Linux kernel development process uses this extremely often). |
Mercurial: Yes. |
Subversion: Yes, using either Chia-Ling Kao's SVN::Mirror script or the svn-push utility by Shlomi Fish. |
Visual SourceSafe: Not directly possible with the included GUI or command line tools; ssarc and ssrestor might be useable |
|
|
Repository Permissions |
Git: See contrib/hooks/update-paranoid that ships with Git. See the path_rules code for the closest equivalent to svnperms. |
Mercurial: Yes. It is possible to lock down repositories, subdirectories, or files using hooks. |
Subversion: Yes. The WebDAV-based service supports defining HTTP permissions for various directories of the repository. |
Visual SourceSafe: Project specific permissions (read, write, delete, destroy) can be set per user; but see "Networking Support": this makes "Repository Permissions" a hindrance to accidental damage but cannot prevent intentional damage. |
|
|
Changesets' Support |
Git: Yes, Changesets are supported, and there's some flexibility in creating them. |
Mercurial: Yes. Changesets are supported. |
Subversion: Partial support. There are implicit changeset that are generated on each commit. |
Visual SourceSafe: No. Changes are file-specific. |
|
|
Tracking Line-wise File History |
Git: Yes. (git blame). |
Mercurial: Yes. (hg annotate) |
Subversion: Yes. (svn blame) |
Visual SourceSafe: Not directly, but it's possible to compare any two versions using a visual differ. |
|
|
Ability to Work only on One Directory of the Repository |
Git: No. However, commits could be restricted somewhat, see the "Repository Permissions". |
Mercurial: It is possible to commit changes only in a subset of the tree. There are plans for partial checkouts. |
Subversion: Yes. |
Visual SourceSafe: Yes. |
|
|
Tracking Uncommited Changes |
Git: Yes. Also, branches are very lightweight in Git, and could be considered a kind of storage for "uncommitted" code in some workflows. Also see the "git stash" command. |
Mercurial: Yes. Using hg diff. |
Subversion: Yes. Using svn diff |
Visual SourceSafe: Yes, using integrated diff tool. |
|
|
Per-File Commit Messages |
Git: No. Commit messages are per changeset. |
Mercurial: No. |
Subversion: No. There is no such feature. |
Visual SourceSafe: Since changesets are not supported, yes. |
|
|
Documentation |
Git: Medium. The short help is too terse and obscure. The man pages are extensive, but tend to be confusing. The are many tutorials. |
Mercurial: Very good. There is a companion bookand a wiki. Every command has integrated help. |
Subversion: Very good. There is a free online book and some online tutorials and resources. The book is written in DocBook/XML and so is convertible to many different formats. The command-line client also provides a good online help system that can be used as a reference. |
Visual SourceSafe: Medium. Help file which is sometimes useful. However, the interface is reasonably intuitive so documentation isn't needed as much. |
|
|
Ease of Deployment |
Git: Good. Binary packages are available for modern platforms. C compiler and Perl are required. Requires cygwin on Windows, and has some UNIXisms. |
Mercurial: Excellent. Binary packages are available for all popular platforms. Building from source requires only Python 2.3 (or later) and a C compiler. |
Subversion: A Subversion service requires installing an Apache 2 module (if one wishes to use HTTP as the underlying protocol) or its own proprietary server. The client requires only the Subversion-specific logic and the Neon WebDAV library (for HTTP). Installation of the components is quite straightforward, but will require some work, assuming Subversion does not come prepackaged for one's system. |
Visual SourceSafe: Very good - an installation package which does the work. When you create a repository it installs the exe's in a directory and you can run them from there if you need to. |
|
|
Command Set |
Git: Command set is very feature-rich, and not compatible with CVS. |
Mercurial: Tries to follow CVS conventions, but deviates where there is a different design. |
Subversion: A CVS-like command set which is easy to get used to for CVS-users. |
Visual SourceSafe: A bit of an afterthought. It's possible to do basic things, but it's really geared up for using the GUI. |
|
|
Networking Support |
Git: Excellent. Can use native Git protocol, but works over rsync, ssh, HTTP and HTTPS also. |
Mercurial: Excellent. Uses HTTP or ssh. Remote access also works safely without locks over read-only network filesystems. |
Subversion: Very good. The Subversion service can use either WebDAV+DeltaV (which is HTTP or HTTPS based) as its underylying protocol, or its own proprietary protocol that can be channeled over an SSH connection. |
Visual SourceSafe: VSS uses a Windows network share which has to be writable for the VSS users (since this means doubling maintenance for new users). Add user in VSS and to share permissions. the share is most often world-writable, as is the default when creating a share) It does not perform well over a slow network connection. |
|
|
Portability |
Git: The client works on most UNIXes, but not on native MS-Windows. The cygwin build seems to be workable, though. |
Mercurial: Excellent. Runs on all platforms supported by Python. Repositories are portable across CPU architectures and endian conventions. |
Subversion: Excellent. Clients and Servers work on UNIX, Windows and Mac OS X. |
Visual SourceSafe: The Microsoft Product is Windows only. MainSoft ships a version of it for some UNIX platforms. |
|
|
Web Interface |
Git: Yes. Gitweb is included in distribution. |
Mercurial: Yes. The web interface is a bundled component. |
Subversion: Yes. ViewVC, SVN::Web, WebSVN,ViewSVN, mod_svn_view, Chora, Trac,SVN::RaWeb::Light, SVN Browser, Insurrection andperl_svn. Aside from that, the Subversion Apache service provides a rudimentary web-interface. |
Visual SourceSafe: It is possible to code one using the API, but no official or third-party one exists. |
|
|
Availability of Graphical User-Interfaces. |
Git: Gitk is included in distribution. Qgit and Git-gui tools are also available. |
Mercurial: History viewing available with hgit extension; check-in extension (hgct) makes committing easier. Some third-party IDEs and GUI tools (e.g. eric3, meld) have integrated Mercurial support. |
Subversion: Very good. There are many available GUIs: RapidSVN (cross-platform), TortoiseSVN (Windows Explorer plug-in), Jsvn (Java), etc. Most of them are still under development. |
Visual SourceSafe: Standalone GUI comes with it, plus SCCI plug-in for MS Visual Developer Studio. There is an Eclipse plug-in. |