ANN: pbranch extension (alternative to mq, like topgit and bzr loom)

Peter Arrenbrecht peter.arrenbrecht at gmail.com
Fri Dec 12 09:52:06 CST 2008


On Fri, Dec 12, 2008 at 4:16 PM, Leslie P. Polzer
<sky at viridian-project.de> wrote:
>
>>> Slightly different question then: does pbranch/TopGit make
>>> local branches obsolete?
>>>
>>> I couldn't find anything in the TopGit document about that
>>> either.
>>
>> No, they don't. They build on them. You'll end up with one branch per
>> patch you're maintaining. They organize the flow of merges between
>> those branches.
>
> I'm not getting it -- yet.
>
> A pbranch/topgit is a graph of changesets that can be merged
> at will into the main branch, so how is it different from
> in-repo/local branches?

Ah, no. It's a graph of branches, each dedicated to one patch. And
each usually consisting of multiple changesets (tracing the evolution
of its patch). The graph defines the flow of automated merges between
the branches, and how the diffs between the branches, which define the
patches, are taken for submission upstream.

And a crucial aspect is that the patch branches are not meant to ever
be pulled into the mainline repo as is. Instead, you submit the
resulting patches (diffs) using email or whatever. So the patch
branches are throwaway things meant to live only while your patch has
not been accepted upstream.

So if you have the branch graph "default -> p1 -> p2", then patch p1
is defined as

  hg diff -r default:p1

and patch p2 is

  hg diff -r p1:p2

Clearly, then, any change in branch p1 must be merged into branch p2
before the latter diff makes sense. pbranch automates such merges,
which can get quite complex.

> Thanks for your patience.

np.
-parren


More information about the Mercurial mailing list