Created on 2009-03-25.17:32:33 by aavogt, last changed 2017-07-19.00:38:58 by gh.
File name |
Uploaded |
Type |
Edit |
Remove |
checkbug.sh
|
aavogt,
2009-03-28.16:15:46
|
application/x-sh |
|
|
xmc.tar.bz2
|
aavogt,
2009-03-27.05:35:38
|
application/octet-stream |
|
|
msg7510 (view) |
Author: aavogt |
Date: 2009-03-25.17:32:30 |
|
Darcs should keep the old patch.
|
msg7513 (view) |
Author: thorkilnaur |
Date: 2009-03-26.10:42:08 |
|
Thanks a lot for this report. This sounds a bit disturbing, are you actually
experiencing data loss or is it "merely" the patch to be amended that gets
unrecorded? Or something else, perhaps? Searching the bug tracker briefly, http://bugs.darcs.net/issue332 seems to be about a similar situation with darcs
record.
Could you supply some additional details, please? An actual transcript of a
session that demonstrates the problem would be a good start. A transcript that
demonstrates the problem starting from a fresh repository would be even better.
And best of all would be a test case that demonstrates the problem.
Thanks and best regards
Thorkil
|
msg7514 (view) |
Author: aavogt |
Date: 2009-03-26.13:23:32 |
|
No data is lost: its just that all the changes have to be selected again.
Ex. with xmonad repo, make a change that passes the test.
darcs record (selecting those changes)
Then make some changes that would cause the test to fail (ex some subtle
documentation changes that cause the haddock test to fail)
darcs amend-record (selecting those most recent changes)
After the test fails, all the changes that were made are still in the repo, but
the first patch made in this process is nowhere to be found and has to be
recorded again.
I hope that that's clearer.
Regards,
Adam
|
msg7515 (view) |
Author: aavogt |
Date: 2009-03-27.05:35:37 |
|
I can't seem to reduce this to a case on a fresh repository, but attached is a
repo that will unrecord the most recent patch if you try to amend-record it (the
change causes haddock to fail).
Attachments
|
msg7532 (view) |
Author: kowey |
Date: 2009-03-28.14:35:40 |
|
Hi Adam,
As a means of reproducing this, have you tried setting the test to "exit 1"?
This sounds like it's just a superficial bug on the level of the amend-record
command (Darcs.Commands.AmendRecord). I'll bet it's easy to fix. And I think I
do agree with the point of view that a failing amend-record --test should
basically be a no-op.
I'm assuming that this is reproducible, and marking this need-volunteer for
somebody to write up a small test case showing the behaviour we would want.
Thanks!
|
msg7536 (view) |
Author: aavogt |
Date: 2009-03-28.15:18:54 |
|
I'm not so sure that it is that easy because darcs does the right thing to a
fresh repo. In the attached repo, all you have to do is:
> darcs amend-record
and add only change (removing a line), and that patch is unrecorded when the
test fails (either the actual test, or exit 1). There's something different in
the attached repo that I can't isolate.
|
msg7537 (view) |
Author: kowey |
Date: 2009-03-28.15:31:10 |
|
On Sat, Mar 28, 2009 at 15:19:00 -0000, Adam Vogt wrote:
> I'm not so sure that it is that easy because darcs does the right thing to a
> fresh repo. In the attached repo, all you have to do is:
> > darcs amend-record
> and add only change (removing a line), and that patch is unrecorded when the
> test fails (either the actual test, or exit 1). There's something different in
> the attached repo that I can't isolate.
I can confirm that this is reproducible. I deleted an import from
XMonad/Layout/Mosaic.hs with
sed -e '35,36d' XMonad/Layout/Mosaic.hs > XMonad/Layout/Mosaic.hs.tmp
mv XMonad/Layout/Mosaic.hs.tmp XMonad/Layout/Mosaic.hs
and sure enough, the patch unrecorded itself as soon the as the test failed.
I also have a nugget of potentially useful information for anybody wanting
to fix this - this does not appear to affect hashed repositories (hence
Adam not being able to reproduce this). When I darcs get --hashed and do
the same thing, it does the right thing. If I darcs get --old-fashioned
a copy, the wrong thing happens.
Adam, with this in mind, any chance you'd be willing to give the minimal
test case another go?
Thanks!
Here are the contents of darcs show repo:
Type: darcs
Format: darcs-1.0
Root: /tmp/XMonadContrib
Pristine: PlainPristine "_darcs/pristine"
Cache: thisrepo:/tmp/XMonadContrib, cache:/home/eykk10/.darcs/cache
test Pref: runhaskell Setup.lhs configure --disable-optimization --user -f testing && runhaskell Setup.lhs build && runhaskell Setup.lhs haddock
Author: Adam Vogt <vogt.adam@gmail.com>
Default Remote: http://code.haskell.org/XMonadContrib
Num Patches: 1813
|
msg7544 (view) |
Author: aavogt |
Date: 2009-03-28.16:15:46 |
|
Thanks kowey, this is definitely just an issue with the old repository format as
you suggested. I have attached a crude script that checks whether an
amend-record that fails a test can cause previously recorded changes to be
unrecorded.
Attachments
|
msg7546 (view) |
Author: kowey |
Date: 2009-03-28.18:54:34 |
|
Excellent! If you could just tidy that test up a bit, add it to the bugs/
directory as something like bugs/issue1406-amend-record-test.sh and darcs send
it our way, it would be great.
See http://wiki.darcs.net/index.html/RegressionTests for more details.
I think the resulting script will be much simpler, because the darcs test
harness will by default run each test thrice (passing it one of --old-fashioned,
--hashed and --darcs-2 on each run).
(Or if you're already sick of us always asking for just a tiny bit more, feel
free to say "argh, stop!")
|
msg8798 (view) |
Author: kowey |
Date: 2009-09-12.19:49:40 |
|
Just adding Kamil to the bug-tracker on this as he has started work on
this.
Turned out I was way off about this being ProbablyEasy.
|
msg8804 (view) |
Author: kowey |
Date: 2009-09-13.21:51:00 |
|
Kamil has attempted a fix for this, but it turned out to be hairier than expected.
- http://wiki.darcs.net/Review/issue1406
- http://lists.osuosl.org/pipermail/darcs-users/2009-September/021175.html
We've decided that the proposed fix would be too risky. So we're setting this
aside since it's really a relatively obscure case (relatively) and
only affects old-fashioned repositories anyway. If anybody wants to take a
look, then we will welcome patches.
Meanwhile, many thanks, Kamil! We got some nice tests out of it, it looks.
|
|
Date |
User |
Action |
Args |
2009-03-25 17:32:33 | aavogt | create | |
2009-03-25 17:36:04 | aavogt | set | nosy:
kowey, simon, thorkilnaur, dmitry.kurochkin, aavogt title: looses original patch when the test after amend-record -> looses original patch when the test after amend-record fails |
2009-03-26 10:42:11 | thorkilnaur | set | status: unread -> unknown nosy:
kowey, simon, thorkilnaur, dmitry.kurochkin, aavogt messages:
+ msg7513 |
2009-03-26 13:23:35 | aavogt | set | nosy:
kowey, simon, thorkilnaur, dmitry.kurochkin, aavogt messages:
+ msg7514 |
2009-03-27 05:35:42 | aavogt | set | files:
+ xmc.tar.bz2 nosy:
kowey, simon, thorkilnaur, dmitry.kurochkin, aavogt messages:
+ msg7515 |
2009-03-28 14:35:49 | kowey | set | status: unknown -> needs-reproduction nosy:
+ jaredj topic:
+ ProbablyEasy, UI messages:
+ msg7532 title: looses original patch when the test after amend-record fails -> unrecords original patch when the test after amend-record fails |
2009-03-28 15:19:00 | aavogt | set | nosy:
kowey, simon, thorkilnaur, jaredj, dmitry.kurochkin, aavogt messages:
+ msg7536 |
2009-03-28 15:31:14 | kowey | set | nosy:
kowey, simon, thorkilnaur, jaredj, dmitry.kurochkin, aavogt messages:
+ msg7537 |
2009-03-28 16:15:52 | aavogt | set | files:
+ checkbug.sh nosy:
kowey, simon, thorkilnaur, jaredj, dmitry.kurochkin, aavogt messages:
+ msg7544 |
2009-03-28 18:54:41 | kowey | set | nosy:
kowey, simon, thorkilnaur, jaredj, dmitry.kurochkin, aavogt messages:
+ msg7546 |
2009-08-10 17:38:52 | kowey | set | status: needs-reproduction -> needs-implementation nosy:
kowey, simon, thorkilnaur, jaredj, dmitry.kurochkin, aavogt |
2009-08-10 17:39:12 | kowey | set | status: needs-implementation -> needs-reproduction nosy:
kowey, simon, thorkilnaur, jaredj, dmitry.kurochkin, aavogt |
2009-08-25 17:42:36 | admin | set | nosy:
+ darcs-devel, - simon |
2009-08-27 14:21:59 | admin | set | nosy:
kowey, darcs-devel, thorkilnaur, jaredj, dmitry.kurochkin, aavogt |
2009-09-12 19:49:35 | kowey | set | topic:
- ProbablyEasy nosy:
kowey, darcs-devel, thorkilnaur, jaredj, dmitry.kurochkin, aavogt |
2009-09-12 19:49:42 | kowey | set | status: needs-reproduction -> has-patch nosy:
+ kamil messages:
+ msg8798 |
2009-09-12 19:51:22 | kowey | set | nosy:
kowey, darcs-devel, thorkilnaur, jaredj, dmitry.kurochkin, aavogt, kamil assignedto: kamil |
2009-09-13 21:51:03 | kowey | set | nosy:
+ dagit messages:
+ msg8804 assignedto: kamil -> |
2009-09-29 06:46:06 | dagit | set | nosy:
- dagit |
2009-10-23 23:59:13 | admin | set | nosy:
+ Kamil, - kamil |
2017-07-19 00:38:58 | gh | set | status: has-patch -> wont-fix |
|