darcs

Issue 1847 conflict silently appears (1.0.9 to 2.4.3+)

Title conflict silently appears (1.0.9 to 2.4.3+)
Priority urgent Status given-up
Milestone Resolved in
Superseder Nosy List dmitry.kurochkin, kowey
Assigned To
Topics Conflicts

Created on 2010-05-19.21:15:54 by igloo, last changed 2017-07-30.23:57:52 by gh.

Files
File name Uploaded Type Edit Remove
db.tar.gz igloo, 2010-05-19.21:15:52 application/gzip
Messages
msg11090 (view) Author: igloo Date: 2010-05-19.21:15:52
Here the pulled patch turns into a conflict, but darcs doesn't tell us,
and "darcs mark" doesn't know about it.

$ darcs --version
2.4.3 (release)
$ cd head
$ darcs check
The repository is consistent!                                          
        
$ darcs what
No changes!
$ darcs mark
No conflicts to mark.
$ cd ../stable
$ darcs check
The repository is consistent!                                          
        
$ darcs what
No changes!
$ darcs mark
No conflicts to mark.
$ darcs pull -p "Fix register --global" ../head
Sat May 15 22:32:04 BST 2010  Duncan Coutts <duncan@haskell.org>
  * Fix register --global/--user
  It is a rather silly feature and is not guaranteed to work. Having
  configured and built using one set of dbs, there's no guarantee you
  can register into another set. We should probably just remove it.
Shall I pull this patch? (1/1)  [ynWsfvplxdaqjk], or ? for help: v
[Fix register --global/--user
Duncan Coutts <duncan@haskell.org>**20100515213204
 Ignore-this: 86a5e9dc03e47a8dc11595d6eadb5937
 It is a rather silly feature and is not guaranteed to work. Having
 configured and built using one set of dbs, there's no guarantee you
 can register into another set. We should probably just remove it.
] {
hunk ./Distribution/Simple/Register.hs 113
-import Data.List (partition)
+import Data.List
+         ( partition, nub )
hunk ./Distribution/Simple/Register.hs 145
-    packageDbs = withPackageDB lbi
-              ++ maybeToList (flagToMaybe  (regPackageDB regFlags))
+    -- FIXME: there's really no guarantee this will work.
+    -- registering into a totally different db stack can
+    -- fail if dependencies cannot be satisfied.
+    packageDbs = nub $ withPackageDB lbi
+                    ++ maybeToList (flagToMaybe  (regPackageDB regFlags))
}
Shall I pull this patch? (1/1)  [ynWsfvplxdaqjk], or ? for help: y
Finished pulling and applying.                                         
        
$ darcs check
The repository is consistent!                                          
        
$ darcs what
No changes!
$ darcs mark
No conflicts to mark.
$ darcs changes -v --last 1
Sat May 15 22:32:04 BST 2010  Duncan Coutts <duncan@haskell.org>
  * Fix register --global/--user
  It is a rather silly feature and is not guaranteed to work. Having
  configured and built using one set of dbs, there's no guarantee you
  can register into another set. We should probably just remove it.
    {
    hunk ./Distribution/Simple/Register.hs 118
    -import Data.List (partition)
    +import Data.List
    +         ( partition, nub )
    merger 0.0 (
    hunk ./Distribution/Simple/Register.hs 150
    -    packageDb = fromFlagOrDefault (registrationPackageDB
(withPackageDB lbi))
    -                                  (regPackageDB regFlags)
    +    packageDbs = withPackageDB lbi
    +              ++ maybeToList (flagToMaybe  (regPackageDB regFlags))
    merger 0.0 (
    hunk ./Distribution/Simple/Register.hs 150
    -    packageDbs = withPackageDB lbi
    -              ++ maybeToList (flagToMaybe  (regPackageDB regFlags))
    +    packageDb = fromFlagOrDefault (registrationPackageDB
(withPackageDB lbi))
    +                                  (regPackageDB regFlags)
    hunk ./Distribution/Simple/Register.hs 150
    -    packageDbs = withPackageDB lbi
    -              ++ maybeToList (flagToMaybe  (regPackageDB regFlags))
    +    -- FIXME: there's really no guarantee this will work.
    +    -- registering into a totally different db stack can
    +    -- fail if dependencies cannot be satisfied.
    +    packageDbs = nub $ withPackageDB lbi
    +                    ++ maybeToList (flagToMaybe  (regPackageDB
regFlags))
    )
    )
    }
$
Attachments
msg11153 (view) Author: kowey Date: 2010-05-29.14:06:30
Nice, Ian found a bug that's been around since Darcs 1.
Erm, this is not good.  

We need to boil this down to a minimal test case.
msg11154 (view) Author: kowey Date: 2010-05-29.14:07:40
(to check that darcs 1.0.9 displays the same symptoms, you have to darcs
get --old-fashioned the two sides)
History
Date User Action Args
2010-05-19 21:15:54igloocreate
2010-05-28 21:28:39koweysettopic: + Conflicts
2010-05-29 14:06:31koweysetpriority: urgent
status: unknown -> needs-reproduction
title: conflict silently appears -> conflict silently appears (1.0.9 to 2.4.3+)
messages: + msg11153
nosy: + kowey
2010-05-29 14:07:41koweysetmessages: + msg11154
2017-07-30 23:57:52ghsetstatus: needs-reproduction -> given-up