Wednesday, December 8, 2010

Duality SVN - Self-Hosting Milestone Reached

Today has been a very productive day. 
Today is also a very important day.
Today Duality SVN became self-hosting.

Duality SVN in action, preparing to be used to commit some changes to it's SVN repository. It can also be used to update the working copy from the SVN repository, allowing for the basics of day to day collaborative development work already. Hence, as of this morning, it has "self hosting"! ;)

Although it is now functional, there are still a lot of rough edges and unfinished/unimplemented features that need to be worked on, so I don't really recommend this for public usage yet.

However, for those who are really curious, the source code can be obtained from the URL shown in the screenshot. Or, just follow the links from the Project Homepage: http://code.google.com/p/dualitysvn/


---

Now for a little behind the scenes rambling...

One of the struggles I had early this morning was with trying to get ALL of the svn output from the QProcess object I was using. This manisfested itself in the form of the final revision number print not appearing in the captured process output. As a last resort, I hardcoded 3 extra calls to grab lines from the standard output buffer of the process, guessing that this was roughly the amount of missing lines, which fortunately worked. Why 3 calls? Well, doing an exhaustive while-loop ended up causing a crash, and eyeballing the output suggested that 3 extra lines should cover it. I guess I struck it lucky there, though this all sounds a bit fishy...

After this little roadbump in getting things working, I quickly got svn update working. In fact, I even learnt this morning about the use of the --targets "targetsFile" svn argument, which allows specifying a list of relative paths for SVN to operate on (instead of passing each of the paths into the commandline). Previously when scoping out the svn help logs I was searching for such an option (partly inspired by Blender's MSVC+scons situation), though I must've missed this option, as I ended up fearing that I'd need to use "changesets" to do this instead.

From there, it was a very easy step to finally finish off the commit logic, and voila! We can finally do a roundtrip development cycle! 

With the basics in place, work became much easier from then on. I'd simply run the program, test it out, and in the process commit the changes (if they worked). Hopefully I'll soon finish off the remaining functionality, and move this into "maintenance" land :)

1 comment:

  1. buuuuuuh.... buuuuuh.... buuuuh.
    *heavy metal machinery clunks in the background*

    … are you sarah connor? …

    ReplyDelete