22 Apr 2022 - permalink
When I first started programming in HyperCard and later Think C on my family’s Macintosh SE in the mid 90’s, I had never heard of version control systems. Early in the 2000’s I started using CVS and like many I moved on to Subversion and now Git. Unfortunately I did not have the foresight to migrate all my projects at the time and I now have both CVS and SVN repository backups locally on my machine.
Subversion
After some searching, the steps to migrate the Subversion repo were clear (Useful guides by Piotr Fert, Brajesh Sachan and Tommy). First restore the svn backup to a local repo using the same svnadmin
that built the backup:
svnadmin load repo/dir < svnbackup
Then create an authors.txt file to map svn commit usernames to git users in this format:
username = First Surname <[email protected]>
The repo can now be checked out with git-svn and all changes will be preserved in a new git repository:
git svn clone repo/dir --no-metadata -A authors-transform.txt --stdlayout checkout/dir
Looking at the branches with git branch -a
, all the SVN branches are now set as Git remotes. These can be re-branched in git on the appropriate commit hash and then removed. There are a few SVN references left to be removed
git branch -d -r trunk
git config --remove-section svn-remote.svn
rm -rf .git/svn .git/{logs/,}refs/remotes/svn/
CVS
This was not as easy as several of the suggested tools no longer works. cvs-fast-export did, however, and combined with git, the process was actually rather simple. Export the repository to a git import stream:
cd cvs/repo
find . |cvs-fast-export > ../stream.fe
Then, initialize and import into new git repo
cd ..
git init reponame
cd reponame
git fast-import < ../stream.fe
Github
To move these to GitHub, simply create a new, empty repository in GitHub, set the remote and push.
Even though I rarely, if ever, need this old code, it’s part of my history and nostalgic like old photos can be. Feels good to have salvaged part of it.
21 Apr 2022 - permalink
It’s been more than ten years since the last blog post to this site. A lot will happen in ten years. I’ve grown Simpelt Regnskab, started with Jacob Oettinger in 2009, from a side project to my daily job. I moved to a new appartment with my girlfriend in 2012. I became a father in 2016 to a wonderful girl. As my focus changed, I stopped maintaining the site and I eventually retired the old content and replaced it with a single about page. I’ve since missed having a place online to publish thoughts and interesting links on several occasions, stubborn enough that I feel, it should be my own place and not some platform I have no control over. So, I finally brought back online some of the old content and prepared for new thoughts. Feels good.
19 Apr 2021 - permalink
We need legislation in this area, fast.
Every day, consumers are exposed to extensive commercial surveillance online. This leads to manipulation, fraud, discrimination and privacy violations. Information about what we like, our purchases, mental and physical health, sexual orientation, location and political views are collected, combined and used under the guise of targeting advertising. […]
Together with 55 organizations and more than 20 experts, NCC is asking authorities on both sides of the Atlantic to consider a ban.