darcs

Issue 1034 pull => errors in pending (2.0.2+76)

Title pull => errors in pending (2.0.2+76)
Priority bug Status duplicate
Milestone Resolved in
Superseder Applying patches leaves unexpected changes in working copy (1.0.9)
View: 494
Nosy List claus.reinke, cvs-ghc, darcs-devel, dmitry.kurochkin, kowey, thorkilnaur
Assigned To thorkilnaur
Topics ThePendingPatch

Created on 2008-08-24.20:53:21 by claus.reinke, last changed 2009-08-27.14:10:31 by admin.

Files
File name Uploaded Type Edit Remove
pending claus.reinke, 2008-08-24.20:53:18 application/octet-stream
Messages
msg5685 (view) Author: claus.reinke Date: 2008-08-24.20:53:18
Following up on the discussion in the thread "darcs and ghc", and
now having Simon's darcs2 for windows executable, I'm still running 
into all the old issues.. this is all on windows xp, using cygwin.

To summarize:
    A ghc's "darcs-all" script needs changing, to unblock "packages"
    B darcs2 still messes up pending

The longer story:

1. I have a local copy of ghc head + corelibs + extralibs repos, 
    obtained a while ago by the usual hack of downloading tar-file, 
    then ./darcs-all pull and get from the main ghc repos to get uptodate.

    The last ghc I built in those repos is 6.9.20080816, which gives
    an approximate date for the repos.

