[darcs-users] bug in darcs whatsnew

Tommy Pettersson ptp at lysator.liu.se
Tue Aug 17 22:16:47 UTC 2004


darcs 1.0.0rc1

Strange things happens:

  $ darcs init
  Successfully initialized repository!
  $ echo "one\n" > a
  $ darcs add a ; darcs rec -a -m one
  Finished recording patch 'one'
  $ echo "two\n\nthree\n" >> a
  $ darcs diff -u
  diff -rN -u -u foo-old/a foo-new/a
  --- foo-old/a   Tue Aug 17 23:41:39 2004
  +++ foo-new/a   Tue Aug 17 23:41:57 2004
  @@ -1,2 +1,6 @@
   one
   
  +two
  +
  +three
  +
  $ darcs what
  {
  hunk ./a 3
  +two
  hunk ./a 5
  +three
  +
  +
  }


In whatsnew output, notice the misplaced (last) blank line
and the line numbers.

record, rollback, unrecord, revert seem to work, but annotate
shows same crazy stuff as whatsnew.  Still, there should be
only one hunk, not two (right?).

First aber: I have seen this bug once before, but those repos
had severe merge conflicts (which I thought they should not
have) so I had to rebuild them in a different way.  I (first
time) discovered the bug by incidence (only happened once,
I lost it and could never reproduce it) when I was trying
to get around the rapidly degenerating merge conflicts.
Hopefully it was just a coincidence.

Second aber: This time I discovered the bug when I was
about to record an entry in the documentation about the
DARCS_USE_ISPRINT feature, and now I feel very unsure if I
shall record it.  Even if I send the text as a diff-patch,
the change itself will trigger the bug in darcs when it is
applied and recorded.


-- 
Tommy Pettersson <ptp at lysator.liu.se>




More information about the darcs-users mailing list