[notmuch] Git feature branch

martin f krafft madduck at madduck.net
Wed Feb 3 19:50:26 PST 2010


also sprach Carl Worth <cworth at cworth.org> [2010.02.04.1605 +1300]:
> >   maint/    — the stable release
> >   master/   — the stablising head
> >   next/     — testing branch
> >   pu/       — patch integration branch (proposed updates)
> 
> I'm not a fan of this scheme, (or maybe I've just never quite understood
> it).
> 
> When I first encountered this scheme, (when first using git), it was
> never clear to me what branch I should actually run or test as a
> user. Nor was it obvious which branches would be regularly rebased or
> not---nor which branches had features being discussed on the mailing
> list.

I'll happily explain if you want. I think that this workflow, in
combination with the distributed functionality of Git, makes for
really powerful collaboration.

To answer your two (implicit) questions directly:

- as a user, you'd probably be tracking master, if you aren't
  running a stable release anyway. if you are ready to deal with the
  occasional bug and want some juicy stuff, go with next. if you are
  a developer ready to fend of the sh*t as it hits the fan, use pu.

  Basically, it's a bit like Debian testing/unstable/experiemental,
  except that the default entry point for new patches (packages in
  that analogy) is pu (experimental), not next (unstable, as it is
  in Debian).

  maint is then the stable branch, see below.

- nothing is ever rebased. patches are cherry-picked downwards
  (pu→next→master) and branches are occasionally merged upwards
  (master into next, next into pu).

I don't think we will need 'next' anytime soon, not until we have
a situation where we are e.g. working on the next 1.x release by
already have 2.0 on the horizon.

The important distinction is between pu (proposed-updates) and
master. The goal for master should always be that it's usable.
Features that are too new to ensure that go to pu until they
matured.

> Instead of "maint" I'd much rather just have branches that are
> named directly after the stable releases being maintained. We've
> done this with the cairo repository with branch names like "1.2",
> "1.4", "1.6", etc. That way it's very clear what the branch
> represents and it's possible to have multiple concurrent "live"
> maintenance branches. But of course, until we actually have
> releases, this doesn't really matter. :-)

This is all possible to do. It has no impact on the pu/next/master
distinction. Basically, once a release is made, master is merged
into maint (I think) and tagged. If a maintenance release has to be
made, a maint/1.0 branch is created. I don't think Git/Linux do
that, but I do.

> I want to maintain a branch myself, (where I'm the only person
> pushing to the branch). [This is different than what I've done
> with the cairo repository where we have all core maintainer's
> pushing to a central repository. I'm intentionally trying
> something new here.]

Do you want to maintain that branch yourself for your own purposes,
or do you want to be the sole maintainer of the branch that is
advertised as *the* notmuch branch, and from which future releases
are made?

> Obviously, that branch that I maintain is currently called
> "master", but I wouldn't mind (and might actually prefer) to have
> it be called "~cworth" or so. Though we have the problem that we
> need "master" to point to *something*.

Actually, there is no reason for master to exist at all. ;)
It's just the default, but it's not intrinsic.

> Beyond that, I'm quite happy to have any number of branches similarly
> maintained by any other individuals. I want to get things setup so that
> those will be hosted and listed alongside my branch on
> notmuchmail.org.

So you are talking repos, not branches. I know they are almost the
same, but branches live in repos, and if you want to be the only
person pushing to a branch, you need to be the only one with write
access to the containing repo — unless you use gitolite, which can
do in-repo per-branch access control.

> > What patch tracking workflow should we adopt? Keep sending
> > patches to the mailing list
> 
> I definitely like the patches on the list. I find that with
> notmuch, I can maintain a queue of outstanding patches very
> effectively, (meaning, that the queue is usable and doesn't forget
> even if I do get very far behind like I am currently).

The reason why I set up patchwork is because you might have spent
hours triaging some patches already, e.g. bringing the count from
400 to 100. Since I cannot really "pull" your tags, I am forced to
go through the entire list myself.

> > master or pu (or even maint/next), as appropriate? Use the
> > Debian bug tracker? Use Sebastian's Roundup instance? Set up
> > a patch queue manager on notmuchmail.org? Use patchwork [1]?
>
> I'm personally not interested in any system that requires me to
> push any additional buttons outside of notmuch and git itself.
> I am interested in tools that can generate reports and help
> provide visibility into things. So patchwork fixed to
> automatically notice when patches are merged would be interesting.

Absolutely. There are two comments I have:

- this gets easier the closer we get to a centralised model, simply
  because patchwork is centralised.

  We *may* be able to use Git's new "notes" feature to attach
  workflow information to patches, but for that, patches have to
  become commits in the ancestry, so we need some way of pulling
  them off the list and into the ancestry.

  Simply slurping all patches into an 'all-patches' branch won't
  work due to merge conflicts, so it has to be a manual operation
  anyway. This then either happens centrally, or we have some sort
  of communication protocol to tell others which patches have been
  integrated into the ancestry.

  This is where patchwork could come in (again).

- … which brings me to my second point: there are certain things
  that patchwork can do, at least in theory:

  * mark patches accepted when they hit your (canonical) master
    branch
  * mark patches rfc when they hit e.g. my (canonical) next branch
  * mark patches "under review" when they hit the all-patches (or
    pu) branch.

  I have not yet tried any of these, and I am basing this theory
  only on the idea that git-patch-id can come to the rescue, for
  there is no other linkage between the patch on the mailing list
  (and thus known to patchwork), and the commit in the repo.
  
  Given that

  * git-patch-id will fail if the patch is modified before it's
    applied to the ancestry,
  * git-patch-id might not work at all,
  and
  * there are status changes that cannot be deduced from Git
    (rejected, superseded, not applicable, changes requested,
    deferred),

  we might need some sort of protocol anyway. This could be either

  * a mail processor, in the style of the Debian bug control system,
    to which you send commands like 'status 1234 superseded',
  or
  * a policy specification using e.g. Git notes on commits, such
    that workflow changes could be attached to commits in a way that
    would let patchwork and humans follow what's going on.

> Also interesting would be support for publishing my notmuch-based
> queue of patches to a web page.

Absolutely. As I said before, notmuch and tagging could pretty much
render patchwork obsolete, but to do that, I /think/ we need to grow
two features:

- the ability to share tags, so that I don't have to manually track
  my own patch list,
- a web archive with notmuch search/tag support.

Simply publishing your workflow statuses would be an improvement,
but I am unsure I can fully quantify the gain.

In closing, I would like draw a parallel between commits, patches
and mails:

1. notmuch deals with mails, and Git deals with commits
2. a commit can be turned into a patch and sent as a mail
3. notmuch can tag mails, Git can attach notes to commits
4. notes can be used to store tag-like information

If we continue the road of sending patches to the mailing list
(which I think is a good one, due to discussions and comments), then
we inevitably need to link commits to mails, along with the
associated metadata (tags, workflow status), in two ways.

Fun times,

-- 
martin | http://madduck.net/ | http://two.sentenc.es/
 
"of course the music is a great difficulty.
 you see, if one plays good music, people don't listen,
 and if one plays bad music people don't talk."
                                                        -- oscar wilde
 
spamtraps: madduck.bogus at madduck.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature (see http://martin-krafft.net/gpg/)
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20100204/b21418c2/attachment.pgp>


More information about the notmuch mailing list