2011-05-29

git with multiple svn-remotes

Use git init to create an empty git repository, then edit .git/config to add the svn remotes:

[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
[svn-remote "svn"]
url = file:///home/steve/code/svn-repos/foo
fetch = trunk:refs/remotes/trunk
branches = branches/*:refs/remotes/*
tags = tags/*:refs/remotes/tags/*
[svn-remote "svn-other"]
url = file:///home/steve/tmp/foo-svn-other
fetch = trunk:refs/remotes/svn-other/trunk
branches = branches/*:refs/remotes/svn-other/*
tags = tags/*:refs/remotes/svn-other/tags/*

It is assumed at this point svn-other is simply a copy of svn. They are allowed to diverge later.

Do a git svn fetch -R svn to initialise git svn. To manage commits between the two svn remotes, create local tracking branches of remote branches:

$ git checkout -b trunk-other remotes/svn-other/trunk

I ended up with something like :

  master
  trunk
* trunk-other
  remotes/svn-other/trunk
  remotes/trunk

You can pull changes from one svn repository then push it to another:

$ git svn fetch -R svn
r1 = 049fed636e283096986e0eefa261be0525d8d7b3 (refs/remotes/trunk)
Checked out HEAD:
$ git svn dcommit
Committing to file:///home/steve/tmp/foo-svn-other/trunk ...
A test
Committed r2
A test
r2 = 10613af6701eca4b30a3ff89ab408e38ca157fa0 (refs/remotes/svn-other/trunk)
No changes between current HEAD and refs/remotes/svn-other/trunk
Resetting to the latest refs/remotes/svn-other/trunk

Cheers,
Steve

2011-05-18

Find and svn add all untracked files

svn st | grep '^?' | sed 's/^[? ]*/"/' | sed 's/$/"/' | xargs svn add

Cheers,
Steve

2011-05-08

Firehol and mDNS


Here is my firehol.conf that allows multicast mDNS packets through:


# define mdns so we will accept it
server_mdns_ports="udp/5353"
client_mdns_ports="5353"


interface eth+ multi
   policy return
   server mdns accept
   server multicast accept                                                                                                        


interface eth+ home src "${home_ips}"
    server  all         accept
    client  all         accept


Initially I had the server mdns accept and server multicast accept inside the home interface, but this didn't work. Firehol's developer, Mr Costa Tsaousis, pointed out that src "${home_ips}" on home would exclude broadcast packets sent from MAC addresses, thus the second interface definition (multi).

Cheers,
Steve

2011-05-07

Success for Science

Just finished packaging my engineering thesis project into a more portable format: an altoids tin! I have seen people put some neat stuff inside them, and I am chuffed I managed to as well :) Though I had to cut through the lid for the display. And I only had to use the hacksaw once.



Cheers,
Steve

2011-05-06

Improved the DSO Nano Probes

Got parts from element14 today: hook probes and right-angle 3.5mm mono plug. Modded my DSO nano probes, replacing the micro-tweezer probes and the connector. Interestingly the factory probed using a stereo connector, but the mono replacement works just as well.


This along with BenF 3.61a firmware upgrade has improved the DSO nano somewhere between 100 to 1000 times.

Cheers,
Steve