2. I have a copy of those local repos, for ghc head + corelibs
    (this is used for validating any patches to ghc, and as a reference
    point for ghc's testsuite), obtained via ./darcs-all from (1)

    The last ghc I built in those repos is 6.9.20080807, which gives
    an approximate date for the repos.

3. Today, I tried updating (./darcs-all pull -a) (2) from (1), to keep 
    a buildable ghc version around before bringing (1) up to date with 
    the main ghc repos. Below is what I got:

    - the ./driver/ghc warning is not a darcs issue

    - "Warning: ./packages-0: renameFile: permission denied (Permission denied)"

 Ian: this might actually be an issue with ghc's "darcs-all" script: it probably 
        comes about because "darcs-all" is reading _incrementally_ from "packages",
        interfering with "darcs pull" trying to update "packages"? Reading "packages"
        in full and closing the file before looping over the entries might help to avoid this.

        My opinion on the darcs "Warning" is recorded in darcs Issue1010.

    - errors in pending is something that I had hoped to see fixed in darcs2:

        ..
        == running darcs pull -a --repodir libraries/Cabal
        Pulling from "c:/fptools/ghc/libraries/Cabal"...
        We have conflicts in the following files:
        ./Distribution/PackageDescription/QA.hs
        You have conflicting local changes to:
        ./Distribution/PackageDescription/QA.hs
        Proceed? [yn]
        ..

        I answered no, and attach the bogus libraries/Cabal/_darcs/patches/pending
        (there is also a pending.tentative, same contents)

Below is the "darcs-all" log and darcs2 version.

Claus

$ ./darcs-all pull -a
== running darcs pull -a --repodir .
Pulling from "c:/fptools/ghc"...
Warning: Not deleting ./driver/ghc because it is not empty.
Warning: ./packages-0: renameFile: permission denied (Permission denied)
Finished pulling and applying.
== running darcs pull -a --repodir utils/hsc2hs
Pulling from "c:/fptools/ghc/utils/hsc2hs"...
Finished pulling and applying.
== running darcs pull -a --repodir libraries/array
Pulling from "c:/fptools/ghc/libraries/array"...
Finished pulling and applying.
== running darcs pull -a --repodir libraries/base
Pulling from "c:/fptools/ghc/libraries/base"...
Finished pulling and applying.
== running darcs pull -a --repodir libraries/bytestring
Pulling from "c:/fptools/ghc/libraries/bytestring"...
No remote changes to pull in!
== running darcs pull -a --repodir libraries/Cabal
Pulling from "c:/fptools/ghc/libraries/Cabal"...
We have conflicts in the following files:
./Distribution/PackageDescription/QA.hs
You have conflicting local changes to:
./Distribution/PackageDescription/QA.hs
Proceed? [yn]
== running darcs pull -a --repodir libraries/containers
Pulling from "c:/fptools/ghc/libraries/containers"...
No remote changes to pull in!
== running darcs pull -a --repodir libraries/directory
Pulling from "c:/fptools/ghc/libraries/directory"...
Finished pulling and applying.
== running darcs pull -a --repodir libraries/editline
Pulling from "c:/fptools/ghc/libraries/editline"...
No remote changes to pull in!
== running darcs pull -a --repodir libraries/filepath
Pulling from "c:/fptools/ghc/libraries/filepath"...
No remote changes to pull in!
== running darcs pull -a --repodir libraries/ghc-prim
Pulling from "c:/fptools/ghc/libraries/ghc-prim"...
No remote changes to pull in!
== running darcs pull -a --repodir libraries/haskell98
Pulling from "c:/fptools/ghc/libraries/haskell98"...
No remote changes to pull in!
== running darcs pull -a --repodir libraries/hpc
Pulling from "c:/fptools/ghc/libraries/hpc"...
No remote changes to pull in!
== running darcs pull -a --repodir libraries/integer-gmp
Pulling from "c:/fptools/ghc/libraries/integer-gmp"...
No remote changes to pull in!
== running darcs pull -a --repodir libraries/old-locale
Pulling from "c:/fptools/ghc/libraries/old-locale"...
No remote changes to pull in!
== running darcs pull -a --repodir libraries/old-time
Pulling from "c:/fptools/ghc/libraries/old-time"...
No remote changes to pull in!
== running darcs pull -a --repodir libraries/packedstring
Pulling from "c:/fptools/ghc/libraries/packedstring"...
No remote changes to pull in!
== running darcs pull -a --repodir libraries/pretty
Pulling from "c:/fptools/ghc/libraries/pretty"...
No remote changes to pull in!
== running darcs pull -a --repodir libraries/process
Pulling from "c:/fptools/ghc/libraries/process"...
Finished pulling and applying.
== running darcs pull -a --repodir libraries/random
Pulling from "c:/fptools/ghc/libraries/random"...
No remote changes to pull in!
== running darcs pull -a --repodir libraries/template-haskell
Pulling from "c:/fptools/ghc/libraries/template-haskell"...
No remote changes to pull in!
== running darcs pull -a --repodir libraries/unix
Pulling from "c:/fptools/ghc/libraries/unix"...
No remote changes to pull in!
== running darcs pull -a --repodir libraries/Win32
Pulling from "c:/fptools/ghc/libraries/Win32"...
No remote changes to pull in!
== libraries/HUnit repo not present; skipping
== libraries/QuickCheck repo not present; skipping
== libraries/haskell-src repo not present; skipping
== libraries/html repo not present; skipping
== libraries/mtl repo not present; skipping
== libraries/network repo not present; skipping
== libraries/parsec repo not present; skipping
== libraries/parallel repo not present; skipping
== libraries/regex-base repo not present; skipping
== libraries/regex-compat repo not present; skipping
== libraries/regex-posix repo not present; skipping
== libraries/stm repo not present; skipping
== libraries/time repo not present; skipping
== libraries/xhtml repo not present; skipping
== libraries/dph repo not present; skipping
== running darcs pull -a --repodir testsuite
Pulling from "c:/fptools/ghc/testsuite"...
Finished pulling and applying.
== nofib repo not present; skipping

$ darcs --version
2.0.2 (+ 76 patches)
Attachments
msg5687 (view) Author: kowey Date: 2008-08-25.06:56:23
On Sun, Aug 24, 2008 at 20:53:21 -0000, Claus Reinke wrote:
> 1. I have a local copy of ghc head + corelibs + extralibs repos, 
>     obtained a while ago by the usual hack of downloading tar-file, 
>     then ./darcs-all pull and get from the main ghc repos to get uptodate.
> 
>     The last ghc I built in those repos is 6.9.20080816, which gives
>     an approximate date for the repos.

Thanks for the details! That will be helpful for our attempts to
reproduce this.

>     - errors in pending is something that I had hoped to see fixed in darcs2:

>         == running darcs pull -a --repodir libraries/Cabal
>         Pulling from "c:/fptools/ghc/libraries/Cabal"...
>         We have conflicts in the following files:
>         ./Distribution/PackageDescription/QA.hs
>         You have conflicting local changes to:
>         ./Distribution/PackageDescription/QA.hs
>         Proceed? [yn]

Presumably the libraries/Cabal repository had no local changes before
doing the pull.  Is that correct?

Thanks,
msg5691 (view) Author: claus.reinke Date: 2008-08-25.11:47:25
>Thanks for the details! That will be helpful for our attempts to
>reproduce this.

I haven't been able to reproduce this myself yet (using only the
Cabal repo), but it was the best info I had. 

