De-annoyifying Subversion Externals

Geek, PHP Development 2 Comments »

Subversion externals are a way to include other packages in your code that are maintained somewhere else.  For example, if I was developing an application that needed to send out mail, I could use SwiftMailer and define that as an external for my project. When I run ”svn up” it will grab files from the SwiftMailer project and copy them locally. (How to define externals is beyond the scope of this post. RTFM!)

One annoying part of externals is that even if there are no changes to your code, your Subversion status output will be filled with externals information. For example, I have included symfony as an external in my project and now the default status output is:

X      lib/symfony

Performing status on external item at 'lib/symfony'
X      lib/symfony/doc
X      lib/symfony/lib/plugins/sfDoctrinePlugin
X      lib/symfony/lib/plugins/sfPropelPlugin
X      lib/symfony/lib/vendor/lime

Performing status on external item at 'lib/symfony/lib/plugins/sfPropelPlugin'
X      lib/symfony/lib/plugins/sfPropelPlugin/lib/vendor/propel
X      lib/symfony/lib/plugins/sfPropelPlugin/lib/vendor/phing
X      lib/symfony/lib/plugins/sfPropelPlugin/lib/vendor/propel-generator

Performing status on external item at 'lib/symfony/lib/plugins/sfPropelPlugin/lib/vendor/phing'

Performing status on external item at 'lib/symfony/lib/plugins/sfPropelPlugin/lib/vendor/propel'

Performing status on external item at 'lib/symfony/lib/plugins/sfPropelPlugin/lib/vendor/propel-generator'

Performing status on external item at 'lib/symfony/lib/plugins/sfDoctrinePlugin'
X      lib/symfony/lib/plugins/sfDoctrinePlugin/i18n
X      lib/symfony/lib/plugins/sfDoctrinePlugin/web
X      lib/symfony/lib/plugins/sfDoctrinePlugin/lib/doctrine

Performing status on external item at 'lib/symfony/lib/plugins/sfDoctrinePlugin/i18n'

Performing status on external item at 'lib/symfony/lib/plugins/sfDoctrinePlugin/web'

Performing status on external item at 'lib/symfony/lib/plugins/sfDoctrinePlugin/lib/doctrine'

Performing status on external item at 'lib/symfony/doc'

Performing status on external item at 'lib/symfony/lib/vendor/lime'

This is obviously annoying as it obfuscates the part of the project that I’m working on. The switch command does have an option to ignore externals, aptly called –ignore-externals but I don’t want to have to type that in every time I run a svn st command.

After browsing around the net for a bit, I found this piece of bash script that will swap the defaults for me:

svn() {
        case "$1" in
                st|stat|status)
                        svnargs1=""
                        svnargs2="--ignore-externals"
                        for i in $@; do
                                if [ "--examine-externals" == "$i" ]; then
                                        svnargs2=""
                                else
                                        svnargs1="$svnargs1 $i"
                                fi
                        done
                        command svn $svnargs1 $svnargs2
                        ;;
                *)
                        command svn "$@"
                        ;;
        esac
}

What’s nice about this script is that I can run status on the externals as well by specifying –examine-externals — and they’ll be back, in all their annoying (yet sometimes needed) glory.

On my Mac, I just placed the code in /etc/bashrc and now it’s available as a layer over the svn binary. (You may need to restart your terminal session for it to take effect.)

Birthday… salami?

Drivel 1 Comment »

So Igor brought me a “birthday salami.”  Uhh.. right

huh?

Show your Intolerance

Politics No Comments »

While driving home the other day, I saw a few homes in my neighborhood that proudly advertise “Yes on 8”.  If you don’t know, Proposition 8 is a California initiative to remove the state supreme court upheld right for same sex marriage.

I am not gay, nor do I actively promote the gay and lesbian cause. They can do whatever they want behind closed doors, just the same as I can do whatever I want behind closed doors. Yes, marriage is a sacred union of two people. Why does anyone care whether it’s between a hetero or homosexual couple? What place do I have, personally, or the state as a whole, to deny people that right? To deny the right of two people getting married based on their sexual orientation due to your personal beliefs is quite a departure from the cry of tolerance that this country is striving to achieve.

