Monotone (software) explained

Developer:The monotone team
Latest Release Version:1.1[1]
Programming Language:C++
Operating System:Unix, Linux, BSD, Mac OS X, Windows
Language:English, Italian, Swedish, Portuguese, German, Spanish
Genre:Revision control
License:GPL-2.0-or-later
Discontinued:yes

Monotone is an open source software tool for distributed revision control. It tracks revisions to files, groups sets of revisions into changesets, and tracks history across renames. The focus of the project is on integrity over performance.[2] Monotone is designed for distributed operation, and makes heavy use of cryptographic primitives to track file revisions (via the SHA-1 secure hash) and to authenticate user actions (via RSA cryptographic signatures).

History

Milestones

Monotone version 0.26 introduced major changes to the internal database structures, including a new structure known by Monotone developers as a roster.[3] Monotone databases created with version 0.26 can not exchange revisions with older Monotone databases. Older databases must first be upgraded to the new format. The new netsync protocol is incompatible with earlier versions of Monotone.

As Git inspiration

In April 2005, Monotone became the subject of increased interest in the FOSS community after Linus Torvalds mentioned it as a possible replacement for BitKeeper in the Linux development process. In a post on the Linux kernel mailing list, Torvalds praised Monotone and disparaged Subversion (and by extension, all client-server version-control systems):[4]

Instead of adopting Monotone, Torvalds decided to write his own SCM system, Git. Git's design uses some ideas from Monotone, but the two projects do not share any core source code. Git has a much stronger focus on high performance, inspired by the lengthy history and demanding distributed modes of collaboration used by Torvalds and the other Linux kernel authors. Torvalds later commented on Monotone's design and performance:

A key issue debated[5] was whether the replacement of BitKeeper should support cherry picking, whereby a tree maintainer can approve a subset of patches while rejecting others on an individual basis. Torvalds argued that this approach "results in the wrong dynamics and psychology in the system" by shifting burden to the upstream maintainers rather than forcing downstream maintainers to put more effort into keeping their trees free from garbage. He further argued that Monotone is correct in its aversion to cherry-picking as a feature, but then failed to take it far enough by not making it easy enough to "throw away" unclean working trees after their purpose is served.[6] Torvalds also noted his perception that Monotone at that time had not achieved the performance level required by a project as large as Linux kernel development.

Design

Like GNU arch, and unlike Subversion, Monotone takes a distributed approach to version control. Monotone uses SHA-1 hashes to identify specific files or groups of files, as with Git and Mercurial, in place of linear revision numbers. Each participant maintains their own revision history, stored in a local SQLite database.

Integrity

Prior to some heavy optimisation in revision 0.27, Monotone's emphasis on correctness over optimisation was often blamed for poor initial experiences. The first action of a new user is often to synchronize (clone) a large existing Monotone database, an action which often took hours for large databases, due to the extensive validation and integrity checking which Monotone performs when revisions are moved through the network. Once the initial (clone) database is populated, subsequent actions usually proceed more rapidly., there is still room for further optimisation on some rarer functions.

Workflow

Monotone is especially strong in its support for a diverge/merge workflow, which it achieves in part by always allowing commit before merge.[7]

Networking

Although Monotone originally supported a variety of networking protocols for synchronizing trees, it now exclusively uses a custom protocol called netsync, which is more robust and efficient, and shares some conceptual ground with rsync and cvsup. (However, as of version 0.27, it is possible to use the netsync protocol over any stream, notably including ssh connections.) Netsync has its own IANA-assigned port (4691) and older versions of it are supported by a Wireshark plug-in for traffic analysis. There is no separate Monotone server because any Monotone client can act as a server.

Other features

Other features of Monotone include:

Drawbacks

, possible drawbacks of Monotone include:

Implementation

Monotone is implemented in modern-dialect C++ on top of the Boost library, the Botan cryptography library, and the SQLite database library. Monotone supports customization and extension via hook functions written in the Lua programming language. The monotone build process is automated with BuildBot and includes extensive regression tests.

See also

Notes and References

  1. Web site: NEWS. May 4, 2014. July 16, 2019.
  2. Web site: 7 Version Control Systems Reviewed. 2010-11-01. September 18, 2008.
  3. http://lists.gnu.org/archive/html/monotone-devel/2005-11/msg00102.html What are rosters
  4. Web site: LKML: Linus Torvalds: Kernel SCM saga. LKML. Linus Torvalds. April 6, 2005. Linus Torvalds.
  5. Web site: LKML: David Woodhouse: Kernel SCM saga. 2017-02-23. David Woodhouse. 2005-04-07.
  6. Web site: LKML: Linus Torvalds: Re: Kernel SCM saga. LKML. Linus Torvalds. April 7, 2005. Linus Torvalds.
  7. Web site: Dealing with a Fork - monotone documentation. 2010-11-21.