A weblog by Hao Lian.
A terrible secret guarded by golems.
A note that thanks you for being born, all those years ago.
The Dark Balloon is proud to add a little green, anything to make the Gawker Bullies stop pinching him, anything to dull the pain.
With a recent windfall (read: @namecheap) in market capital, Innuendopoly Incoporated—a subsidiary of Silly Names Conglomerate—has decided to sponsor The Dark Balloon by choosing us as the new tenant for innuendopoly.org. Ladies and gentlemen, please update your bookmarks and feed readers because sexy has a new home.
Is that a good motto or what?
The Dark Balloon staff, overwhelmed by our consumers’ increasing appetite for our opinions about books, is pleased as punch to release the The Dark Balloon Bookshelf, an ambitious attempt to catalog the best books ever written, published, and disseminated to our reading desks. But, mostly, we’re doing it for the holidays’ money. With 15 books to choose from, who knows how long you can withhold the ever increasing thirst for buying goods from the Bookshelf, no matter how much you hold your trembling hands with your trembling feet.
Back in August of
2008 2003, one of the Mozilla staff members briefly ran
for governor of California. What I’m trying to say is this: Arnold
Schwarzenegger hates open source.
Previously, we talked at length about using
record even when you were working with a Subversion repository.
Today, we’ll see how to use Mercurial Queues to apply custom patches
even when you’re working with a release-based system.
Scenario: There’s an open-source project that frequently makes releases. But you have a series of customizations you have to apply each time you upgrade by hand under the light of a candle whose wax slowly drips off onto your sizzling, progressively more annoyed cat. Mercurial’s patch queues to the rescue.
Ingredients: Mercurial, the source (I use this recipe on WordPress because it hard-codes XHTML and comes with an annoying widgets system. Not to mention the horror that is kses.), WinMerge or your favorite diffing program, and the patience to resolve three-way merge conflicts.
First, create a repository by making a brand-new folder followed by an
hg init. Dump the latest release (for WordPress, it’s 2.6.1) into
the folder and type
hg addremove; hg commit -m 'Release 2.6.1 and
whatnot.'. Now we’re cooking with pepper!
You also want to set up Mercurial Queues in the folder. Do so with an
hg qinit -c; hg qnew xhtml-to-html.patch. Then you’d hand-apply your
HTML patches on top of release 2.6.1 and
hg qcommit -m 'I hate
XHTML'. Keep up the
qcommits until you have all the
patches. For navigating this stack of patches, consult the excellent
chapter in Distributed revision control with Mercurial by Bryan
O’Sullivan. I nicknamed it the camel book because I printed it
out on the corpses of my least-favorite camels. They know what they
Now every time you want to change a patch, say “xhtml-to-html.patch”,
you simply qgoto that patch, make your changes, and
qcommit. Standard, prosaic operating practice for MQ.
Now WordPress releases 2.7. Those bastards. Come that day, you’ll need
qclone your current repository. Let’s say you put it at “~/wp”.
qclone it to “~/wp-2.7” and “~/wp-edge”.
qclone is like
clone except it brings along the patch stack too. In “wp-edge”, make
sure no patches are applied with a simple
hg qpop -a.
Open up WinMerge and compare “wp-edge” with the folder to which you extracted the 2.7 release. Copy over the new files, delete the files that no longer exist. Make sure installation files also are copied over. For WordPress, they’re files like “.htaccess” or “wp-config.php”. Refresh WinMerge and make sure the two folders have the same files.
In “wp-edge”, do a quick
hg addremove; hg commit -m "Release 2.7".
You’ll do the merging with patches in “wp-2.7”, so cd to it now. What
follows is essentially stolen from the O’Sullivan camel book. It’s
qpush -a; hg qsave -e -c; hg pull ~/wp-edge; hg up -C; hg qpush -m
-a. Now we’re cooking with impunity! These commands tell Mercurial
to, respectively if I may so split an infinite, push all the patches,
save them for merging later, pull the changes from “wp-edge”, and merge
the patches. MQ will dutifully merge them and spit out whatever your
favorite three-way diff program does. For diff3, my personal favorite,
it’ll be either a pristine merge or files with conflicts bracketed by
“>>>” where you have to merge the conflict personally before telling
Mercurial that you’ve resolved the conflict. Mercurial will happily
spit out instructions for doing so.
Now that your patches are merged, you should
hg qcommit -m "Release
2.7" because that
qpush -m -a will have altered your patches. Your
patches actually live in a Mercurial repository of their own because
hg qinit -c to do so with that
-c flag. This lets you
later pull in any changes into
As the O’Sullivan camel book instructs, you should
hg qpop -a -n patches.1 out the
dead patches that came along with the
qpush -e -c and merging. Note: your folder
might be patches.N for any N depending on what
qpush spit out earlier.
Back over in “~/wp” where your WordPress installation actually lives,
make sure you don’t have any patches applied already (
hg qpop -a).
hg qpull ~/wp-2.7 to bring in all that hard work you did. If
extra heads were created, you probably didn’t
hg qpop -a -n patches.N correctly but
hg heads to make sure. If you didn’t,
hg strip now. In either
case, they don’t do anything except create clutter and you should be
hg up without worries.
Now, as hinted above ever so subtly with a woman with too many
buttlies, go into
~/wp/.hg/patches and do a
~/wp-2.7/.hg/patches; hg up to update your patches. Now your 2.7
repository syncs with the 2.7 patch stack. This means you can return
to “~/wp” and do a
hg qpush -a without any problems. BOOM, no
hand-applying patches anywhere. Just simple Mercurial wizardry with a
little help from diff3’s potent sperm.
THIS WAS SEXY, WE SHOULD DO THIS AGAIN SOMETIME SOON
The little boy sat over the anthill with a magnifying glass, waiting for the inevitable fire. His nose dribbled a little, and he wiped it with the wrist not holding the bringer-weapon of fire. Nothing was catching fire, and his lazy summer was glacially drifting toward boredom, the worst island in the emotion archipelago. He peered through the magnifier. He saw one ant holding a tiny gun, point it at him. The ant took off the safety and shot. The tiny bullet, born from a tiny puff of smoke, shot toward the little boy as it grew larger and larger before piercing the magnifying glass at its regular size. That’s just how magnifying glasses work. The little boy sat or splayed on the sidewalk with the glass shards in him, on him, and around him. They formed a halo around his blonde head. He was a crimson red and blond angel of death killed by Badass Jones, the most badass and gun-toting ant of them all. Badass Jones!
Hey GUYS, Ethan Sherbondy of Too Epic notoreity hit upon the EXCELLENT idea of taking an entire-page screenshot of The Funnelwhich. If you are a true lover of The Funnelwhich, you will go to your Kinko’s and demand they print out this image on a gigantic sheet of paper. Then, take a photograph and send it to me. Upon RECEIVING THIS BOUNTY, I will talk about you in a highly positive manner on this website.
A new edition of The Funnelwhich is out, this one with backstory for John Wilkes booth, a cameo appearance by Dennis Izen Smith (the famous author), and the use of the word “breathtaking.” That’s right, that’s all in one edition. To stay in the loop, please subscribe.
The wizard sat back in his chair, reclined, and squinted at me. We stared at each other for what seemed like eternity.
“Hullo!” he shouted at me. I started.
“I seemed to have misplaced my glasses,” he murmured. He turned me into a pair and called me ugly. I knew Hogwarts wasn’t real.
Relative links should now work in the Atom feed. Bug report comes via Prashanth, who reads Digg so what does that say about him?
Jark raced past the Time Offices, dodging the Time Eddies and hoping it wasn’t too late. The Time Fabric depended on him. He was a Time Knight, and now he glanced at his Time Piece to ascertain the Time Time. He sighed and wished the Time Marketing and Branding Department would stop relying these Time Crutch Words. Time Oh Time well.
As promised, the archives page is now existent. Something I learned by furnishing this: I’m only slightly less prolific than before, but at a much higher quality. (I’m overjoyed.)
This month, as a sidenote to you—dear reader—and your busy life, is the five-year anniversary of The Dark Balloon (formerly dotfloofy dotblog and long before that just <hao2lian />). As a result, I’ve pulled the few headers I had laying around in my backups.
The Flickr webpages have more detailed commentary. Of course, I’ve lost everything between that point and now. Psych. I’ll run up the previous themes (even from Blogspot!) when I transfer from Wordpress to something homegrown in Python. And, yes, I am aware I have yet to upload an archives page or even a search form to this hallow institution.