Proponents of Prop 8 may say that they don’t want homosexual marriages because a marriage is between a man and a woman. Ok, fine. Now, how do we extend the same rights and legal status to a gay or lesbian couple if they can’t get married. Proponents once again chime in: let’s give them separate, but equal civil unions. Right. “Separate, but equal.” …because that worked so well for our country with segregation.

It’s time to cut the crap. Who cares what other people do behind closed doors; it’s not your problem. The United States strives to be a country of equality, of opportunity, and of tolerance. When you advertise your support of Prop 8, you demean this country’s values and spread the support of intolerance.

Join me, and many others, in defeating Prop 8. It would be un-American to do otherwise.

Taking the blame

Politics No Comments »

Let’s move into the realm of the hypothetical. Let’s say that Obama gets elected for President. Not only does he get one of the most powerful jobs on the face of the planet, but he also receives a damaged economy, high unemployment rates, states on the verge of bankruptcy and a stalled mortgage market. Frankly, I’m surprised that anybody really wants that job.

Nevertheless, the 850 billion dollar (700 + 150 in sweeteners) bailout package was passed. Within the next few weeks the government will be nursing failing banks and Wall Street back to health with money that will need to be repaid by tax payers. It will be the job of the next President (Obama or McCain) to assist in moving the money around to cover these debts. I believe that it is inevitable that taxes will be raised in order to make up the difference.

Now, in this hypothetical situation, we have Obama (a Democrat) in office, raising taxes. Yet, I have very little doubt that the Republicans will be fighting tooth and nail against tax increases. It’s in their blood. Not only that, but they will be blaming the Democrats for the financial mess that the previous Republican administration has left. The next president will be taking the blame and be responsible for this horrendous mess, and I bet Obama will take much more guff from politicians and pundits than McCain ever would.

Either way, the next President will have some tough decisions to make, and I don’t envy that job one bit.

Where art thou my css?

Geek, PHP Development No Comments »

I’ve been playing with the symfony auto-generated forms, which are a really nice way to bootstrap an application. However, the forms that it generates are not styled at all, which makes developing with it (and looking at it all the time) quite painful on the eyes. Here’s some CSS to make your auto-gen tables look more like what the forms book shows in the examples. All you’d need to do is class the table with “autoform”.

table.autoform {
	border: solid 1px #CCC;
	border-collapse: collapse;
	border-spacing: 0px;
	padding: 0px;
	margin: 0px;
	border-spacing: 0px;
}

table.autoform th,table.autoform td {
	border: solid 1px #CCC;
	border-collapse: collapse;
	border-spacing: 0px;
	padding: 3px;
	margin: 0px;
}

table.autoform th {
	background: #EEE;
	font-weight: bold;
	text-align: left;
	padding-left: 10px;
	padding-right: 20px;
}

table.autoform ul.error_list {
	color: red;
	padding-left: 20px;
	margin: 0px;
}

Tell me something I didn’t know

Drivel No Comments »

Pumped my gas today, and this is what it says to me.

1337 gas

1337 gas

Yeah. 1337.

Oil tycoon bastards.

I blame George Bush…

Drivel 3 Comments »

On Friday, March 28th, my wife and I went to visit my parents in a nice Sacramento suburb. We parked our car in the driveway overnight, and some bastards take some kind of instrument and smash the driver’s side window and dent the metal trim surrounding the window. Motivation: an iPod Touch that I, now regrettably, forgot to bring into the house.

Thankfully, the iPod was itemized on our renters insurance, and the window was covered with a small car insurance deductible. All in all, it was only a few hours of hassle to get everything sorted out over the phone, have the window replaced and clean up the mess.

