Issue 2154 unknown" annotate entries

Title unknown" annotate entries
Priority Status unknown
Milestone 2.12.0 Resolved in
Superseder Nosy List fx
Assigned To

Created on 2012-03-11.12:12:14 by fx, last changed 2016-04-04.14:49:48 by gh.

msg15261 (view) Author: fx Date: 2012-03-11.12:12:13
Annotate on a directory frequently prints "unknown" tags.  Here's are
extracts from "darcs annotate ." with version (beta 3) in the
darcs repo.  A recent 2.9.1 behaves similarly.


                  unknown | .authorspellings 
                          | .boring 
                          | .latex2html-init 
                          | COPYING 
                          | COPYING.LIB 
droundy@abridgegame.   #1 | GNUmakefile  -- created as: ./Makefile
                  unknown | HACKING 
droundy@abridgegame.   #2 | NEWS  -- created as: ./ChangeLog


19700101000000-0000-0000000000000000000000000000000000000000.gz | .authorspellings
19700101000000-0000-0000000000000000000000000000000000000000.gz | .boring
19700101000000-0000-0000000000000000000000000000000000000000.gz | .latex2html-init
19700101000000-0000-0000000000000000000000000000000000000000.gz | COPYING
19700101000000-0000-0000000000000000000000000000000000000000.gz | COPYING.LIB
20021020200105-e9342-29561b8cad0e1c33e44e7c135cb7753667a67856.gz | GNUmakefile  -- created as: ./Makefile
msg15361 (view) Author: gh Date: 2012-03-19.21:13:37
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.
00:20 owst      Now *that* would be strange. I'm sure that part's a
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
msg15364 (view) Author: owst Date: 2012-03-19.21:27:08
See also my update of: http://bugs.darcs.net/issue2160 which I think is
the root cause of this problem.
Date User Action Args
2012-03-11 12:12:14fxcreate
2012-03-19 21:13:38ghsetmessages: + msg15361
2012-03-19 21:27:09owstsetmessages: + msg15364
2016-04-04 14:49:48ghsetmilestone: 2.12.0