March 2008

Converting a svn working copy to a git-svn repo

I'm at Pycon, where we have wlan in the common areas but not in the hotel rooms (unless you pay $12/day extra). I'd like to be able to continue working on Slugathon in my room. I have a deep psychological need to check my changes in frequently.

For simple projects (one programmer, trunk only, no branches), svn is fine, until you lose your network connection to the svn server. For disconnected work on a project that lives in svn, you want git-svn. (Or maybe svk, but I don't know svk.)

Anyway, here's the recipe, starting from a working copy in ~/src/Slugathon

  1. cd ~/src/Slugathon
  2. svn status, to make sure I have no changes that aren't checked in
  3. svn info, to find the URL to the svn repository
  4. mkdir ~/src/Slugathon-git
  5. cd ~/src/Slugathon-git
  6. git svn init -t tags -b branches -T trunk URL (using URL from step 3)
  7. git svn fetch (this can be slow, for a large project, and you need net access)
  8. git log, to confirm that the history is right
  9. Ensure that the working copy has the expected files
  10. (optional) rm -rf ~/src/Slugathon; mv ~/src/Slugathon-git ~/src/Slugathon

Of course, this only helps if you know git and git-svn.  I know how to use them day-to-day, but I always have to lookup infrequent operations like this.

Programming

Comments (0)

Permalink

In The Garden of Iden

Just finished In the Garden of Iden, by Kage Baker. It's the first of her series of Company novels. It's a restricted time travel series — the super people from the future can go back in time but can't bring items with them or change observed history. So they go back, establish bases in remote areas, and recruit kids who were otherwise going to die (and whose deaths were not important enough to count as observed history). Then they make the kids immortal, train them for years, then have them work (essentially forever) to Help the Future.

I'd read a couple of her shorter Company stories and liked them a lot. This one, not so much. It's set in the time of the Spanish Inquisition and the English Reformation / counter-Reformation / counter-counter-Reformation. So the background story involves lots of alleged Christians killing each other in brutal ways over relatively minor doctrinal differences. And the foreground story mostly involves collecting rare plants from a garden, before they go extinct, and a romance between an immortal and a mortal.

Not bad, but it read more like an introduction to a series than a self-contained book. Lots of development of the main character; not a lot of plot.

Books

Comments (0)

Permalink