[darcs-users] behaviour of darcs annotate

Ganesh Sittampalam ganesh at earth.li
Wed Oct 22 05:11:50 UTC 2008


I've been trying to understand the behaviour of darcs annotate in 
preparation for (hopefully) optimising it at the sprint, and there are a 
couple of oddities in its behaviour that I'd like clarification on. I'll 
post separately in the next day or so about an optimisation strategy.

Firstly, as well as an entity (file/directory), annotate allows you to 
select a patch to use as the basis for annotation, and it tells you both 
about the history of the entity as of that patch, but also its future - 
i.e. what lines were later removed, etc. If no patch is selected then it 
behaves as if the last patch in the repo was selected, so no "future", 
just history.

If the entity was ever renamed, then the behaviour of annotate seems to 
depend on whether the rename was in the future or in the history relative 
to the selected patch. If it was in the history, then annotate continues 
to follow the file with its old name through the rest of the history. 
However, if it was in the future, then annotate seems to stop at that 
point and not report on any changes beyond the move patch. Is that 

Secondly, the selected patch is special, in that changes made by it are 
marked specially in the annotate output, and anything it deleted is also 
listed. This seems to make sense when the user explicitly selected a 
patch, but when the user didn't (and thus the last patch in the repo was 
implicitly selected) it feels a little odd - generally when I annotate in 
those circumstancs I don't care particularly about the last patch, I just 
want to know about how the entity reached its current state. Again, is 
this behaviour what we want?



More information about the darcs-users mailing list