darcs

Issue 1794 unexpected behavior: darcs changes FILE and duplicate patches

Title unexpected behavior: darcs changes FILE and duplicate patches
Priority bug Status given-up
Milestone Resolved in
Superseder Nosy List beschmi, darcs-devel, dmitry.kurochkin, kowey, tux_rocker
Assigned To beschmi
Topics Conflicts

Created on 2010-03-24.20:53:42 by beschmi, last changed 2017-07-30.23:51:38 by gh.

Messages
msg10498 (view) Author: beschmi Date: 2010-03-24.20:53:40
This seems like a bu to me:
darcs changes -v A
Changes to A:

Wed Mar 24 21:24:40 CET 2010  <a@b.c>
  * add A (2)
    duplicate
    |move ./C ./A
    |rmfile ./A
    |:
    addfile ./A

Wed Mar 24 21:44:22 CET 2010  <a@b.c>
  * MV a C
    move ./A ./C

Wed Mar 24 21:23:51 CET 2010  <a@b.c>
  * add A (1)
    addfile ./A
$ darcs annotate A

darcs failed:  There is no file or directory named 'A'
msg10503 (view) Author: tux_rocker Date: 2010-03-25.08:23:30
Op woensdag 24 maart 2010 21:53 schreef Benedikt Schmidt:
> New submission from Benedikt Schmidt <beschmi+darcs@gmail.com>:
> 
> This seems like a bu to me:

Darcs appears to be confusing two files named "A" here. Is this on a darcs 
without your filecache code? If so, do you have a command sequence to 
reproduce it? I can't figure out such a sequence here.

Bye,
Reinier
msg10507 (view) Author: beschmi Date: 2010-03-25.11:03:11
Yes it's the standard unstable version. I wanted to find out how
duplicate patches are handled by changes FILE. In this case, there
is no file called A in the repo (it was renamed to C). But the
duplicate patch at the end still refers to A. It seems like the changes
code does not take the context of the duplicate patch into account.

Here is the sequence of commands to create the repo:
/------
mkdir 1; mkdir 2
for R in 1 2; do (cd $R; darcs init; touch A; darcs add A; darcs rec -a
-m "add A $R"); done
cd 1
darcs pull -a ../2
darcs changes -v A
\--------

It's not that critical and the other case which I consider more
important works:
darcs changes -v C
Changes to C:

Thu Mar 25 11:55:45 CET 2010  Benedikt Schmidt <beschmi@gmail.com>
  * add A 2
    duplicate
    |move ./C ./A
    |rmfile ./A
    |:
    addfile ./A

Thu Mar 25 11:56:06 CET 2010  Benedikt Schmidt <beschmi@gmail.com>
  * move in 1
    move ./A ./C

Thu Mar 25 11:55:45 CET 2010  Benedikt Schmidt <beschmi@gmail.com>
  * add A 1
    addfile ./A

Even though the duplicate patch refers to A, it is also shown as a patch
that touches C. This is correct if you take the context into account.

Best,
  Benedikt
msg10531 (view) Author: kowey Date: 2010-03-26.14:20:30
Could I have you submit that as a test case, Benedikt?  Thanks!
History
Date User Action Args
2010-03-24 20:53:42beschmicreate
2010-03-25 08:23:33tux_rockersetnosy: + tux_rocker
messages: + msg10503
2010-03-25 11:03:19beschmisetmessages: + msg10507
2010-03-26 14:20:31koweysetstatus: unknown -> needs-reproduction
nosy: + kowey
topic: + Conflicts
messages: + msg10531
assignedto: beschmi
2017-07-30 23:51:38ghsetstatus: needs-reproduction -> given-up