# Merge from 5.3 and/or 5.4. What's the current policy?

- Thread: https://externals.io/message/59213
- Original archive: https://news-web.php.net/php.internals/59213
- Started by Yasuo Ohgaki on 2012-03-30T00:59:29+00:00
- Messages: 6
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #59213 — Yasuo Ohgaki — 2012-03-30T00:59:29+00:00

URL: https://externals.io/message/59213#59213

Hi,

Since the git work flow in the wiki requires to apply patch to
lowest possible  branch, then merge upwards.

This changes old work flow, commit trunk, then merge to
release.

I've committed simple build problem fix to all branches, I think
release masters don't care such merge. However, how about
feature changes?

I have simple patch for

Request #47570	libpq's PG_VERSION should be exported to userland
https://bugs.php.net/bug.php?id=47570

This is simple change, but it's new feature. (I added 2 new module
constants for PG_VERSION, PG_VERSION_STR)

Question is "What's the standard work flow for new features?"

Regards,

--
Yasuo Ohgaki
yohgaki@ohgaki.net

---

## #59222 — Gustavo Lopes — 2012-03-30T07:37:22+00:00

URL: https://externals.io/message/59213#59222 · In reply to: #59213

On Fri, 30 Mar 2012 02:59:29 +0200, Yasuo Ohgaki <yohgaki@ohgaki.net>  
wrote:

> Since the git work flow in the wiki requires to apply patch to
> lowest possible  branch, then merge upwards.
>
> This changes old work flow, commit trunk, then merge to
> release.
>
> I've committed simple build problem fix to all branches, I think
> release masters don't care such merge. However, how about
> feature changes?
>
> I have simple patch for
>
> Request #47570	libpq's PG_VERSION should be exported to userland
> https://bugs.php.net/bug.php?id=47570
>
> This is simple change, but it's new feature. (I added 2 new module
> constants for PG_VERSION, PG_VERSION_STR)
>
> Question is "What's the standard work flow for new features?"
>

I don't see how this is any different. "Lowest possible branch" doesn't  
necessarily mean 5.3. It can mean 5.4 or master.

If the feature is not appropriate for 5.3, but it is for 5.4 and master,  
commit it to 5.4 and merge 5.4 into master. Or it can be appropriate just  
for master, in which case there's no merge into other branches. This is  
the most common scenario -- when a commit is applicable to one branch and  
all other more recent ones.

The problem with the current workflow is only when you have something  
specific to a lower branch, which is not applicable to upper branches  
because the code base has diverged. You still have to merge upwards in  
those situations and resolve the likely conflict (typically with the  
"ours" strategy).

-- 
Gustavo Lopes

---

## #59225 — Yasuo Ohgaki — 2012-03-30T08:22:31+00:00

URL: https://externals.io/message/59213#59225 · In reply to: #59222

Hi,

Bug fix can be merged upwards. However,
Are we free to merge feature changes?

Adding new module constant is new feature.
I certainly would like to have it on 5.4 and it's
probably OK for 5.4, but how about 5.3?
So I'm asking procedure before commit.

Before git, we just commit new feature/changes
to trunk and we could think/argue about merge
later. Now we need to think/argue about merge,
then commit.

We need some guidelines for feature changes,
if we are going to keep "merge upward" policy.

Anyway, RM of 5.3/5.4 are okay to add module
constants to pgsql? If there is no objection, I'll
commit the change and updates docs.

Regards,

--
Yasuo Ohgaki
yohgaki@ohgaki.net

2012/3/30 Gustavo Lopes <glopes@nebm.ist.utl.pt>:
> 
>
> > […]
>
> I don't see how this is any different. "Lowest possible branch" doesn't
> necessarily mean 5.3. It can mean 5.4 or master.
>
> If the feature is not appropriate for 5.3, but it is for 5.4 and master,
> commit it to 5.4 and merge 5.4 into master. Or it can be appropriate just
> for master, in which case there's no merge into other branches. This is the
> most common scenario -- when a commit is applicable to one branch and all
> other more recent ones.
>
> The problem with the current workflow is only when you have something
> specific to a lower branch, which is not applicable to upper branches
> because the code base has diverged. You still have to merge upwards in those
> situations and resolve the likely conflict (typically with the "ours"
> strategy).
>
> --
> Gustavo Lopes

