[darcs-users] unapplicable patches, and Yikes, pending has conflicts!

Simon Marlow simonmar at microsoft.com
Mon Jan 23 12:33:15 UTC 2006


I'm having a number of strange problems, so I thought I should reocrd my
activities up to this point and see if anyone can tell me what's gone
wrong.

The first thing that happened is someone reported to me a patch that
they couldn't push to the master repo due to conflicts.  FYI, the repo
is
  
  http://darcs.haskell.org/ghc

and the patch is

  http://www.haskell.org/~simonmar/ghci_compatibility.patch

and sure enough, I can reproduce the problem: the patch applies cleanly
to a pulled copy of the repository, but it won't apply to the master
copy:

----------------
> darcs push --no-set-default simonmar at darcs.haskell.org:/home/darcs/ghc

Mon Jan 23 11:06:25 GMT 2006  Lemmih <lemmih at gmail.com>
  * Fix for feature request #655 (Loading the GHC library from GHCi.)
  Moved the utility functions out of hschooks, avoided
  linking the GHC library with hschooks.o and
  added a couple of symbols to the linkers export list.
Shall I push this patch? (1/1) [ynWvpxqadjk], or ? for help: y

darcs failed:  There are conflicts in the following files:
./ghc/compiler/Makefile ./ghc/compiler/parser/cutils.c
./ghc/compiler/parser/cutils.h ./ghc/compiler/parser/hschooks.c
./ghc/compiler/parser/hschooks.h ./ghc/rts/Linker.c
Refusing to apply patches leading to conflicts.
If you would rather apply the patch and mark the conflicts,
use the --mark-conflicts option to apply.
----------------

I tried it by hand on the server, same result.

So now I try a 'darcs repair' on this repo:

----------------
$ darcs repair
Applying patch 119 of 119... done.
different file lengths for
/srv/darcs/ghc/_darcs/current/ghc/compiler/Makefile and
/srv/darcs/ghc/_darcs/newpristine/ghc/compiler/Makefile
Fixing pristine tree...
$ darcs check
Applying patch 119 of 119... done.
The repo is consistent!
----------------

sounds a bit scary, but darcs claims to have fixed it.  Ok, so I try to
apply this patch again:

----------------
$ darcs apply -v ~/ghci_compatibility.patch 
We have the following extra patches:
Will apply the following patches:
Mon Jan 23 03:06:25 PST 2006  Lemmih <lemmih at gmail.com>
  * Fix for feature request #655 (Loading the GHC library from GHCi.)
  Moved the utility functions out of hschooks, avoided
  linking the GHC library with hschooks.o and
  added a couple of symbols to the linkers export list.
Yikes, pending has conflicts!
diffing dir...
Yikes, pending has conflicts!
There are conflicts in the following files:
./ghc/compiler/parser/cutils.c ./ghc/compiler/parser/cutils.h

darcs failed:  Refusing to apply patches leading to conflicts.
If you would rather apply the patch and mark the conflicts,
use the --mark-conflicts option to apply.
----------------

sure enough, 'darcs what' shows me a bunch of changes in those files.
So I try to 'darcs revert':

----------------
$ darcs revert
Yikes, pending has conflicts!

darcs failed:  Yikes, pending has conflicts!
----------------

Now I'm stuck - what should I do to fix this tree?  And how did the
corruption occur in the first place?

Cheers,
	Simon




More information about the darcs-users mailing list