Older blog entries for badger (starting at number 78)

Okay, git lovers, I have an incredibly simple problem but so far the only working solution is a kludge. I'm hoping someone can tell me what the elegant way to solve this problem is.

I'm working with three branches keeping configuration information for our environment. master is where our production configs live. staging is a branch where we merge changes and test them in our staging environment. Once tested, they get cherrypicked to master.

base_url is where I've been working on a new change that spans several commits. It was branched off of staging. After completion, I merged the changes into the staging branch and tested. So far so good.

Now I want to merge my branch into master. How do I do that?

Here's an idealized diagram of the branch relationships. In reality, sometimes changes go into master before staging.

master       staging   base_url
  |             |  merge |  ___
  | cherrypicks +<-------+   ^
  +<------------+        |   |
  |    (cp)     |        |  How do I merge these to master?
  +<------------+ branch |   |
  |    (cp)     +------->+  _V_
  |   branch    |

So far everything I've tried with git rebase or git merge seems to be sending changes from the staging branch that were present before I branched to base_url into master. I don't want that. I did my changes on a separate branch so I could merge just my changes to both staging and master later.

Here's the kludge that did work:

git checkout base_url
git log
# Manually find the last commit in staging before I branched
git format-patch [COMMIT ID FROM ABOVE]
git checkout master
git am [patch 0001 0002 0003....etc]

The two things that I find too hacky about this solution are:

  1. using git log to find the branch point. git should know where I branched from staging... I just need to tell it that I want to pull changes from the branch point forward somehow and it should find the proper commit id.
  2. generating patches and then applying them. git should be able to do this without generating "temporary files" like this. The deltas are in the repo, why pull them out into text files?

I have copies of my repository before I "fixed" it with the patch commands. So send me your recipes and I'll see if any of them work. Once we have a winner, I'll post strategies that worked and ones that didn't.

Of course, even after I know how to do this, there's still all sorts of follow on questions -- like, what happens if this new feature took a long time and I needed to remerge the base_url branch with staging in the middle?

a.badgergmail.com or abadger1999 on irc.freenode.net

Do not buy Swingline stapler model #545xx

My wife was having problems stapling today so I looked inside this one and found that the staple had fallen over inside the stapler. So, instead of the staples forming the upside down "U", all ready for the teeth to punch into the paper being stapled, the staples were positioned with the teeth to the front and the base of the "U" facing the springloaded rear of the stapler.

This is just poor design as some misguided engineer tried to cut costs. All other staplers I've seen have some sort of platform down the middle of the staple feed chamber. This allows the base of the "U" to rest supported on the platform and not depend on standing upright on their feet. Getting rid of that platform means that the staples can fall over when the stapler is loaded or if the spring's tension is off.

Or perhaps it isn't poor design -- A little experimentation showed that the stapler has one feature sure to please a company exec, provided it's the exec of Swingline: It's nearly impossible to load small quantities of staples into this design. With nothing to support them, they just fall over and slide underneath the other staples.

Had a productive evening planned out but didn't get to do any of it because of a chicken emergency. First time I've actually seen "it gave a spasm that threw its whole body in the air and died." Parents get back tomorrow night so hopefully I can start working long hours again starting next week.

On 07/21/2009 04:24 AM, Dimitris Glezos wrote:
> For me, Fedora isn't so much what we think it is -- it's
> what our community wants it to be. And if a part of our community
> wants to try new things out, given that the resources needed won't be
> unmanageable, we should encourage them to do so.
Posted on the Fedora Advisory Board list

I think that this is very, very true and something that we need to keep in mind as go about defining what Fedora is. Thanks Dimitris, for phrasing that so succinctly!

24 Jun 2009 (updated 24 Jun 2009 at 17:31 UTC) »
FISL in the Morning

The Fedora booth has been well populated by Fedora Ambassadors from all around Latin America from Brazil to Mexico. For someone from the insular world of the United States, it's awe-inspiring to watch the ambassadors in action. Even though some speak Spanish and others Portuguese, they cheerfully work out their differences in language and laughingly toss jokes at one another. A line of potential Fedora users stretches out from the booth, entertained to watch interviews of Fedora ambassadors and developers as they wait to sign up for a FAS account and get the Brazilian Fedora 11 spin.

The conference is huge. And very oriented on free software. I attended LinuxWorld in San Francisco once and the crowd was roughly this size. The type of attendee is very different, though. Where LinuxWorld seemed to have an abundance of businessmen looking to buy or sell a solution to someone else, FISL seems populated mostly with enthusiasts eager to meet up with fellow contributors to the projects they are involved in. A very nice crowd to watch and try to interact with despite my limited Portuguese.

People who lean toward the DAG as *recording* history will prefer Mercurial or Bazaar. People who tend to see the DAG as a tool for *presenting* changes will prefer git.People who lean toward the DAG as *recording* history will prefer Mercurial or Bazaar. People who tend to see the DAG as a tool for *presenting* changes will prefer git.

-- Stephen J. Turnbull on python-dev

While this doesn't express my main issues with git (which are UI driven) (although the UI might be irretrievably broken because of these features... I dunno :-), it does capture the reason I don't jump up and down when contemplating git's "advanced features".

Found out today that git, bless its heart, has non-symmetric UI. watch:

[badger@Clingman bugzilla]$ git pull
Already up-to-date.
[badger@Clingman bugzilla]$ git push
Counting objects: 7, done.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 418 bytes, done.
Total 4 (delta 3), reused 0 (delta 0)
To ssh://git.fedorahosted.org/git/python-bugzilla
   c387d20..ef6bb9c  master -> master
 ! [rejected]        0.5 -> 0.5 (non-fast forward)
error: failed to push some refs to

After a bunch of head scratching we finally realized that pull only updates a single branch whereas push attempts to update them all. Horrible UI. Imagine the case where you're sharing dozens of feature branches with other developers. Before you push new work you have to git pull in each of them?

And a Warm Thank-You To...

Ignacio Vazquez-Abrams (ivazquez) is one of the most helpful people around. He seems to always be present on #fedora-python answering questions. He gives out sound packaging advice on fedora-devel-list. Many contributors fondly remember him helping them through package reviews or making sure they were on the right track after he sponsored them.

My current thank-you is for the task he took on for the new release of python-fedora. A TurboGears identity provider that allows our web applications to have single-signon with the Fedora Account System has been a feature of python-fedora since the first release. ivazquez has added an auth provider that does the same for Django applications. This was a frustrating task as he had to work with the guts of python-fedora's client module, understand the TurboGears authentication scheme, the Fedora Account System API, and then map all of that into the Django authentication provider.

Thanks to his work we'll have authentication against the Account System when we deploy the Django version of Transifex (And a thank-you is owed to the Transifex devs for the shiny new release!) just in time for the Fedora-11 string freeze.

I've been looking for this quote all day and like magic, it appeared in someone's email sig.

Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction.

Albert Einstein 1879 - 1955

Now, apply that to git.

69 older entries...

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!