jquery

gist JS

Tuesday, September 30, 2008

Merging with Git: conflicts!

Dramatis Personae:

git-svn rebase: our hero/ protagonist
(no-branch): a mysterious stranger
.dotest: an even more mysterious interloper


Scene I - The Setup

tra-lala-lala
>>mate config/environment.rb
>>git add config/environment.rb
>>git-svn rebase

eek!!
>>CONFLICT (content): Merge conflict in config/environment.rb

merging...
>>mate config/environment.rb (and fix problem...)
>>git add config/environment.rb

Scene 2 - Where it all goes wrong

Well, since we just added, maybe we should just commit.
>>git commit -m "merged conflict

At this point, everyone dies, commits are forever lost and you are left to rot in the bizarre (no branch) land that your $9 git tutorial, or not-yet-published book, never mentioned. Return to start.

Scene 2 --ammend

>> git rebase --continue !!!

Milk & Honey*
(or not. see the postscript)

Scene 3 - Where all is explained

The problem with scene 2 is that once a conflict occurs, git pops you into a new 'branch'-ish thing called (no branch). This is not a regular old branch afaict however. If you were to decide not to fix the conflict and just go on your merry way committing new code you'll be in for a lot of pain. You can tell if you're in this mysterious state by running 'git branch'. On git <>>[jdwyah@silvia sample]$ git rebase --continue
>>Applying: test
>>No changes - did you forget to use 'git add'?


Basically when you committed you essenitally stole your continue's thunder and it isn't happy about it.

Now you can do a --skip instead, and this is also written up here: Larry vs. the Git Rebase Merge Conflict but from what I've been able to reproduce I think he must've done the commit accidentally like I did and there's no reason not to do the continue instead. It's such a twitch reaction to add then commit I'm guessing that he did the same thing I did. That said, git rebase --skip does work as a way to get out of this mess.

Postscript (--ammend --ammend)

* Note, it might not necessarily be all milk & honey here. You may in fact, be left with... MORE CONFLICTS! Now why might this be? Well, the fact is that you may be rebasing onto your local branch which may have multiple commits. If this is the case, when git goes to replay your changes after the rebase merge it may well conflict multiple times: once for your first local commit, once for your second, etc...

It's quite possible to think that you're losing your mind at this point, since you can continue to get conflicts for the same darn file over and over again, but if you do keep merging things you should eventually make it out of the rabbit hole. Hodgies merge option is probably a good solution here, or alternatively you could merge your local commits into one big commit.

firefox bookmark bar broken and I can't tab

fwiw I'm dropping Firefox like a sharp knife the second chrome comes to mac. I'll admit I got my hopes up that 3.0.2 might fix one or more of:

  • the out of control CPU usage

  • the bookmark sidebar that won't close

  • or the bookmark autocomplete which isn't keyboard navigable


but I should've know better.

Who else is running chrome under vmware in unity mode so they can pretend that they're not feeling left out of the fun?

Non sequitor, but I have to say I'm hugely tempted to just continue reading The Time Was Soft There and dream about Paris for the rest of the day. Now that's browsing I could get in to.

Friday, September 19, 2008

InfoQ interview and GWT SEO Sample Chapter

I'm pleased to announce that there is an interview I did with InfoQ is now available online here: http://www.infoq.com/articles/progwt

As an added bonus, Chapter 12: Search Engine Optimization Making AJAX Searchable of Pro Web 2.0 application Development with GWT is available as a sample chapter with the interview.

In this chapter, we’re going to look at how to make our GWT site search engine
friendly. To do this, we’re going to reimagine the way that we get data to our GWT widgets,
moving from RPC to a bootstrapping method where we’ll use GWT serialization to serialize
our objects right into the HTML host page.


Enjoy!

Tuesday, September 02, 2008

Pro Web 2.0 Application Dev with GWT links

Jeff Oakes put together a great document that captures all of the weblinks from my book Pro Web 2.0 Application Development with GWT. You can find them here:

http://docs.google.com/Doc?id=dhftzx5_669z4wwgc4

Thanks Jeff!