[darcs-devel] [issue2154] unknown" annotate entries

Guillaume Hoffmann bugs at darcs.net
Mon Mar 19 21:13:38 UTC 2012


Guillaume Hoffmann <guillaumh at gmail.com> added the comment:

IRC conversation ( http://irclog.perlgeek.de/darcs/2012-03-13#i_5283168 ):


00:06 owst      So, if you `darcs annotate src/Darcs/Email.hs` and grep
for "unknown" you'll see that there's an un-anotated line.
00:06 gh_       yes, that's what I read from the IRC log
00:06 gh_       now I wonder how come
00:06 owst      Without that change I made, annotate would go all the
way back through the inventory, even after the file was originally added
00:07 owst      mornfall's suggestion of something funky to do with
line-endings sounded plausable, but I didn't look into it
00:08 gh_       ah, something weird happening in the string comparison
function, making that the (intuitive) property "all lines should be
annotated" fails
00:08 gh_       ?
00:08 owst      Yeah, perhaps. I didn't really look further than to find
the "stop condition" code, so *shrug* :)
00:09 gh_       hmm
00:09 gh_       I want to put a haddock comment to the function
Darcs.Annotate.complete explaining that, then
00:10 owst      Yeah. I suppose it might not be that hard to go back
through the history of that file, and find the change that added the
line, and see what's going on
00:11 gh_       with darcs changes -i --matches 'hunk hhhhh'
00:12 owst      Usefully, the line is blank ;-)
00:12 gh_       and as there are blank lines all over the place, this
case should happen often then
00:13 owst      Well, if it were that simple, I suppose so, yes.
00:13 owst      I wonder if there was a rogue '\r\n' inside an otherwise
'\n' file or something
00:16 gh_       src/Email.hs also has a blank line unknown
00:17 owst      Ooh, interesting
00:19 gh_       src/Exec.hs also
00:19 owst      Always blank lines?
00:19 gh_       yes
00:19 gh_       and always modules that start with the 'E' letter.
coincidence?
00:20 owst      Now *that* would be strange. I'm sure that part's a
coincidence
00:20 gh_       src/URL.hs also
00:20 gh_       blank line
00:21 gh_       curiously, there's been always at most one per file
00:22 gh_       one in src/SHA1.hs
00:23 owst      Well, out of those, Email.hs has the least number of
patches (45) so probably best to start there ;-)
00:25 gh_       sha1 has 18
00:26 owst      `darcs cha src/SHA1.hs --count` says 47 for me
00:28 gh_       ah, I counted the patches that appear in the annotation,
which are fewer
00:31 gh_       src/hscurl.h has an unknown line and 22 patches
00:35 gh_       and it's quite small

__________________________________
Darcs bug tracker <bugs at darcs.net>
<http://bugs.darcs.net/issue2154>
__________________________________


More information about the darcs-devel mailing list