darcs

Issue 1199 Backup files darcs added after external merge

Title Backup files darcs added after external merge
Priority bug Status resolved
Milestone Resolved in
Superseder Nosy List ckeen, darcs-devel, dmitry.kurochkin, kowey, thorkilnaur, twb
Assigned To
Topics

Created on 2008-11-04.11:57:14 by twb, last changed 2009-08-27.14:19:39 by admin.

Messages
msg6584 (view) Author: twb Date: 2008-11-04.11:57:12
I did "darcs pull --external-merge 'twb-meld-darcs %o %a %1 %2'",
where twb-meld-darcs is this script:

    #!/bin/bash -ex
    test 4 -eq $#
    output="$1"
    ancestor="$2"
    left="$3"
    right="$4"
    meld "$left" "$ancestor" "$right"
    cp -bf "$ancestor" "$output"

After darcs pull finished, I find that boring backup files (presumably
created by cp --backup) have been copied into my working tree and
"darcs added".

    $ darcs w -s
    M ./GNUmakefile -97 +11
    A ./GNUmakefile.~1~
    M ./Setup.hs -4 +4
    A ./Setup.hs.~1~

While I could just change "cp -bf" to "cp", I think this behaviour is
unexpected, confusing and possibly suboptimal.  Presumably darcs is
copying *all* files from the output directory into the working tree,
and then explicitly adding them (thereby overriding boring).
msg6689 (view) Author: ckeen Date: 2008-11-18.20:22:40
As I understand is the function that does the actual merge located in Darcs.Resolve called
external_resolution :: RepoPatch p => Slurpy -> String -> FL Prim C(x y) -> FL Prim C(x z)
                    -> p C(y a)
                    -> IO (Sealed (FL Prim C(a)))

So this will return a FL list of primary patches.
So I think the issue is not that the files get copied,
but they are seen as primitive patches that are additions...

Maybe we can add the check when we slurp in the output?
msg6690 (view) Author: ckeen Date: 2008-11-18.20:32:14
Hm, question is why should we use LookForAdds in the call to unsafeDiff ?
msg6715 (view) Author: twb Date: 2008-11-22.11:04:42
On Thu, Nov 20, 2008 at 10:31:23AM +0100, Christian Kellermann wrote:
> Thu Nov 20 10:20:35 CET 2008  Christian Kellermann <Christian.Kellermann@nefkom.net>
>   * DRAFT resolve issue1199: Backup files darcs added after external merge

This resolves 1199 for me.
msg6753 (view) Author: ckeen Date: 2008-11-26.10:36:09
The following patch updated the status of issue1199 to be resolved:

* resolve issue1199: Backup files darcs added after external merge 
Ignore-this: bc5c1365bdf4ca70073a85712f00e21c
History
Date User Action Args
2008-11-04 11:57:14twbcreate
2008-11-18 20:22:43ckeensetpriority: bug
nosy: + ckeen
status: unread -> unknown
messages: + msg6689
2008-11-18 20:32:16ckeensetnosy: kowey, dagit, simon, twb, thorkilnaur, dmitry.kurochkin, ckeen
messages: + msg6690
2008-11-22 11:04:46twbsetnosy: kowey, dagit, simon, twb, thorkilnaur, dmitry.kurochkin, ckeen
messages: + msg6715
2008-11-26 10:36:12ckeensetstatus: unknown -> resolved-in-unstable
nosy: kowey, dagit, simon, twb, thorkilnaur, dmitry.kurochkin, ckeen
messages: + msg6753
2009-04-22 03:37:28twbsetstatus: resolved-in-unstable -> resolved
nosy: kowey, dagit, simon, twb, thorkilnaur, dmitry.kurochkin, ckeen
2009-08-10 23:50:28adminsetnosy: - dagit
2009-08-25 17:33:33adminsetnosy: + darcs-devel, - simon
2009-08-27 14:19:39adminsetnosy: kowey, darcs-devel, twb, thorkilnaur, dmitry.kurochkin, ckeen