/ introduction:
| My name is Mehdi Dogguy. I've been contributing to Debian for
| one year now. I'm DM (and in NM process). I work mainly in the
| Debian OCaml Team.

I'm looking for simple ways to manage patches in packages. Many people
mentioned TopGit (which seems cool). But I think that it's too complicated
for the simple tasks I want to perform: create and maintain patches.

Recently, Stéphane Glondu showed me a very simple workflow (used by
another maintainer in some package (I don't remember which one exactly)
and adopted by Stéphane… and me). It was a very simple and effective way
of doing. Details:

In my git repositories, I have 3 branches:
- master (obviously)
- upstream
- pristine-tar

To create/update/modify patches:

- Move to a new (never pushed) and freshly created, from upstream branch,
branch. Let's say "patch-queue".

- Apply exisitng patches (if any) by doing:

    for i in `git cat-file -p master:debian/patches/series`; do
      git cat-file -p master:debian/patches/$i | git am;

  (I saved this as a git alias: get-patches).
  Here, we have one commit per patch.

- Patch upstream and commit in a single patch changes.

- Modify other patches and rebase (if needed).

- Move back to branch master and save patches:

    rm -f debian/patches/*
    git format-patch -N -o debian/patches upstream...patch-queue | \
        sed -e 's%debian/patches/%%' > debian/patches/series
    git branch -d patch-queue

- all patches are saved in debian/patches/ and can be used directly with
- All conflicts are resolved when rebasing patches.
- No questions about dependencies between patches, thank to Git.
- It's very simple to re-create the patches branch (git get-patches)

Is there any other person who is using a similar workflow?
Is this a known way of managing patches? or are there similar methods?

Kind regards,

Mehdi Dogguy مهدي الدڤي
Tel.: (+33).

vcs-pkg-discuss mailing list

Reply via email to