The content of this blog is my personal opinion only. Although I am an employee - currently of Nvidia, in the past of other companies such as Iagination Technologies, MIPS, Intellectual Ventures, Intel, AMD, Motorola, and Gould - I reveal this only so that the reader may account for any possible bias I may have towards my employer's products. The statements I make here in no way represent my employer's position, nor am I authorized to speak on behalf of my employer. In fact, this posting may not even represent my personal opinion, since occasionally I play devil's advocate.

See http://docs.google.com/View?id=dcxddbtr_23cg5thdfj for photo credits.

Monday, January 02, 2012

Recovering diverged home directory version control

I have long version controlled my home directory.  CVS. Git. Hg.

Unfortunately, they diverged.  Divergence happens naturally with CVS.  You have to work hard to get git and hg to diverge, but I did.

Now I want to merge the diverged home directories back together.  Preserving the history if possible, from the different VCS.  Sometimes just merging fikes.


Today: I want to start merging a diverged linux tree, from a flash drive, with my working tree (which started off on cygwin).

I created a new hg repo, created a branch on it, and then imported the tree to be merged.

I pulled/pushed this with my main home hg repo.  Had to use -f, to force unrelated repos to be together.

Now I have a single repo, with my current working (cygwin derived, homedir, and a not working linux homedir, on different branches.  The former n the default branch.

That's okay.  Not so bad.  A single history object(although I have kept separate working space trees.)


Now I want to merge, a file or a few files at a time.

E.g. copy the README from the linux branch to the default working derived from cygwin branch.

AAARGH!!!!  Hg doesn't handle partials... neither merges, not copies, nor...  Hg just plain really wants to lose track, not make doing this activity easy.

Missing X fonts

Like http://ubuntuforums.org/showthread.php?p=11544410, I was getting errors such as

Warning: Cannot convert string "-*-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-*" to type FontStruct
Warning: Cannot convert string "-*-helvetica-medium-r-*--*-120-*-*-*-*-iso8859-1" to type FontStruct

(Except that I was getting the errors, not on a fresh Ubintu install, but when trying to use a fairly new machine at work, with what is probably a newer version of redHat.)

The post I quote fixed things by setting ~/.Xdefaultsto

emacs*font: 7x14

And then doing xrdb -merge ~/.Xdefaults

On my end, I found that neither 7x14 nor courier worked.  But font "fixed" did.

An Amusing and Frustrating Anecdote about Google 2-step Verification

I like Google 2-step verification - in which you normally log in with a password, but where, if you are logging in from a new machine, etc., you "verify" your login by entering a one time code sent to your cell phone by voice or text.

I liked the idea as soon as I heard of it, but was reluctant to sign up for it because I frequently use my laptop computer in places where cell phones don't work - e.g. at the coast in Oregon, and, most recently, at my new house in Portland's hills.

I was scared that I might end up unable to log into my gmail, lacking cell phone.

Nevertheless, after reading rave reviews, I finally gave in and signed up for 2-step verification.  And have continued to use my laptop fairly successfully at the coast without cell phone coverage, since normally it has already been verified.

But over New Year's I finally tripped up:

Because of a bug with googlevoiceplugin.exe (a new copy was spawned every time I started Chrome: I had 52 copies when I realized what was happening) I uninstalled and reinstalled the plugin, and eventually Chrome itself 9since  the plugin would not uninstall while Chrome was running).

So when I tried to log back into gmail on Chrome, 2-step verification was required.  But my cell phone doesn't work at the coast.

Now, Google 2-step verification has  a backup phone numbeer, which can be a land line using voice.  But remember that I said the new house that I have just bought also lacks cell phone coverage?  Guess what my backup phone was?

And Google 2-step verification does have a backup set of one time passwords.  I know I printed them out for my wallet.  Umm...  got a new wallet, recently, smaller, and did not carry it over.

So now the fun begins:  I don't have to drive too far to receive a text message.  I'll try to login, get Google to send the verification code, drive to where I can receive a text message, drive back.

Try #1: got the message.  Actually, got several verification code messages.  Drive back, they don't work.  Perhaps I got confused, and typed the wrong verification code into the wrong box.

Try #2: I realize that I may not need to drive the few miles to the next town.  The mountain next to my house may have reception.  Drive up it, yep, received the text message.  Drive down... Nope, didn't work.

I'm beginning to think there is a timeout.

Try #3: Repeat. An hour or so later, since I had to charge my cell phone - the battery drains quickly in this area. But this time, I can't get any bars on top of the mountain.  The fog has moved in and the sun has set, affecting signal strength.
So I drive to the next town. Signal, but no text message.  I wait ten minutes, start driving back... and the message arrives while I am driving.  Have I mentioned that AT&T Wireless has occasionally taken >4 hours to deliver text messages?  20 minutes is par for the course.

Doesn't work.  I', getting pretty sure there is a timeout.

Try #4: This time I request the verification code, drive out, and call back to ask my wife to enter it.
However, my laptop has gone into power saving mode, and although I disabled the power-on password, by wife doesn't realize what has happened, and tries to use  the second computer sitting next to the laptop that needs the verification code.

2 days later we try again: my wife drives to the next town with my cell phone.  She calls me back when she gets a signal.  I request the verification code. She waits a minute or so - fortunately, this morning AT&T is fast - and reads it back to me over the phone. I enter the code, and all is well.

I change my backup hone number to the landline at the coast. Realizing that this will needto be changed again when I get back to Portland.

And I write the backup passwords down by hand.