Perhaps 'darcs pull' should report the ids of the first and last 
patch it pulled, by default (I usually do pull -av and record the 
output for the main repos, but tend to forget that for the validate 
repos, as in this case), to improve chances of getting more accurate 
error reports? Otherwise, guessing what happened from the 
"pending" file looks like the best chance.

>Presumably the libraries/Cabal repository had no local changes 
>before doing the pull.  Is that correct?

Correct. Though I didn't check that there were no darcs issues 
in the target repos before pulling, and with darcs' current
warn-once-then-pretend-nothing-happened strategy (Issue1010), 
it is just possible that the Cabal repo I pulled into already had 
leftover stuff in pending or other issues.

Claus
msg5757 (view) Author: kowey Date: 2008-08-28.10:51:20
I need a volunteer to do the following:

1. get a copy of libraries/Cabal from darcs.haskell.org
2. identify approximately the patches that would have gone into GHC 6.9.20080816
and 20080807 respectively
3. zip these up for forensics
4. (preflight) check that whatsnew is clean on the 7 August one
5. pull from the 16 August to the 7 August one with a recent darcs and do a
whatsnew...
6. same as #5 but using darcs 2.0.2+76

The findings I am hoping for are "I can reproduce this with 2.0.2+76 but not
with a more recent darcs"... but "I can reproduce this" would be a great start
already!
msg5799 (view) Author: thorkilnaur Date: 2008-08-29.18:43:09
http://bugs.darcs.net/msg5757:

> I need a volunteer to do the following:
> ...

I will try to do something about this.

Best regards
Thorkil
msg6001 (view) Author: thorkilnaur Date: 2008-09-13.11:57:17
I have tried this, but unfortunately, I have not been able to reproduce the problem. Some details follow.

Starting at repository Cabal-0, a version of the libraries/Cabal repository with

> thorkil-naurs-mac-mini:~/tn/test/darcs/Issue/1034/work/repos thorkilnaur$ darcs changes --repodir Cabal-0 --last=1
> Mon Aug 25 15:23:52 CEST 2008  Ian Lynagh <igloo@earth.li>
>   * Teach Cabal about the PackageImports extension

I successively generated Cabal-1, Cabal-2, Cabal-3, ... and so on, unpulling one patch at a time. Cabal-22 has

> thorkil-naurs-mac-mini:~/tn/test/darcs/Issue/1034/work/repos/Cabal-22 thorkilnaur$ darcs changes --repodir=Cabal-22 --last=1
> Thu Aug  7 21:03:07 CEST 2008  David Waern
>   * Use 'ghc-pkg dump' instead of 'ghc-pkg describe *'

and represents the state of the repository around 2008-August-7. This repository was tarred up.

I then repeatedly (1) untarred the Cabal-22 repository; (2) darcs pulled the next Cabal-x repository into it; (3) inspected the 
output of darcs whatsnew. Hence, I have tried to pull all versions of the libraries/Cabal repository between 2008-August-7 and 
2008-August-25 into Cabal-22. In all cases, darcs whatsnew reported "No changes!".

This was done with

> thorkil-naurs-mac-mini:~/tn/test/darcs/Issue/1034/work/repos thorkilnaur$ darcs --version
> 2.0.2 (+ 76 patches)

that I got from

> thorkil-naurs-mac-mini:/Volumes/tn18 HD 1/Users/thorkilnaur/tn/darcsDarcsRepository/darcs.net-for-Issue-1034-
20080831_1055/darcs.net thorkilnaur$ ./darcs --version
> 2.0.2 (+ 168 patches)

by unpulling 92 patches. I also tried this with darcs 2.0.2 (release) and with darcs 2.0.2 (+ 168 patches) and again failed to 
reproduce the problem.

