darcs

Issue 1139 darcs diff appears to be broken

Title darcs diff appears to be broken
Priority bug Status resolved
Milestone Resolved in
Superseder Nosy List Serware, darcs-devel, dmitry.kurochkin, kowey, shicks, thorkilnaur
Assigned To
Topics Darcs2

Created on 2008-10-10.23:47:24 by shicks, last changed 2009-10-23.23:30:52 by admin.

Files
File name Uploaded Type Edit Remove
resolve-issue1139_-fix-diff-when-no-arguments-given_.dpatch dmitry.kurochkin, 2008-10-11.14:18:11 text/x-darcs-patch
Messages
msg6300 (view) Author: shicks Date: 2008-10-10.23:47:20
The diff command appears to be broken in 2.1.0.  I first noticed this when I
tried darcs diff -u --last=1 to get a unified diff of the last recorded patch
and it instead printed ALL the patches.  Here's a simpler example:
 mkdir a
 cd a
 darcs init
 touch a
 darcs add a
 darcs record -a -m "import"
 ls > a
 darcs whatsnew
 darcs diff
We see that the whatsnew clearly shows a change, while the diff is blank (at
least for me).
msg6310 (view) Author: dmitry.kurochkin Date: 2008-10-11.13:22:57
I can not reproduce this with darcs 2.1.0 (compiled from tarball from
darcs.net). But I see the bug in latest stable and unstable repos. I will send a
patch for it.

Also I do not see any issues with --last - it shows diff from "before last N
patches" to working dir. Can you provide more info on this?

Regards,
  Dmitry
msg6311 (view) Author: shicks Date: 2008-10-11.13:58:14
Here's an example of the --last bug:
 darcs init
 touch a b
 darcs add a b
 darcs rec -a -m "add files"
 ls > a
 darcs rec -a -m "change a"
 wc a > b
 darcs rec -a -m "change b"
 darcs diff --last=1
For me, this shows "change b" at the top of the display, but then the patch that
it generates is actually the change to a.
msg6312 (view) Author: dmitry.kurochkin Date: 2008-10-11.14:18:11
Thanks! Now I see the problem. And it is fixed by the patch I have sent (and
attached).

But I do not see these problems in 2.1.0 tarball. Only in latest versions from
darcs repos. Can you give your 'darcs --version'?

Regards,
  Dmitry
Attachments
msg6313 (view) Author: shicks Date: 2008-10-11.14:25:34
I can't give a completely accurate darcs --version since I actually monkeyed
around with it by hand because ThisVersion.lhs was wrong.  It originally said
"2.1.0pre3 (+ 104 patches)", while --exact-version showed "[TAG 2.1.0
Eric Kow <E.Y.Kow@brighton.ac.uk>**20081009120532]" with 18 patches above it.  I
just went to my repo and did "darcs optimize --reorder" and darcs put 72 patches
above "tagged 2.1.0".  I'm not really sure what all's going on here...
msg6314 (view) Author: droundy Date: 2008-10-11.17:43:49
The following patch updated the status of issue1139 to be resolved:

* resolve issue1139: make special cases handle no arguments gracefully. 
Ignore-this: 12b17a3940558860dd4caf7bb2619ec7
I accidentally broke this when refactoring Darcs.Match.  This change
restores some efficiency when no arguments are given and thus we are
creating copies of all the files in the repository.
History
Date User Action Args
2008-10-10 23:47:24shickscreate
2008-10-11 13:22:59dmitry.kurochkinsetstatus: unread -> unknown
nosy: kowey, dagit, simon, shicks, thorkilnaur, dmitry.kurochkin, Serware
messages: + msg6310
2008-10-11 13:58:16shickssetnosy: kowey, dagit, simon, shicks, thorkilnaur, dmitry.kurochkin, Serware
messages: + msg6311
2008-10-11 14:18:13dmitry.kurochkinsetfiles: + resolve-issue1139_-fix-diff-when-no-arguments-given_.dpatch
nosy: kowey, dagit, simon, shicks, thorkilnaur, dmitry.kurochkin, Serware
messages: + msg6312
2008-10-11 14:25:36shickssetnosy: kowey, dagit, simon, shicks, thorkilnaur, dmitry.kurochkin, Serware
messages: + msg6313
2008-10-11 17:43:52droundysetstatus: unknown -> resolved-in-unstable
nosy: + droundy
messages: + msg6314
2009-04-22 03:37:00twbsetstatus: resolved-in-unstable -> resolved
nosy: droundy, kowey, dagit, simon, shicks, thorkilnaur, dmitry.kurochkin, Serware
2009-08-06 18:01:15adminsetnosy: + markstos, jast, darcs-devel, zooko, mornfall, tommy, beschmi, - droundy, shicks
2009-08-06 21:13:23adminsetnosy: - beschmi
2009-08-10 21:49:48adminsetnosy: + shicks, - tommy, markstos, darcs-devel, zooko, jast, mornfall
2009-08-10 23:48:02adminsetnosy: - dagit
2009-08-25 17:30:54adminsetnosy: + darcs-devel, - simon
2009-08-27 14:19:36adminsetnosy: kowey, darcs-devel, shicks, thorkilnaur, dmitry.kurochkin, Serware
2009-10-23 22:45:14adminsetnosy: + serware, - Serware
2009-10-23 23:30:52adminsetnosy: + Serware, - serware