Subversion
Git warning signs
This is what made me leave Subversion: Grr!
The kiss of death for Subversion
There are some things that I am just not willing to take, and waiting for my machine is one of them. I had tpo much of this: I am not sure yet what I am going to use, but it is going to be some sort of DVCS
The BIG Merge
Merging is one of my least favorite activities, this is especially true when we are talking about a big merge. You might have noticed that I have been talking lately about some big changes that we are making to NH Prof. And now the time has come to merge it all back together. Well, big changes is quite an understatement, to be fair. what we did is rip apart the entire model the application used to work with. We moved from a push model to a pull model, and that had quite a lot of implications throughout the code...
How to fix a bug
Yesterday I added a bug to Rhino Service Bus. It was a nasty one, and a slippery one. It relates to threading nastiness with MSMQ, and the details aren’t really interesting. What is interesting is how I fixed it. You can see the commit log here: At some point, it became quite clear that trying to fix the bug isn’t going to work. I reset the repository back to before I introduced that bug (gotta love source control!) and started reintroducing my change in a very controlled manner. I am back with...
It is alive! CodePlex has Subversion Access
It is so much fun to see things that I worked on coming alive. The official announcement is here, with all the boring details. You can skip all of that and go read the code directly using SVN by hitting: https://svnbridge.svn.codeplex.com/svn Switch svnbridge for your project, and you are done. Note that this is https. And yes, it should work with git-svn as well. Way cool!
Patch management approaches using centralized SCM
Without getting to the centralized vs. decentralized SCM argument (I understand the differences, I just don't grok them), patch management is important in many scenarios. Contributing to OSS projects is a major one, I admit, but I have previous used these techniques to be able to take emergency fixes on productions and merge them into the development trunk. The question came up in the NHibernate Contrib mailing list, and Josh Robb has commented on that at length. I thought that it would be a good idea to take that and expand on this a bit. The problem: ...
You can checkout, but you can not commit
Well, here is how my last few days were spent. Trying to get SvnBridge to work on Mono 1.9.1. (Note that we are talking about working locally, when the hosted version will go live, it will obviously be accessible from everything and anything that can talk to an SVN server). After getting it to compile and run (not a trivial process, I must say, I used a surprisingly high number of MS CLR stuff, but we will leave that to another post), I had managed to get some basic functionality working, and I was able to successfully checkout the...
Git to CodePlex
Well, it works, finally. I had major issues getting commits to work. Eventually I figured out that git-svn does not send hashes of the files as all other SVN clients that I have tested so far. I was focused on finding corruption much earlier in the game, and drowned in the details. I am not sure why it is committing a single change twice, but it is showing the same behavior on standard SVN servers, so I think that I am fine. And here is the final test: :-D
The friendly SCM neighborhood
First, I really have to say that I had no control over this poster, it just came up and I had to put it here.
Git and CodePlex
Let us just say that this is an encouraging development:
Challenge: why did the tests fail?
For a few days, some (~4) of SvnBridge integration tests would fail. Not always the same ones (but usually the same group), and only if I run them all as a group, never if I run each test individually, or if I run the entire test class (which rules out most of the test dependencies that causes this). This was incredibly annoying, but several attempts to track down this issue has been less than successful. Today I got annoyed enough to say that I am not leaving until I solve this. Considering that a full test run of all...
Hunting for the missing item exception
There was a known, but irreproducible, in SvnBridge for a long while now. The essence of the bug is that under some circumstances, updating from SvnBridge would fail. The reason for failure was an assertion failure. Somehow, someone made a change to a file that doesn't exists. Did you note the some circumstances part? That is the critical issue there. It is the circumstances that I wasn't able to reproduce. As a matter of fact, I wasn't able to narrow what happened. I sometimes got it, and when I had a repro, I could fix it. But all...
Bug Hunting Story
The bug: SvnBridge will not accept a change to a filename using multi byte format. Let us start figuring out what is going on, shall we? Hm... looks like when TortoiseSVN is PUT-ing the file, it uses the directory name instead of the actual file name. Obviously, this is a client bug, and I can close this bug and move on to doing other things. Except that I am pretty sure that SVN can handle non ASCII characters... Let us compare the network trace from SVN and SvnBridge and see what is going on... Oh, I...
SvnBridge - Success
My personal success criteria for SvnBridge is when I no longer care what I am working against. And I think we got to that point. There are still issues, to be fair, but they won't hit you anywhere near mainline development.
I am listening to Rob Conery MVC Storefront 9 in which he makes the mistake of referring to CodePlex as Subversion. With that, I think that I can say, we are there.
Solving the impendence mismatch between Hierarchical Data and XML
I was very impressed when I saw how Subversion handles the complexity of having data of hierarchical nature that needs to be serialized to XML. Check this out. <?xml version="1.0" encoding="utf-8"?>
<S:editor-report xmlns:S="svn:">
<S:target-revision rev="11"/>
<S:open-root rev="-1"/>
<S:open-directory name="tags" rev="-1"/>
<S:add-directory name="tags/asd"/>
<S:close-directory/>
<S:close-directory/>
<S:close-directory/>
</S:editor-report>
And here is another one:
<?xml version="1.0" encoding="utf-8"?>
<S:editor-report xmlns:S="svn:">
<S:target-revision rev="15"/>
<S:open-root rev="-1"/>
<S:open-directory name="trunk" rev="-1"/>
<S:open-file name="trunk/a.txt" rev="-1"/>
<S:apply-textdelta checksum="eabc96676e7defda414a1eed33bdfb09">
U1ZOAAAQEwETk2FzZDENCjINCjMNCjQNCjUNCjY=
</S:apply-textdelta>
<S:close-file checksum="c6301e5dad1330a7b9bd5491702c801b"/>
<S:close-directory/>
<S:close-directory/>
</S:editor-report>
I was, as they say incredibly happy...
The single line bug fix
It is amazing how much time you can hunt for the exact cause of a bug. In this case, it took me almost two days (intersperse with other work, however) to track down and find the issue. Remember, there is no reason to use ASCII, ever. I actually run a blame on the code (a new feature for SvnBridge!) to find out who wrote it. And then I sent a nasty email about it to /dev/null, just to clear my mind.
I don't like distributed source control
Let us see how much of a furor that will cause :-)
The reasons that I don't like distributed source control systems have nothing to do with technical reasons, and everything to do with how they are used and promoted.
The main reason that I don't like them is that they encourage isolated work. I don't want anyone in my project to just go off and work on their own for a few weeks, then come back with a huge changeset that now needs to be merged. The way DVCS are promoted, this is a core scenarios, "no one have to see...
Thoughts about building your own source control
Let me start by stating that you really don't want to do that. This is not something that you want to do, period.
Now that we are over that, I had the chance lately to go fairly deeply into SCM and how they are implemented from two fairly different perspectives. This is a randomly collected set of observations about SCM systems. As usual, the order is arbitrary, and no attempt was made to make any coherent idea out of this.
It is all about the client. The client in an SCM system has significant responsibilities. It is in charge of...
Source control practices to be abolished: The Large Checkin
I have just had to make a modification to SvnBridge because someone decided to checkin a change set that included 1,695 changes..
Even ignoring the issue of "your checkin broke my source control" mentality that I have now, this is bad from other perspective.
How do you review such a change? How do you even know what is going on there? In changes of this size, you aren't making a single change, you are making a lot of changes. Now you can't mix & match them either.
Prefer small checkins, they are easier to deal with.
SvnBridge 2.0 Released!
Took a lot of work, and several months, but it is here:
Download Page
SvnBridge - Optimization Results
A few days ago I posted about profiling results of SvnBridge. I spent the last few days implementing really aggressive caching mechanism, reducing remote calls, and in general working on the performance of the application. Here are the results: I think that I am in a good shape if the XML parsing starts to be a high level item in the profiling. Oh, and just a teaser, check this out. This is a checking out the SvnBridge code from Israel (and the servers are in the US). No, it...
The problem of over aggressive caching
Following the recent profiling effort, I decided to put far more aggressive caching into SvnBridge. I set it up so it would cache the full revision from TFS on any query, and then serve it from the cache. When I run it against the test server it worked beautifully. Then I had run into this issue: I am pretty sure that this is not going to be an acceptable scenario. To be rather exact, I would find it acceptable if it was a one time cost, but the problem is that this is a cost that...
SvnBridge Frustrations
This is how I am feeling at the moment (more below): One of the major disadvantages of having to dog food the source control I am using to write the source control is that it is incredibly fragile. It is fairly easy to violate some invariant in a non obvious way, which make for problems down the road. The problem is that those problems are symptoms, not the real issue. As a result, I have this: I try to clean it up often, but at one point I got to SvnBridge5....
Challenge: Find the version
Okay, here is something that I had to deal with today. I had to implement the dated-rev-report command in SvnBridge. This command sends a date to the server, and get the first revision id that was committed before to that date. Because code is unambiguous, if we were using SQL, it would have been: CREATE PROC DatedRevReport
@requestedDate DATETIME
AS
SELECT TOP 1 RevisionId
FROM Revisions
WHERE CommittedDate < @requestedDate
ORDER BY CommittedDate DESC
Simple, right? Except that the interface that I have to TFS is not SQL (and I would be pretty sad if it was, so that is a good...
SvnBridge development environment
The first thing is getting the source to your machine. I recommend downloading the latest released version of SvnBridge from the SvnBridge site, and executing the SvnBridge.exe file. Put https://tfs03.codeplex.com in the Team Foundation Server text box and 8081 in the port text box, then click Ok. SvnBridge will connect to the remote server and then the the following notification tool tip: Check out the source using TortoiseSvn: Note: You can also use the following command line to checkout the code: svn checkout http://localhost:8081/SvnBridge SvnBrdige Open the SvnBridge.sln in Visual Studio and...
SvnBridge - Performance
I just did a small (and inconclusive) test. I run the following: DateTime start = DateTime.Now;Process svn = Process.Start("svn", "co http://localhost:8081/SvnBridge SvnBridge");svn.WaitForExit();Console.WriteLine("Took: {0}", DateTime.Now - start); First with the released version of SvnBridge (from October 07) and then with the trunk version of SvnBridge. The results means that I am doing something right: Checking out SvnBridge's code takes 04:49.125 minutes using the released version, but just 02:42.234 minutes using the trunk version. Just for kicks, making a second checkout using the same trunk instance of SvnBridge completes in 01:06.468 minutes. This is the results of a change...
SvnBridge - Performance
Standard disclaimers, this is from a machine near the server, it is not constant at that level, it is on the hosted version only, a lot more work needs to be done, haven't profiled it properly, etc. In short, this is a nice picture, and a good way to end a day.
Judging the quality of software
I found myself having some interesting discussions about quality, complexity and how to judge them.
More to the point, the difference between quality and fitness to use has came up.
My answer about judging quality was that I can judge that by applying generic software principals, which I have outlined here and by working with the software and seeing if it makes sense.
Make sense is hard to define easily. It is partly that the software is written in an understandable way, easy to work with, follow design guidelines and best practices and similar things.
My litmus test for that is the ability to...
Subversion is Xmlish
You know that it is a bad day when you start parsing XML using regular expressions. When I started working on SvnBridge, I expected to have a lot of issues with TFS. What I didn't expect was to get hit by a Subversion WTF of gigantic magnitude. Take a look at the following XML: <?xml version="1.0" encoding="utf-8" ?>
<D:propertyupdate xmlns:D="DAV:"
xmlns:V="http://subversion.tigris.org/xmlns/dav/"
...
Recursive dogfooding
Dogfooding: To say that a company "eats its own dog food" means that it uses the products that it makes. This happened a few days ago, I just finished adding a new feature to SvnBridge, and I was ready to commit. Now, I am very used to Subversion, so it is fairly obvious that I like keep using that. Except that SvnBridge is on CodePlex, which uses the TFS backend. If only someone would develop a bridge between the two... SvnBridge is mature enough that you can use...
CodePlex's SvnBridge
Recently I have been working on CodePlex's SvnBridge. This is an ambitious project, attempting to give a Subversion client the impression that it is working on Subversion while the real back end is a Team Foundation Server. I would have said that this is not possible, if I was asked. But not only this is possible, the CodePlex team actually got that working. A tiny disclaimer here, it is not 100% complete, but it is close enough to that that you can work normally with that without much issues. Some things still do not work, but they are generally...
Visual SVN: Another Zero Friction Tool In The Toolbox
Full disclosure, I have received a personal license for Visual SVN (49$) from the developers on Visual SVN, since they are apparently doing a lot of stuff with Rhino Mocks and wanted to show it. About a month ago I installed Visual SVN, and then I promptly forgot about it. When the evaluation period has ended, I found myself thinking, "Wait a minute, I really like this tool." Visual SVN works by extending Visual Studio with the same interface as TortoiseSVN, which means that it is instantly usable for anyone that have used TortoiseSVN (basically most developers on Windows...
I may need a hat or a crow
So I can eat it (No Scott, I will not go to that resturant again, I know they can probably serve both, but the salad scares me). Appernatly CodePlex is adding Subversion support. What I would really like to know if it would have the same integration that the TFS backend would have as well. At any rate, I would like to take this opportunity to apologize to the CodePlex team, I would have never believed that you would do it, way to go!
CodePlex, TFS and Subversion
Interestingly enough, Subversion support is the most requested feature for CodePlex. I suggest reading the discussion, it is very interesting. The major points against TFS and for SVN seems to be: Weak offline access support No patching No anonymous access The points above makes TFS a poor choice for an OSS project, which requires all three (but especially anonymous access...
The New Repository: Rhino Tools
Following the advice from the comments, I have managed to consolidate my various OSS SVN repositories into a single one, hosted at source forge. I was quite suprised that it was so much, to tell you the truth. The repository URL is: https://svn.sourceforge.net/svnroot/rhino-tools/trunk/ To checkout, execute:svn co https://svn.sourceforge.net/svnroot/rhino-tools/trunk/ rhino-tools There is no password necceary for reads. I'll be update the various links on the site to point to the correct location soon.
Patches in the commercial world
I mentioned before that I am now in the final testing and deployment stage. The process for getting stuff to the staging server is long, twisted and painful. It involve a USB key, hours of prayers and maybe the soul of a flightless bird. The problem is that some of the things that the application is doing is infrastructure stuff (routing requests), which means that such thing as routers, firewalls, etc are of great meaning to the application. It is a given that I can't install Visual Studio or a real debugger there, so...
Setting up a Subversion server on Windows
I love Subversion, it is a zero friction source control in the true sense of the word. It doesn't interfer with the way that I work until the moment that I want to do something with it. Combine it with TortoiseSVN, and I don't even bother to remember the command line parameters anymore. Now, I have been using Subversion on 99% of my projects for about a year now, both the open source ones and the ones that I get paid to write. (If anyone has a suggestion about how to combine the...
Steams Of Code
How many of you are aware of an NTFS feature called Streams? It means that the files are basically directories with a default file (named $DATA, IIRC), but you can also access them by appending a ":" and a name.Try running notepad test.txt:something, and see what happens.This feature was originally intended for use for file serving for Macs, but it has turned out to be very useful for all sorts of things. Thumbnails are the prime example for that, but Windows uses it for remembering that files are from the Internet and are not to be trusted, to store meta...
Subversion question
The reason that I choose BerliOS is that they provided me with
subversion access. But, what I didn't counted on was that I would
usually develop against my main repository at home. Now I've a
situation where I've two repositories, of the same data, that I want to
keep in sync. One way to do this would be to just dump & load the
data, but that seems... crude. Anyone can recommend another way?