I think I've mostly fixed a problem with how Daizu knows about which
paths in the repository represent the roots of branches. Up until now
I've been maintaining the branch table in the database by
hand (which is OK because my content doesn't have any branches, only the
test repository does).
What I'm doing now is watching for directories being added with
‘copyfrom’ information. If the source of the copy is a path which is
already known to be a branch, then I simply add the new path to the
branch table for future reference. The table is seeded
with the path trunk, which should always be a branch path.
Any other branches or tags created by copying from that, or from a
previously created one, should be detected.
This should work most of the time, but there are some holes in it that I can see:
- The most likely problem is if you rename a directory which has branches as descendants. I can fix that, and it's on my to-do list.
- If a branch is created from scratch, by simply adding a directory at /branches/foo or something, there's no way I can detect it. If you do that, you'll have to add it by hand to the database.
- The code can't handle partial branches, by which I mean branching (for example) just one website out of many. The problem is that taking part of your content out of its natural environment and trying to use it out of context is bound to cause problems. Perhaps I could fake it somehow so that Daizu sees a complete branch, but only part of the content comes from the branch and everything else is looked up in the trunk. That sounds extremely complicated though, so for now such branches are ignored.
(Update: I recently explained some of this in a posting to the svn-dev list.)