Version control tools for Kerrighed

Jean Parpaillon INRIA-IRISA – PARIS Team The Facts

✔ Development based on 2 living projects:

✔ Linux: evolving quickly, not managed by us

✔ Kerrighed:

✔ a trunk, many branches (~one by developer) ✔ Approx.: ✔ 1 feature = 1 devel ✔ 1 devel = several features

2 Needs

✔ Following Linux development ✔ For trunk devels: picking features from branches ✔ For branches devels:

✔ merging changes from trunk

✔ pushing changes to trunk

✔ Integration (generic distros, specific needs, etc):

✔ explosion of branches

✔ need for splitting features

3 Solutions/Ideas

: to follow Linux development.

✔ Issues:

✔ no public host with git (but kernel.org or alioth.debian.org) ✔ migration from SVN ✔ SVN helpers:

✔ svnmerge

✔ SVK

tools (independent from SCM):

✔ quilt

4 Quilt - Concepts

✔ Independent from SCM ✔ Manage a stack of patches

✔ stack defined in a 'series' files: one line = one patch

✔ patches in a 'patches' directory

✔ Commands

✔ quilt push [-f|-a]: apply one/all patches (if no error/hunk)

✔ quilt pop: unapply one/several patches

✔ quilt new: add new patch on top of stack

✔ quilt refresh: update current patch with source tree

✔ Other commands for stack status, impacted files, etc. 5 Quilt – Example (1)

✔ Linux vanilla source tree in linux/ ✔ Get patches/ dir (from SVN) in linux/patches/

✔ patches/kdb/kdb-common

✔ patches/kdb/kdb-i386

✔ patches/kerrighed-core

✔ patches/series:

✔ kdb/kdb-common ✔ kdb/kdb-i386 ✔ kerrighed-core ✔ Apply all patches: quilt push -a

6 Quilt – Example (2)

✔ Import 2.6.20.15 Linux update between kdb and Kerrighed:

$ quilt pop kdb/kdb-i386 $ quilt import -P linux/2.6.20.15 patch-2.6.20.15.diff $ quilt push Patch linux/2.6.20.15 is now on top $ quilt push Patch kerrighed is now on top error ? Fix, then: $ quilt refresh # Kerrighed patch is updated

7 Quilt – Example (3)

✔ Create a new patch from SVN:

$ svn diff -r2500:2550 svn://path/to/anywhere > r2550.diff $ quilt import -P devel/mydevel r2550.diff $ quilt push Patch devel/mydevel is now on top ✔ Adjust strip level: from SVN patches are -p0, but you prefer -p1 with a/ b/ suffixes ? $ quilt refresh -p ab

8 Quilt – Use with SVN (1)

(1) Replace kernel/ by patches/:

✔ Force the use of quilt

✔ Kerrighed patch must be splitted by functionality

✔ Pros:

✔ Linux patches are explicit ✔ Easier to upgrade Linux version (smaller patches) ✔ Cons:

✔ not easy to make functionality patches independants ✔ diffs on maillist not easily readable

9 Quilt – Use with SVN (2)

(2) Use patches/ dir for optional/devels functionalities:

✔ Each devel put its patch(es) with series file(s)

✔ kernel/ remains an arbitrary branch (KDB+Kerrighed ?)

✔ Pros:

✔ No big changes ✔ Cons:

✔ When upgrading a “devel” patch, need for rebuilding Kerrighed patch

10 Quilt - Links

✔ http://savannah.nongnu.org/projects/quilt/ ✔ Quilt PDF document (/usr/share/doc/quilt/quilt.pdf.gz on ) ✔ quilt {command} -h ✔ Quilt tutorial: http://www.coffeebreaks.org/blogs/wp- content/archives/talks/2005/quilt/quiltintro-s5.html

11