Skip to content

Introduce recursive PathMaps with snapshots

Julien "_FrnchFrgg_" Rivaud requested to merge (removed):master into master

This is the first commit in a series that will add back the COW PathMaps.

This version lacks comments, and snapshots at each modification. A future commit might introduce a "shared" member, which when true means that the PathMap should stay immutable and should be snapshot before modification. If the PathMap is not shared, then there will be no need to snaphot it. Maybe such a thing is not needed because the GC should take care of the transitional Pathmaps that are unneeded anymore (they will be unreachable).

I send it early because here it passes all tests except svncheck-regress, but without the patch these tests don't pass either.

There are changes in behavior (which should not matter but still): your version accepts a file whose name is the same as a directory, because directories are just by-products of having files in the hierarchy under them. My version doesn't, but I can get that back if needed by using two different maps for files and directories. Such a repository could not be checked out anyway.

Can you comment on my attempt ? Note that I discovered Go just today, so the code might be a bit crude.

Merge request reports