[Apiman-dev] Merge Karaf branch to Master

Charles Moulliard cmoulliard at redhat.com
Mon Mar 21 12:09:30 EDT 2016


Did you find your email Marc  ?

On 21/03/16 09:24, Marc Savy wrote:
> Hmm, I already sent a reply to this before I went on my trip.
>
> I wonder if it was black holed.
>
> Will check and FWD ASAP.
>
>
> ----- Original Message -----
> From: Charles Moulliard <cmoulliard at redhat.com>
> To: Rachel Yordan <ryordan at redhat.com>
> Cc: apiman-dev at lists.jboss.org
> Sent: Mon, 21 Mar 2016 03:49:55 -0400 (EDT)
> Subject: Re: [Apiman-dev] Merge Karaf branch to Master
>
> Thx. I will work on that this Tuesday
>
> On 16/03/16 15:23, Rachel Yordan wrote:
>> Marc is definitely the git surgeon here, whereas I'm more of a git
>> butcher.
>>
>> But I'll just say that I typically try to avoid rebasing the branch
>> commits against master. If you'd still prefer to rebase branch against
>> master then I would check out an entirely new branch based off of
>> master and use that for the karaf rebase. Actually, I'd do that either
>> way. I'd do the following:
>>
>> 1. Make sure your master branch is up to date:
>> $ git checkout master
>> $ git pull upstream master
>>
>> 2. Check out a branch based off of master in case all goes to hell:
>> $ git checkout -b master-2
>>
>> 3. Go back to the karaf branch and get an idea of how many commits you
>> have vs. master (looks like around 221 judging by this
>> <https://github.com/apiman/apiman/compare/karaf?expand=1>):
>> $ git checkout karaf
>> $ git rev-list --count HEAD ^master-2
>>
>> 4. Rebase against the new master-2 branch:
>> $ git rebase -i HEAD~221
>>
>> * May not actually be 221, replace with the number you get in step 3.
>>
>> Surely you know this already, but in the event that it helps here are
>> some vim tips:
>>
>>    * Enter interactive mode by typing `I` and only leave the first
>>      commit as `pick`, type `s` or `squash` for the rest. You can also
>>      use `f` or `fixup` if you don't want to include the commit message.
>>    * Save and quit by typing `wq!` and pressing enter. You'll probably
>>      have to repeat this.
>>    * If you get stuck or want to quit without saving (completely cancel
>>      the rebase), just press Esc to exit interactive mode on vim and
>>      type `:%d|x`, then press enter.
>>
>> Once you're done, you may want to change the commit message for that
>> single commit, so you'd just do `git commit --amend -m "Blah blah"`.
>> You'll probably have to do `git push origin karaf --force` as you'll
>> likely get an error about pushing to your fork's karaf branch.
>>
>> Having said that, it's probably going to take you a bit to go through
>> it. `gitk` may or may not be helpful. Committing early and often (as
>> well as rebasing against the latest master branch) would prevent this
>> problem for you in the future. Hope that helps! If not, Marc may be
>> your guy.
>>
>> Rachel
>>
>>
>> On Wed, Mar 16, 2016 at 4:52 AM, Charles Moulliard
>> <cmoulliard at redhat.com <mailto:cmoulliard at redhat.com>> wrote:
>>
>>      No advices from @Rachel or @Marc ?
>>
>>
>>      On 08/03/16 14:30, Charles Moulliard wrote:
>>      > Perhaps the option "git rebase --interactive" is better ?
>>      >
>>      > I'm also thinking that the rebase should be done from the commits of
>>      > karaf branch to master. If this is the case, then the cmds to be
>>      used are
>>      >
>>      > git checkout master
>>      > git rebase --interactive karaf // squash of the commits can be done
>>      > within the editor
>>      >
>>      >
>>      > On 08/03/16 12:44, Eric Wittmann wrote:
>>      >> @Marc or @Rachel - any advice to charles on the best way to
>>      merge and
>>      >> squash?
>>      >>
>>      >> -Eric
>>      >>
>>      >> On 3/8/2016 3:21 AM, Charles Moulliard wrote:
>>      >>> On 01/03/16 13:36, Eric Wittmann wrote:
>>      >>>> Hi Charles.  Here are some things we would need before we can
>>      merge
>>      >>>> the karaf branch:
>>      >>>>
>>      >>>> 1) rebase the karaf branch to master
>>      >>>> 2) squash the commits to a single commit
>>      >>>
>>      >>>  >> Can you confirm my scenario to rebase and squash ?
>>      >>> git checkout karaf
>>      >>> git rebase master
>>      >>> --> Fix merge issues and commit them ?
>>      >>> git checkout master
>>      >>> git merge --squash
>>      >>>
>>      >>>> 3) thorough code review
>>      >>>> 4) testing
>>      >>>>
>>      >>>> #1 - I think this is pretty straightforward.
>>      >>>>
>>      >>>> #2 - Normally I wouldn't mind a small number of commits for a
>>      >>>> contribution like the karaf support, but you've got 221
>>      commits in the
>>      >>>> karaf branch, representing 117 files changed or added. That's
>>      a very
>>      >>>> large impact on the project's commit history and will make future
>>      >>>> diffs more difficult than is warranted.  So that's the reason to
>>      >>>> squash the commits down to one (or at most a handful).
>>      >>>>
>>      >>>> #3 - I'll need to run through the code with the rest of the
>>      apiman dev
>>      >>>> team so we're all familiar with the changes.  We need some extra
>>      >>>> eyeballs on the code to make sure we don't (for example)
>>      duplicate a
>>      >>>> lot of functionality.
>>      >>>>
>>      >>>> #4 - Obviously we'll need to do some testing to make sure
>>      everything
>>      >>>> is working as expected.
>>      >>>>
>>      >>>> Unfortunately we've got a bunch of high priority tasks at the
>>      moment,
>>      >>>> so it may be a little while before we can get to #3 and #4.
>>      I'm happy
>>      >>>> to accomplish #1 and #2 at some point in the future, although
>>      if you'd
>>      >>>> like to give it a try that would be fine too.
>>      >>>>
>>      >>>> -Eric
>>      >>>>
>>      >>>>
>>      >>>> On 3/1/2016 4:13 AM, Charles Moulliard wrote:
>>      >>>>> Hi,
>>      >>>>>
>>      >>>>> Can we consider to merge Karaf branch with Master - trunk ? What
>>      >>>>> are the
>>      >>>>> steps that we have to take care in order to prepare the merge ?
>>      >>>>>
>>      >>>>> Regards,
>>      >>>>>
>>      >>>>> Charles
>>      >>>>> _______________________________________________
>>      >>>>> Apiman-dev mailing list
>>      >>>>> Apiman-dev at lists.jboss.org <mailto:Apiman-dev at lists.jboss.org>
>>      >>>>> https://lists.jboss.org/mailman/listinfo/apiman-dev
>>      >>>>>
>>      >>>
>>      >
>>
>>      _______________________________________________
>>      Apiman-dev mailing list
>>      Apiman-dev at lists.jboss.org <mailto:Apiman-dev at lists.jboss.org>
>>      https://lists.jboss.org/mailman/listinfo/apiman-dev
>>
>>
>



More information about the Apiman-dev mailing list