On Wed, Dec 20, 2006 at 14:32:33 +0100, Juliusz Chroboczek wrote: > > (I don't really know what a Population is, so I'll need some time to > > poke around and learn) > > When you find out, please summarise for the list.
Ok, here goes. A Population, much like a Slurpy is a representation of a directory tree. Populations contain far less information than slurpies. Each file/directory name is associated with metadata, what patch they were last modified by (PatchInfo), who created the file, etc. It seems that Populations are used for informational "read-only" purposes only. There is code in the core Patch routines (PatchApply.applyToPop) which applies patches to a population, but such code only exists to update the metadata in the tree. For example, hunk patches are ignored. Annotate uses the code to find out who created the file in question. That is, given a filename, we lookup the name from the Population and print out the associated metadata. This doesn't give us the full annotation, of course -- we'd have to manipulate the actual patches for that -- but it gives us easy access to the initial information. (*) Also, when annotating a directory tree, Population has a second use. We can directly extract information such as "Mary removed file foo in this directory" by traversing the PopTree and reading the metadata. Some of the Population code looks like it is presently unused. Population.popUnfold is one such example. Do we have a future use for these? Are they cruft from the past? (*) I wonder why we do it this way. One would think that, since we are running the patches backwards anyway, we can get the information from there. Maybe it's something to do with partial repositories? Maybe it's just so much more convenient that way? -- Eric Kow http://www.loria.fr/~kow PGP Key ID: 08AC04F9 Merci de corriger mon français.
pgpKNgwhizK8s.pgp
Description: PGP signature
_______________________________________________ darcs-devel mailing list [email protected] http://lists.osuosl.org/mailman/listinfo/darcs-devel
