Recently a Subversion repo I was using got corrupted. Total crisis was averted by good backups and an hour later we were back up and running. Unfortunately we lost the last 3 commits. Lucky for us I was using Git as my SVN client. It took a bit of messing around to pull my commits out of Git and apply them to Subversion, but in the end Git saved the day. I’ll retrace my steps in case anyone else has similar issues.
- Find out which commits you need
- Use git command line and create your diff:
# git diff --no-prefix <r-1> <r> > Commit-<r>.patch
Where <r> represents the hash for your target commit and <r-1> represents the hash of the commit before it.
- Go to the subversion working root directory
- Apply the patch for the version
# patch -p0 < <Path-To-PatchFile>
- Commit using the old commit message from your Git history
Repeat steps 2-5 for each commit found in step 1.
I had to insert an additional step when I did this. My paths contained spaces (not my doing) and patch didn’t seem to like that. I removed the path from the filename in each patch and then ran the patch in the parent directory of the file. Hopefully this doesn’t happen to you.
Until recently I’ve only really created web services in PHP, which works perfectly fine for my needs. Some recent projects on the other hand require a little more “interprisy” level system. There is already existing code in C#, so I decided to dig into this new WCF stuff that all the cool kids have been talking about.
WCF looks pretty nice if you can find some documentation to get it all working correctly. I’ve built some RESTful interfaces before, so I know what goes into designing and implementing them, but figuring out the head and tail of .NET web services was beastly to start on. Perhaps a RESTful interface in WCF wasn’t the best project to start on with .NET. Oh well.
So I started with Microsoft’s documentation, which was pretty good in general, but spotty on the details:
I guess I needed something a little more hand-holdy to start with, so after extensive searching of the intarwebs I came across:
Thats all I wanted. Give me a working sample to play with! Ok, if I can build from this, you can build from this.
Recently I’ve been dealing with a codebase sitting in a Visual Source Safe 6.0 repository and to keep it brief and polite we’ll say it hasn’t been anything approaching “fun.” For anyone interested, I found a handy and effective way to convert an entire VSS repository to SVN.
First go grab the newest version of VssMigrate from Codeplex. I don’t know why the author prefered to keep the newest version on Codeplex as opposed to Google Code, but I’ll leave opinions for another time. VssMigrate does a pretty great job of converting repositories once you get it properly configured. The only issues I had are as follows.
If you get an issue about the SourceSafeTypeLib not being found (usually error 80040154), that means you need to register VSS’s ssapi.dll. This should do the trick:
regsvr32 C:\Program Files (x86)\Microsoft Visual SourceSafe\ssapi.dll
If you still get an issue, then you are probably running 64bit Windows. Just change the target platform of the project from “Any CPU” to “x86”.
The only other significant issue I had was in importing the entire repository at once. I didn’t want to bother with importing a single project or just a couple of projects. I wanted to move the whole thing. To do this you just need to remove some of the error checking. As of version 0.2.0.0 you just need to comment out the lines around Program.cs:623-627 and Program.cs:673-681. Specifically these are the lines that verify that you filled in VSSPROJ and SVNPROJ. Then set VSSPROJ to “$/” and you should be set.
Also be sure to change “PerformImport” to “True” and to use a local subversion repo, and set the SVNREVPROPSPATH so VssMigrate can alter the timestamps and authors.
I’ve been working hard on a game project for several months now and after much insight gained during GDC 2011 I’ve decided its time to get it out there. Junkster Wing is a Space FPS with some interesting RTS elements. Its still in its early stages, but is quite playable already! I will be posting development screen shots, videos, and alpha builds on its official website http://junksterwing.com
Anyone that has been following the development will know that Junkster Wing used to be called Supernova Outlaws, but over the last few months the direction has been changing and pushing in a more unique direction. The old moniker just didn’t really carry the descriptive vibe the game deserved. I think the new name gives a good feeling of what the game will ultimately be about.