On Wed, Oct 22, 2008 at 03:19:22PM +0200, Florent Becker wrote: > Wed Oct 22 14:42:30 CEST 2008 Florent Becker <[EMAIL PROTECTED]> > * making Darcs.Patch.Set comment into haddock > > With questions about the semantics of PatchSets.
Thanks, I'll be happy to apply, but these questions I can answer quickly, so I'll wait until you say so before applying, in case you'd like to amend. > --- A PatchSet is in reverse order, plus has information about which tags > --- are clean, meaning all patches applied prior to them are in the tag > --- itself, so we can stop reading at that point. Just to clarify, the > --- first patch in a PatchSet is the one most recently applied to the repo. > +-- | A PatchSet is in reverse order, plus has information about which > +-- tags are clean, meaning all patches applied prior to them are in > +-- the tag itself, so we can stop reading at that point. Just to > +-- clarify, the first patch in a PatchSet is the one most recently > +-- applied to the repo. > +-- > +-- 'PatchSet's have the property that if > +-- @ > +-- (info $ last $ head a) == (info $ last $ head b) > +-- @ > +-- then @(tail a)@ and @(tail b)@ are identical repositories > +-- > +-- Questions: > +-- > +-- Does this mean that in a patch set such as @[[a b t1 c d e t2][f g > +-- t3] [h i]]@, t1, t2 and t3 are tags, and t2 and t3 are clean? Yes, that's precisely what it means. > +-- Can we have PatchSet with length at least 3? > +-- Florent Yes. I'm not sure why you're thinking this could cause a problem. We should never, however, have a PatchSet of length zero. (Meaning that the smallest PatchSet should be (NilRL :<: NilRL) or [[]] in list terms. Also it might be worth noting that I hope relatively soon to redefine PatchSet to include the hash values of the inventories corresponding to the clean tags. If someone else did this, of course, it'd be even better... :) This will restore the feature that record, amend-record, rollback, etc take O(1) time rather than being O(N) where N is the length of the history of the repository. David _______________________________________________ darcs-users mailing list [email protected] http://lists.osuosl.org/mailman/listinfo/darcs-users