However, I have been considering the following question: What, exactly, would prompt a minor crime such as this in a “nice” area of town. Perhaps the area is not as nice as I think it is, but all indications show that the population is generally of the older variety with grown children. Of course, miscreants may swing in to the nice neighborhoods specifically to target people they assume have a higher income than themselves. That notwithstanding, it still takes a certain amount of balls to break into a car just to steal an iPod. I believe that this specific crime boils down to the current economic climate of the country, and, ultimately, the combined actions (or inactions) of our government that has widened the perceived disparity between classes and the overall state of despair.

Our country, with no uncertainty, is in an economic downturn. I’m no economist, but I believe it’s more psychology than economic factors that’s stopping the government and officials from uttering the word ‘recession.’ No matter what it is, it ain’t good. The country is in great monetary debt and many families are tortured by the threat of having banks foreclose on their loans. Though the current administration passed the Economic Stimulus Package, I think it will take a regime change (either Democratic or Republican) before our country is able to get out of this rut. Meanwhile, our “team” morale has been shattered, and people who were doing fine before this rut are now, driven out of some form of desperation, acting on primal impulses and initiating misdemeanor crimes in order to satiate their inner desire.

Granted, no amount of perceived psychological security will ever completely stop crimes of this nature; there are certain primal urges that some types of people are unable to contain. However, as the country recovers from this mess that we’re in, I’m sure crimes of this nature will decrease, and restore the peace back into a local suburb near you.

Spring

Drivel No Comments »

Happy first day of Spring, everyone!

Spring has sprung,
the grasses riz.
I wonder where
da boidies is?

All da boids
is on da wing.
But dats absoid
because da wing
is on da boid.

Who-da thunk it: Garfield is funny without Garfield

Drivel No Comments »

Case in point: http://garfieldminusgarfield.tumblr.com/

As a kid, I’d read Garfield. Heck, I even watched the animated TV show. Looking back on it, my parents must have been spiking the punch or something to that effect.

Flight Simulation

Drivel No Comments »

Among the computer hobbies that I’ve picked up, Flight Simulation has been one of my passions. Although I have very little time to devote to this hobby, it has nonetheless been the source of many hours of challenging fun. In fact, my interest in flying began with Microsoft Flight Simulator for the IBM PCjr.

Microsoft Flight Simulator for the IBM PCjr

You can reach a high degree of realism in Microsoft’s Flight Simulator line of products, but one area that has consistently been lacking in all flight simulation programs is accurate air traffic control (ATC). This, as you obviously may know, is a vital part of the global air transit community. Talking to an actual person on the other end of your COM radio rather than punching buttons provides another level of complexity and realism to the simulation experience.

Fortunately, you can achieve this by using online multiplayer networks such as VATSIM. Using this system you can use voice, obviously the preferred and more realistic method, or text to communicate with air traffic controllers watching the traffic in their virtual scopes. VATSIM aims to be as realistic as possible, so you must file flight plans, use DP (Departure) and STAR (Standard Terminal ARrival) plates, and get required clearances to guide you from point to point in your flight path. Through VATSIM you are afforded a rich and vibrant community of avid flight simmers devoted to achieving the highest realism while also being extremely helpful and patient.

For all the fun this provides me, it still is a time consuming process; flights on VATSIM must be flown in “real time” (rather than using the time acceleration capabilities of the simulator); a 5 hour flight from KSFO to KJFK really must take 5 hours in the simulator as well while you’re on VATSIM. Of course, when you’re offline you can use whatever time shifting you like, but I feel it highly diminishes the entire simulation experience.

Ultimately, there are two roles you can play on VATSIM: Pilot or ATC. If you’re into flight simulation, then you can fly on your own, or find a Virtual Airline that fits your requirements. (I am currently AFA4431 at American Flight Airways.) If you’d like to try the scopes, you can get in touch with a specific virtual air traffic control center and use their documentation and guidelines to train you.

If you’re interested, here are some links for more information:

On one of the forums that I visit, a user has the signature: “If you think Flight Simulation is a game, then get out of my airspace.”


Copyright © 2007-2025 dotEvan. All rights reserved.