Best regards
Thorkil
msg6002 (view) Author: kowey Date: 2008-09-13.12:07:06
Thorkil: Thanks for the diligent tracking.
Claus: any suggestions in how to reproduce this would be welcome.

Reading your past comment more carefully, I noticed this
> it is just possible that the Cabal repo I pulled into already had 
> leftover stuff in pending or other issues.

...which seems to indicate that this might be our old friend
http://bugs.darcs.net/issue494 again

Until we can have something reproducible, I think the best thing for me to do is
to declare that is a duplicate of a darcs 1.0.9 bug (resolved).

Thanks!
msg6004 (view) Author: claus.reinke Date: 2008-09-13.18:12:49
>Thorkil: Thanks for the diligent tracking.
>Claus: any suggestions in how to reproduce this would be welcome.

As I mentioned earlier, I wasn't able to reproduce it myself,
though I only tried starting from patches mentioning QA.hs or
Check.hs. The actual error pattern is familiar, though, and has 
appeared before.

>Reading your past comment more carefully, I noticed this
>> it is just possible that the Cabal repo I pulled into already had 
>> leftover stuff in pending or other issues.
>...which seems to indicate that this might be our old friend
>http://bugs.darcs.net/issue494 again

I suspected as much, and it might well have been the first time
I used darcs2 to pull into that repo. But even with first pulling 
via darcs1, then unpulling, and re-pulling via darcs2, I wasn't 
able to reproduce this effect. Does darcs2 modify darcs1 repos 
in some way, cleaning up possible error sources?

>Until we can have something reproducible, I think the best 
>thing for me to do is to declare that is a duplicate of a darcs 
>1.0.9 bug (resolved).

It is worrying that these bugs can't be reproduced in reality,
only in a reduced test case, and that apparently hard enough
to come by. It would be so much more reassuring if one
could reason backwards from the fix to find the step that
goes wrong, reproduce the actual error with darcs-before-fix
and show that it doesn't happen with darcs-after-fix. Why is
that so rarely possible with darcs bugs and fixes?

Thanks,
Claus
History
Date User Action Args
2008-08-24 20:53:21claus.reinkecreate
2008-08-25 06:56:26koweysetstatus: unread -> unknown
nosy: kowey, dagit, igloo, cvs-ghc, claus.reinke
messages: + msg5687
2008-08-25 11:47:28claus.reinkesetnosy: kowey, dagit, igloo, cvs-ghc, claus.reinke
messages: + msg5691
2008-08-28 10:51:23koweysetpriority: bug
status: unknown -> needs-reproduction
messages: + msg5757
nosy: kowey, dagit, igloo, cvs-ghc, claus.reinke
title: darcs 2 and ghc.. -> pull => errors in pending (2.0.2+76)
2008-08-29 18:43:11thorkilnaursetstatus: needs-reproduction -> has-patch
nosy: + thorkilnaur
messages: + msg5799
assignedto: thorkilnaur
2008-08-30 08:33:43koweysettopic: + ThePendingPatch
nosy: kowey, dagit, igloo, cvs-ghc, thorkilnaur, claus.reinke
2008-09-13 11:57:20thorkilnaursetstatus: has-patch -> unknown
nosy: kowey, dagit, igloo, cvs-ghc, thorkilnaur, claus.reinke
messages: + msg6001
2008-09-13 12:07:08koweysetstatus: unknown -> duplicate
nosy: kowey, dagit, igloo, cvs-ghc, thorkilnaur, claus.reinke
messages: + msg6002
2008-09-13 12:07:39koweysetnosy: kowey, dagit, igloo, cvs-ghc, thorkilnaur, claus.reinke
superseder: + Applying patches leaves unexpected changes in working copy (1.0.9)
2008-09-13 18:12:52claus.reinkesetnosy: kowey, dagit, igloo, cvs-ghc, thorkilnaur, claus.reinke
messages: + msg6004
2009-08-10 23:43:51adminsetnosy: + dmitry.kurochkin, simon, - dagit
2009-08-25 17:18:41adminsetnosy: + darcs-devel, - igloo
2009-08-25 18:14:33adminsetnosy: - simon
2009-08-27 14:10:31adminsetnosy: kowey, darcs-devel, cvs-ghc, thorkilnaur, claus.reinke, dmitry.kurochkin