gnu-arch-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnu-arch-users] How to avoid conflict when backporting/cherypicking


From: Matthew Dempsky
Subject: Re: [Gnu-arch-users] How to avoid conflict when backporting/cherypicking
Date: Mon, 16 Aug 2004 18:32:22 -0500
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

Milan Cvetkovic <address@hidden> writes:

> Hi GNU-Arch experts,

*Not an expert on this topic, but will try anyways*

> I have a question regarding back-porting. When a bug is discovered, in
> one of the earlier releases, it is also known that the same bug had
> been fixed in develoipment branch. So we choose to apply the patch
> from development branch back to bugfix branch.
>
> How should I merge these changes cleanly?

In an ideal world, the bugfix-to-be-backported would have been handled
in a seperate branch which when completed the newer version merges
into their tree and, likewise, the old version maintainers could
merge.

However, this isn't always an ideal world and rarely do people use
arch that way (hopefully this will change soon).  So...

> Suppose we have two branches:
>
> proj--main--2.0              proj--bugfix--1.0
> base-0                 ----- base-0
> patch-1               /      patch-1
> patch-2---( tag -> ) -   --- patch-2
> patch-3                 /    patch-3
> patch-4---( replay-> )--
> patch-5

Assuming this diagram is actually accurate (and later tla output seems
to support it as such), I'd just like to point out typically you'd
expect to have proj--bugfix--1.0 be a tag off of proj--main--1.0
rather than proj--main--2.0.

> proj--main--2.0--patch-4 is replayed to proj--bugfix--1.0
> After this point, there are some additional changes in both branches.

And, presumably, you want all off the bugfixes pulled forward into the
2.0 release while 1.0 only needs release critical fixes, right?

> wd-proj-main--2.0$ tla missing -f proj--bugfix--1.0
> proj--bugfix--1.0--patch-1
> proj--bugfix--1.0--patch-2
> proj--bugfix--1.0--patch-3
> wd--proj--bugfix--1.0$ tla missing -f proj--main--2.0
> proj--main--2.0--patch-3
> proj--main--2.0--patch-5
>
> My goal is to have proj--main--2.0 with all patch-logs from
> proj--bugfix--1.0.
>
> If I just do "tla replay proj--bugfix--1.0" I will have the conflicts
> since proj--bugfix--1.0--patch-2 and proj--main--2.0--patch-4 are
> modifying the same files.
>
> "tla replay --forward" also generates conflicts.
> "tla replay --skip-present" would skip proj--bugfix--1.0--patch-2, but
> this patch would stay missing forever.
>
> What is "the right way" to deal with this problem.

Assuming when you merged proj--main--2.0--patch-4 into
proj--bugfix--1.0--patch-2 that was the *only* change you made, you
should be able to do the following in the proj--main--2.0 tree:

    tla replay --skip-present proj--bugfix--1.0
    tla tree-sync proj--bugfix--1.0--patch-3

Using tree-sync tells arch that you consider that patch (and all
patches it includes) to have been properly merged into your tree.

In the future, you might either try commiting bugfixes that you'll
want in your 1.0 tree directly into your 1.0 tree and simply have the
2.0 branch star-merge or replay, or try using a seperate branch for
the bug if it's large enough.  (Of course you're free to do whatever
you want, or maybe someone else has better recommendations.)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]