Tuesday, September 20, 2011

Merging two git repositories and keeping their history

To merge our repositories together we use the instructions given in [1].

<might be unnecessary>
First we create a new branch with
git branch newbranch
on MIRPCADB and switch to it using
git checkout newbranch 
and push it using
git push -u origin newbranch
</might be unnecessary>

Now we move over to our No.Noise repository and use the following command to fetch the contents of MIRPCADB in a new branch of No.Noise
git fetch git@github.com:tjom/MIRPCADB.git master:newbranch
To be able to use the commit history we use the following command to move the files from newbranch into a directory called old in our master branch
git filter-branch --index-filter \
    'git ls-files -s | \
        sed "s-\t-&'"old"'/-" | \
        GIT_INDEX_FILE=$GIT_INDEX_FILE.new git update-index --index-info && \
        mv $GIT_INDEX_FILE.new $GIT_INDEX_FILE
    ' "newbranch"
followed by
git merge newbranch
Now we can simply move (copy and delete(!)) the files to our NoNoise plug-in src directory. After calling
git add -u
all files should be recognized as 'renamed', which means that their history will be preserved.

After committing and pushing the changes to the desired branch, we call
git branch -d newbranch
to remove the dummy branch.


[1] http://zrajm.org/ref/git-repo-merging.html

Friday, September 16, 2011

Had to add the following to BANSHEE_LIBS/the LINK variable in the makefile to use these packages.

BANSHEE_LIBS = ... -r:System.Data -r:Mono.Data.SqliteClient

Monday, September 5, 2011

Adding Math.NET lib

Nothing entirely new. Just to remember how it is done.

Add the path to the redistributable dll to the LINK variable of the project make file (e.g. Foo) with a leading "-r:". It should look like the following.

LINK = $(BANSHEE_LIBS) $(am__append_1) -r:/home/thomas/NoNoise/MathNet.Iridium-2008.8.16.470/ForRedistribution/MathNet.Iridium.dll 

PS: Also had to copy the dll to /bin/addins although I'm sure there's a better solution to that.