A version control system directly affects the synchronization effort \(E_{sync}\).
cd repo
hg export --git -r REV >000-patch.dif
hg export --git -r 685 >000-patch.dif
clone repository
cd ..
hg clone $( pwd )/repo repo-cherry
import the patch
cd repo-cherry
hg import ../repo/000-patch.dif
modify sources
create new patch
sed '1,/^$/p;d' ../repo/000-patch.dif >../repo/001-patch.dif
hg diff --git -r -2 >>../repo/001-patch.dif
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.
Note
If an import fails, added files are created, but not added to the repository. This must be done manually.