darcs

Issue 1956 Conflict marking bug? darcs failed: Error applying hunk to file ./file

Title Conflict marking bug? darcs failed: Error applying hunk to file ./file
Priority bug Status resolved
Milestone Resolved in
Superseder Nosy List dmitry.kurochkin
Assigned To
Topics

Created on 2010-09-13.20:35:36 by igloo, last changed 2020-08-01.23:44:43 by bfrk.

Files
File name Uploaded Type Edit Remove
darcs_bug.sh igloo, 2010-09-13.20:35:35 text/x-sh
darcs_bug.sh igloo, 2010-09-13.20:36:28 text/x-sh
darcs_bug_with_touch.sh igloo, 2010-09-14.12:12:19 text/x-sh
failing-issue1956-conflict-marking.sh kowey, 2010-09-14.09:27:52 application/x-sh
Messages
msg12536 (view) Author: igloo Date: 2010-09-13.20:35:35
With "2.4.3 (release)" the attached script gives me:

$ sh -x darcs_bug.sh
+ set -e
+ DARCS=darcs2
+ rm -rf a
+ rm -rf b
+ mkdir a
+ cd a
+ darcs2 init --darcs-2
+ echo A
+ darcs2 add file
+ darcs2 rec -a -m A
Finished recording patch 'A'
+ cd ..
+ darcs2 get a b
Copying patches, to get lazy repository hit ctrl-C...
Finished getting.
+ cd a
+ echo BB
+ darcs2 rec -a -m B
Finished recording patch 'B'
+ cd ..
+ cd b
+ echo R
+ darcs2 rec -a -m R
Finished recording patch 'R'
+ echo S
+ darcs2 rec -a -m S
No changes!
+ darcs2 pull ../a -ap B
Pulling from "/tmp/ian/g/a"...
Backing up ./file(-darcs-backup0)
We have conflicts in the following files:
./file

darcs failed:  Error applying hunk to file ./file
Error applying patch to the working directory.

This may have left your working directory an inconsistent
but recoverable state. If you had no un-recorded changes
by using 'darcs revert' you should be able to make your
working directory consistent again.
Attachments
msg12537 (view) Author: igloo Date: 2010-09-13.20:36:28
Sorry, uploaded wrong script. Shouldn't have the "exit 0", as in the new
attachment.
Attachments
msg12538 (view) Author: igloo Date: 2010-09-13.20:46:49
Oh, note that darcs didn't notice the S change (presumably due to the
timestamp not having changes), which seems to be important.
msg12539 (view) Author: kowey Date: 2010-09-14.09:27:52
On Mon, Sep 13, 2010 at 20:46:50 +0000, Ian Lynagh wrote:
> Oh, note that darcs didn't notice the S change (presumably due to the
> timestamp not having changes), which seems to be important.

Thanks, Ian. The bad news is that following cleaned up test using our
test suite infrastructure passes. To make this fail, I imagine we need
to knock out one or part of the darcs records to simulate the not
noticing the X change effect.

Ian: could you help us figure out how to make this test fail?  The
"simple" way in darcs HEAD is to put this test in tests/ and run

  dist/build/darcs-test/darcs-test --failing -t 1956

Otherwise, you could replace darcs with your $DARCS and stick some
ignore-times in.  For consistency, the test harness infrastructure
creates a test-local ~/.darcs/defaults with ignore-times in it,
which is why test suite output can be different from running tests
by hand.

-- 
Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow>
For a faster response, try +44 (0)1273 64 2905 or
xmpp:kowey@jabber.fr (Jabber or Google Talk only)
Attachments
msg12540 (view) Author: igloo Date: 2010-09-14.12:12:19
OK, try this script.
Attachments
msg12579 (view) Author: kowey Date: 2010-09-17.08:54:34
Thanks to Ian for help reproducing.  I can now run this as a standalone 
script.

Turning this into a harness-friendly regression test is stalled on 
issue1957
msg22372 (view) Author: bfrk Date: 2020-08-01.23:44:41
Seems like this has been resolved. Patch2085 contains the test script 
igoo sent in msg12540 and it succeeds.
History
Date User Action Args
2010-09-13 20:35:36igloocreate
2010-09-13 20:36:29igloosetfiles: + darcs_bug.sh
messages: + msg12537
2010-09-13 20:46:50igloosetmessages: + msg12538
2010-09-14 09:27:53koweysetfiles: + failing-issue1956-conflict-marking.sh
messages: + msg12539
title: Conflict marking bug? darcs failed: Error applying hunk to file ./file -> Conflict marking bug? darcs failed: Error applying hunk to file ./file
2010-09-14 12:12:19igloosetfiles: + darcs_bug_with_touch.sh
messages: + msg12540
2010-09-17 08:54:35koweysetpriority: bug
status: unknown -> waiting-for
messages: + msg12579
2020-08-01 23:44:43bfrksetstatus: waiting-for -> resolved
messages: + msg22372