Created on 2009-01-23.15:12:52 by Aaron, last changed 2010-03-23.23:41:04 by kowey.
| File name |
Uploaded |
Type |
Edit |
Remove |
|
issue1327-patch
|
Aaron,
2009-03-29.21:41:18
|
application/octet-stream |
|
|
| msg7163 (view) |
Author: Aaron |
Date: 2009-01-23.15:12:48 |
|
The setup:
mkdir repo1
cd repo1
darcs init
echo fileA version 1 > fileA
echo fileB version 1 > fileB
darcs add fileA fileB
darcs record --all -m "Add fileA and fileB"
echo fileA version 2 > fileA
sleep 2
darcs record --all -m "Modify fileA"
cd ..
darcs get repo1 repo2
cd repo2
darcs obliterate -p "Modify fileA" --all
darcs unrecord -p "Add fileA and fileB" --all
darcs record --all fileA -m "Add just fileA"
cd ../repo1
darcs pull --all ../repo2
Now the last command I couldn't figure out how to specify non-interactively, so
here's the transcript:
me> darcs obliterate -p "Add fileA and fileB"
Fri Jan 23 15:41:06 CET 2009 foo@bar
* Modify fileA
Shall I obliterate this patch? (1/2) [ynWsfvplxdaqjk], or ? for help: n
Fri Jan 23 15:40:04 CET 2009 foo@bar
* Add fileA and fileB
Shall I obliterate this patch? (2/2) [ynWvplxdaqjk], or ? for help: y
darcs: bug in darcs!
patches to commute_to_end does not commutex (1) at
src/Darcs/Patch/Depends.hs:452 compiled Jan 23 2009 11:19:30
me> darcs --exact-version
darcs compiled on Jan 23 2009, at 11:22:33
# configured Thu Jan 15 14:31:24 PST 2009
./configure /usr/local/share/config.site /usr/local/etc/config.site
Context:
[TAG 2.2.0
Petr Rockai <me@mornfall.net>**20090115150916]
Note that if I run the setup from a script rather than typing the commands by
hand in a terminal, and I omit the "sleep" after "echo fileA version 2 > fileA",
the subsequent record says "No changes!" even though there really are some. Is
this a known problem or should I open a separate bug for that?
|
| msg7164 (view) |
Author: Aaron |
Date: 2009-01-23.15:21:08 |
|
BTW I constructed this case because I was trying to see whether the new darcs2
semantics, where identical changes are no longer considered to conflict, makes
it possible to break up a previously-recorded patch into multiple patches
without discarding subsequent patches that depended on the original one. Is
this supposed to work or not?
|
| msg7165 (view) |
Author: Aaron |
Date: 2009-01-23.15:42:26 |
|
Ok, actually the sleep doesn't solve the problem. Sometimes when I run this
script it works, and sometimes it says "No changes!" I have no idea what's
going on.
|
| msg7171 (view) |
Author: kowey |
Date: 2009-01-24.08:56:22 |
|
The rest of this bug report sounds pretty serious, so I'll leave the
triage in Thorkil's hands
On Fri, Jan 23, 2009 at 15:12:53 -0000, Aaron Kaplan wrote:
> Note that if I run the setup from a script rather than typing the commands by
> hand in a terminal, and I omit the "sleep" after "echo fileA version 2 > fileA",
> the subsequent record says "No changes!" even though there really are some. Is
> this a known problem or should I open a separate bug for that?
Just a comment on this unrelated bit: you probably want --ignore-times
|
| msg7485 (view) |
Author: kowey |
Date: 2009-03-22.20:08:52 |
|
I'm going to bump this to urgent.
|
| msg7486 (view) |
Author: kowey |
Date: 2009-03-22.21:32:45 |
|
Hi Aaron,
It sounds like we have a very nice reproducible regression test on our hands
here. Might I ask what made this tricky to do non-interactively? Would
obliterate -p "Add fileA and fileB" have helped? How about your recent findings
working with Lyle, do they give any insight into how to turn this into a test case?
This seems self-contained enough that it could be a good way for any darcs
hacker to get acquainted with some of the deeper stuff... may be a good topic
for hacking sprint 2009-04
|
| msg7489 (view) |
Author: Aaron |
Date: 2009-03-22.22:23:32 |
|
Is there a typo or something missing in your suggestion? obliterate -p "Add
fileA and fileB" is exactly what I said in the script above. It interactively
asks me if I want to obliterate "Modify fileA", and I don't know how to do the
same thing non-interactively.
I tried making the last line
darcs obliterate --no-deps -p "Add fileA and fileB"
but this says "No patches selected!". I don't understand why.
Here's a new version of the script with the --ignore-times added, and with the
last line included. The last line is interactive--you just have to hit y once.
So this should be easily reproducible, just hard to automate.
----------------------------------
mkdir repo1
cd repo1
darcs init
echo fileA version 1 > fileA
echo fileB version 1 > fileB
darcs add fileA fileB
darcs record --author foo@bar --ignore-times --all -m "Add fileA and fileB"
echo fileA version 2 > fileA
darcs record --author foo@bar --ignore-times --all -m "Modify fileA"
cd ..
darcs get repo1 repo2
cd repo2
darcs obliterate -p "Modify fileA" --all
darcs unrecord -p "Add fileA and fileB" --all
darcs record --author foo@bar --ignore-times --all fileA -m "Add just fileA"
cd ../repo1
darcs pull --all ../repo2
darcs obliterate --dont-prompt-for-dependencies -p "Add fileA and fileB"
-------------------------------------
Lyle's situation was similar, but the error message was different. I'll try to
write up a minimal test case for it. Should I post it here or open a new bug?
|
| msg7490 (view) |
Author: kowey |
Date: 2009-03-22.22:33:12 |
|
On Sun, Mar 22, 2009 at 22:23:35 -0000, Aaron Kaplan wrote:
> Is there a typo or something missing in your suggestion? obliterate -p "Add
> fileA and fileB" is exactly what I said in the script above.
No, that would just be me tripping over myself again.
How about this trick?
echo n/y | tr / \\012 | darcs obliterate -p ...
> I tried making the last line
>
> darcs obliterate --no-deps -p "Add fileA and fileB"
>
> but this says "No patches selected!". I don't understand why.
That's because the --no-deps switch means "if you're going to have to
use some dependencies not mentioned in the matcher, then don't bother
with the patch in question"
> Here's a new version of the script with the --ignore-times added, and with the
> last line included. The last line is interactive--you just have to hit y once.
> So this should be easily reproducible, just hard to automate.
Thanks!
> Lyle's situation was similar, but the error message was different. I'll try to
> write up a minimal test case for it. Should I post it here or open a new bug?
If it's a different error message, I think a new bug would be sensible.
|
| msg7491 (view) |
Author: Aaron |
Date: 2009-03-22.22:38:35 |
|
OK got it, here's a version that works completely non-interactively.
mkdir repo1
cd repo1
darcs init
echo fileA version 1 > fileA
echo fileB version 1 > fileB
darcs add fileA fileB
darcs record --author foo@bar --ignore-times --all -m "Add fileA and fileB"
echo fileA version 2 > fileA
darcs record --author foo@bar --ignore-times --all -m "Modify fileA"
cd ..
darcs get repo1 repo2
cd repo2
darcs obliterate -p "Modify fileA" --all
darcs unrecord -p "Add fileA and fileB" --all
darcs record --author foo@bar --ignore-times --all fileA -m "Add just fileA"
cd ../repo1
darcs pull --all ../repo2
echo y | darcs obliterate --dont-prompt-for-dependencies -p "Add fileA and fileB"
|
| msg7493 (view) |
Author: Aaron |
Date: 2009-03-22.23:05:51 |
|
I've filed the other, related bug at Issue1401.
|
| msg7496 (view) |
Author: kowey |
Date: 2009-03-23.08:37:22 |
|
On Sun, Mar 22, 2009 at 22:38:38 -0000, Aaron Kaplan wrote:
> OK got it, here's a version that works completely non-interactively.
Thanks! Now just one more thing :-D
Could you add this to the darcs darcs repository under the bugs/
directory and submit a patch? I'm making this request in the hopes that
in the future you could do a similar thing for any other bugs you may
find.
|
| msg7561 (view) |
Author: Aaron |
Date: 2009-03-29.21:41:18 |
|
Here's a patch.
Attachments
|
| msg8147 (view) |
Author: kowey |
Date: 2009-08-15.08:51:06 |
|
OK we have a minimal regression test for this in the darcs repo, thanks to
Aaron. All we need now is somebody to study the code and figure out what went
wrong.
|
|
| Date |
User |
Action |
Args |
| 2009-01-23 15:12:52 | Aaron | create | |
| 2009-01-23 15:21:10 | Aaron | set | status: unread -> unknown nosy:
kowey, simon, Aaron, thorkilnaur, dmitry.kurochkin messages:
+ msg7164 |
| 2009-01-23 15:21:57 | Aaron | set | status: unknown -> unread nosy:
kowey, simon, Aaron, thorkilnaur, dmitry.kurochkin |
| 2009-01-23 15:42:28 | Aaron | set | status: unread -> unknown nosy:
kowey, simon, Aaron, thorkilnaur, dmitry.kurochkin messages:
+ msg7165 |
| 2009-01-23 15:42:45 | Aaron | set | status: unknown -> unread nosy:
kowey, simon, Aaron, thorkilnaur, dmitry.kurochkin |
| 2009-01-24 08:56:25 | kowey | set | status: unread -> unknown nosy:
kowey, simon, Aaron, thorkilnaur, dmitry.kurochkin messages:
+ msg7171 |
| 2009-03-22 20:08:55 | kowey | set | priority: bug -> urgent nosy:
kowey, simon, Aaron, thorkilnaur, dmitry.kurochkin messages:
+ msg7485 |
| 2009-03-22 21:32:48 | kowey | set | nosy:
kowey, simon, Aaron, thorkilnaur, dmitry.kurochkin messages:
+ msg7486 |
| 2009-03-22 22:23:35 | Aaron | set | nosy:
kowey, simon, Aaron, thorkilnaur, dmitry.kurochkin messages:
+ msg7489 |
| 2009-03-22 22:33:14 | kowey | set | nosy:
kowey, simon, Aaron, thorkilnaur, dmitry.kurochkin messages:
+ msg7490 |
| 2009-03-22 22:38:38 | Aaron | set | nosy:
kowey, simon, Aaron, thorkilnaur, dmitry.kurochkin messages:
+ msg7491 |
| 2009-03-22 23:05:54 | Aaron | set | nosy:
kowey, simon, Aaron, thorkilnaur, dmitry.kurochkin messages:
+ msg7493 |
| 2009-03-23 08:37:24 | kowey | set | nosy:
kowey, simon, Aaron, thorkilnaur, dmitry.kurochkin messages:
+ msg7496 |
| 2009-03-29 21:41:20 | Aaron | set | files:
+ issue1327-patch nosy:
kowey, simon, Aaron, thorkilnaur, dmitry.kurochkin messages:
+ msg7561 |
| 2009-08-15 08:51:10 | kowey | set | status: unknown -> needs-reproduction nosy:
kowey, simon, Aaron, thorkilnaur, dmitry.kurochkin topic:
+ Core messages:
+ msg8147 |
| 2009-08-25 17:39:42 | admin | set | nosy:
+ darcs-devel, - simon |
| 2009-08-27 14:24:16 | admin | set | nosy:
kowey, darcs-devel, Aaron, thorkilnaur, dmitry.kurochkin |
| 2010-03-23 23:41:04 | kowey | set | nosy:
- thorkilnaur |
|