8. Version Control System

A version control system directly affects the synchronization effort \(E_{sync}\).

8.1. Cherry-Picking

8.1.1. Mercurial

cd repo
hg export --git -r REV >000-patch.dif
hg export --git -r 685 >000-patch.dif Adding additional changes to the patch

  1. clone repository

    cd ..
    hg clone $( pwd )/repo repo-cherry
  2. import the patch

    cd repo-cherry
    hg import ../repo/000-patch.dif
  3. modify sources

  4. create new patch

    sed '1,/^$/p;d' ../repo/000-patch.dif  >../repo/001-patch.dif
    hg diff --git -r -2 >>../repo/001-patch.dif
  5. re-create clone, apply final patch

    cd ..
    rm -rf repo-cherry
    hg clone $( pwd )/repo repo-cherry
    cd repo-cherry
    hg import ../repo/001-patch.dif

After testing, the pacth 001-patch.dif can be applied to the clean master repository.


If an import fails, added files are created, but not added to the repository. This must be done manually.

8.1.2. Git

|:todo:| git cherry-picking