I'm back from vacation, and just yesterday I started doing some work on the hashed pristine stuff. Following David advice, I'm going to use the [write,read]HashFile functions (I've made slight refactoring, I'll send patches soon), but I've got a doubt.
In writeHashFile, we name a file only with his hash (right?). What happens if two different files have the same hash? This is not usual, but surely possible, and it will create a big mess. The same mess could happen if we have two identical files. With patches this is not possible, as they are timestamped in their contents, but in pristine it's not so difficult to have two identical files with different names. Why don't we prefix / suffix the name with a timestamp? It's not mathematically bulletproof, but in practice should be more than enough. I don't see particular problems in this solution, as we access files both locally and remotely using indexes (inventory for repo, file index for pristine), but maybe there's something in the new hashed repository magic that I miss. We just have to be careful to preserve the timestamp during local and remote copy. Salvatore _______________________________________________ darcs-devel mailing list [email protected] http://lists.osuosl.org/mailman/listinfo/darcs-devel
