On Fri, Aug 10, 2007 at 03:37:29PM +0200, Tommy Pettersson wrote: > On Fri, Aug 10, 2007 at 10:47:38AM +0200, Alexander Staubo wrote: > > On 8/9/07, Matthew Palmer <[EMAIL PROTECTED]> wrote: > > > On Thu, Aug 09, 2007 at 12:40:42PM +0200, Alexander Staubo wrote: > > > > I'm surprised that Darcs does not fall back to the checkpoint to get > > > > the patches it needs, though. > > > > > > You mean retrieve the extra patches from the parent repo? --lazy does > > > that, > > > I think (not available in 1.0.9, only in the 1.1.0 pre-releases). > > > > No, I meant look in the patch file in _darcs/checkpoints/..., which > > looks to me like it contains the entire repo as a single patch. It > > would be slow to process, but it's better than just failing with the > > wrong error message, and annotate is horrendously slow already, as > > previously demonstrated. :) > > Annotate on a file shows for each line of the file which patch > the line comes from. This information is collected by examining > the contents of all patches touching the file. The checkpoint > patch is just a snapshot, so unfortunately it does not provide > information about which patches originally added the lines. The > best darcs could do (besides fetching the missing patches) is to > say all "old" lines comes from the checkpoint patch. But I don't > think darcs' traditional partial repo format knows _which_ > checkpoint is its "base". Actually I don't even think it can > tell it _is_ a partial repo with any certainty. So implementing > this feature could turn out to be tricky. And now the new lazy > hashed repo format is on its way.
Right, this would be tricky simply because we don't actually *record* that we are a partial repo, we only know because reading a patch file fails. > I don't want to say this would be a bad feature as is, but > perhaps a more general form could be interesting. What if > Annotate took the --from-patch and --from-tag flags? It could > hopefully make Annotate faster when only the latest changes are > of interest. All lines from before the break could be > un-annotated or marked with the tag in --from-tag. Another possibility would be an annotate --partial option, which would potentially speed up annotate even on full repos, but might be easier to code than the full --from-tag and --from-patch tags. > I'm not sure how big a change this would be, because I think the > code used by Annotate works by producing a _complete_ history of > all changes to a file, and then showing the "surface", but maybe > the evaluation is lazy in a way that only the needed patches are > examined. I fear just cutting out the selected patches and feed > that to the Annotate code, instead of all patches, would result > in all "old" lines being missing. I think it wouldn't be too hard to do. If nothing else, we could probably just make the checkpoint patch itself be a "pseudopatch" (probably giving it an artificial name to clarify that it *isn't* a real patch) in the input to annotate's internals and reuse the existing code. -- David Roundy Department of Physics Oregon State University _______________________________________________ darcs-users mailing list [email protected] http://lists.osuosl.org/mailman/listinfo/darcs-users
