I see two things we should do: (1) ensure pristines that become unreferenced are deleted at that time;
(2) add pristine store garbage collection (GC). In r959723 I make "svn cleanup" remove all unreferenced pristines, as an easy start to (2), mainly just as a useful option to use during development before the pristine store looks after itself properly. (1) is the important one, the way I see it. The important bit not being actually deleting it, but rather ensuring that every time one becomes unreferenced, we invoke a pristine store API that *has the option of* removing it. (Later, we may want to configure the store so that this API doesn't actually remove unused texts until some time after it has become unreferenced, depending on cache fullness etc.) (2) can be just an "svn cleanup" action for now; it's only if we later want to start hanging on to unreferenced texts as described above that we will start needing GC to happen automatically. Or if we fail to fully implement (1) of course. - Julian