Version Control in 2019

Boris Feld — Pierre-Yves David
octobus.net

Version Control before 2019

Version Control

  • Since 1972

  • Wave of Innovation

Solve

  • Older Generations

    • SVN, Perforce, CVS …
  • Alternative

    • Git, Mercurial, Pujil, Plastic SCM

Why ?

  • technical constraints,

  • Features,

  • new usages,

  • diversity.

Technical Constraints?

Large Code Base

Mono-Repo

  • Gather all code in a single repository,

  • Common repository but separated project,

  • Simplified collaboration.

Mono-Repo: Advantages

  • Simplification
    • Dependency
    • Standardisation
    • Tooling
    • Discovery

Mono-Repo: Advantages

  • Atomic Changes
    • Consistent state
    • Refactoring,
    • Continuous Integration.

Mono-Repo: Drawback

  • increased:

    • number of file,
    • history size,
    • storage and bandwidth,
    • server load.
  • access control

Solution: Narrow Clone

  • restricted to file needed,

  • reduce:

    • number of file,
    • storage and bandwidth,
    • history,
  • access control,

Solution: Narrow Clone

  • Full access still available

    • cross projects teams,
    • tooling and testing.

Narrow Clone: example

“Non-Source” Content

Non-Source File

  • binaries
  • test data,
  • media,
  • etc

Different File

  • few ability to diff,
  • larges,
  • hard to store,

Options?

  • artifact manager,
  • build system,
  • source control,

git-LFS

  • From Github,
  • extensible format,
  • standard network protocol,
  • (better) supported by Mercurial

LFS: example

Performances

Growing history

  • more and more changes,
  • project grow,
  • team grow,

Client and Server Load

  • spread load between multiple server
    • redundancy,
    • scaling,
  • caching,
    • less processing,
    • network locality,
  • storage sharing,

Improving algorithm

  • Eg: Idea from SCCS (1972)
    • git annotate js/src/jsapi.cpp
      • 9.951s
    • hg annotate js/src/jsapi.cpp
      • 7.690s
    • hg fastannotate js/src/jsapi.cpp
      • 0.360s

Strong Integration

  • kernel collaboration
  • dedicated file system,
    • Google,
    • Facebook,
    • Microsoft,

Strong Integration

  • user actions through other tools,
    • Github,
    • Gitlab,
    • Mozilla

Development Process

Development Process

  • new good practices
    • tests
    • code review
    • automatic formatting
    • … ?
  • impact on VCS?

Auto Formatting

  • clearer source
  • standard format:
    • Go
    • Rust
    • C/C++ (eg: Clang)
    • Python (eg: pep8/black)

Source of Friction

  • global and deep,
  • evolving,
    • configuration,
    • version,

Solution?

  • Working with the VCS

Code Review

  • catch bug,
  • share skills,
  • spread code ownership,
  • review your own code!

Stacked Approach

  • Series of atomic and clear changes,
  • progressive integration,
  • involve VCS and associated tooling
    • finer creation
    • finer update
    • etc…

Example

Collaborative Platform

  • code review,
  • continuous integration,
  • workflow merge, deployment
  • “classic” (ticket, wiki, etc)

Heptapod

  • effort toward Gitlab + Mercurial
  • working Prototype
  • come chat with us
  • https://heptapod.net

Closer Collaboration

  • dependant branches
  • intra-branch collaboration
  • exchanging draft
  • collaborative rewriting

Changeset Evolution

  • Exclusive feature of Mercurial
  • safe and simple distributed rewriting
  • help:
    • collaboration,
    • review,

Changeset Evolution demonstration

Conclusion

Conclusion

  • lots interesting issues
  • lots of solutions
  • future will be surprise-full
  • Mercurial is well armed to the future
  • long live free software alternatives

Questions ?

Questions

  • https://octobus.net
  • email: contact@octobus.net
  • IRC: #octobus-hg
  • https://mercurial-scm.org