---

## #59226 — Pierre Joye — 2012-03-30T08:45:01+00:00

URL: https://externals.io/message/59213#59226 · In reply to: #59225

hi,



> Bug fix can be merged upwards. However,
> Are we free to merge feature changes?


Generally speaking, no.

> Adding new module constant is new feature.

Not necessary, for example in Curl or openssl, many constants addition
do not change the implementation per se. But it has to be discussed
from a case by case basis.

> Before git, we just commit new feature/changes
> to trunk and we could think/argue about merge
> later. Now we need to think/argue about merge,
> then commit.

Right, and that's actually very good. The commit first then try to
discuss is finally over.

> We need some guidelines for feature changes,
> if we are going to keep "merge upward" policy.

> Anyway, RM of 5.3/5.4 are okay to add module
> constants to pgsql? If there is no objection, I'll
> commit the change and updates docs.

RMs apply the developers decisions, in general. So please post your
proposals to the list, CCing them :)

Cheers,
-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org

---

## #59227 — johannes@schlueters.de — 2012-03-30T09:40:15+00:00

URL: https://externals.io/message/59213#59227 · In reply to: #59225

> Hi,
> 
> Bug fix can be merged upwards. However,
> Are we free to merge feature changes?
> 
> Adding new module constant is new feature.
> I certainly would like to have it on 5.4 and it's
> probably OK for 5.4, but how about 5.3?
> So I'm asking procedure before commit.

Either be brave and make a decision yourself or ask for a specific case.

For 5.3 the situation is that only bug fixes should go in. There are two
reasons for that:

      * Backwards compatibility. Users must be able to upgrade from
        5.3.x to 5.3.(x+1) without thinking about it. Everything must
        run as before.
      * Users should have as many reasons as possible to upgrade to a
        newer version.

Now there's of course the old question "what's a bug and what's a
feature?" which is hard to answer in some cases.
    http://blog.zugschlus.de/uploads/bug-feature.jpg

Adding a constant can brings two potential compatibility issues. One is
that it might require a newer library version and is breaking
compatibility there and it might conflict with a name used in a user
application. I think on the first one we are quite safe and the second
one is also low risk ... and well _not_ adding the constant is a bit
ridiculous ;-)


All that aside: Two comments on the "feature design":

     A. A function pg_version() exists, having both, a function
        pg_version() and a constant PG_VERSION, which do slightly
        different things is confusing.
     B. All existing constants use PGSQL_* as prefix.

 -> Maybe a different name like PGSQL_CLIENT_VERSION is better.

johannes

---

## #59228 — Yasuo Ohgaki — 2012-03-30T09:43:38+00:00

URL: https://externals.io/message/59213#59228 · In reply to: #59226

Hi

2012/3/30 Pierre Joye <pierre.php@gmail.com>:
> hi,
>
> 
>
> > […]
>
>
> Generally speaking, no.

I thought so.

>
> > […]
>
> Not necessary, for example in Curl or openssl, many constants addition
> do not change the implementation per se. But it has to be discussed
> from a case by case basis.
>
> > […]
>
> Right, and that's actually very good. The commit first then try to
> discuss is finally over.

For large changes, discussing first is good.
For small changes like this, it may be too much.

>
> > […]
>
> > […]
>
> RMs apply the developers decisions, in general. So please post your
> proposals to the list, CCing them :)


https://gist.github.com/2250214

The change is simple one.
Just making constants available defined in pg-config.h

The only reason why I've made this thread for this simple
change is "merge upward" policy.

Someone suggested gitflow, the flow would be better for
faster development.

--
Yasuo Ohgaki
yohgaki@ohgaki.net
