[darcs-devel] [issue1796] broken patch in leksah repo from old darcs, can't repair

Eric Kow bugs at darcs.net
Fri Mar 26 22:50:33 UTC 2010


New submission from Eric Kow <kowey at darcs.net>:

I'm filing this request on Petr's request.

Hamish Mackenzie noticed that darcs check on the leksah repo fails:
  http://lists.osuosl.org/pipermail/darcs-users/2010-March/023476.html

We discussed it on IRC
  http://irclog.perlgeek.de/darcs/2010-03-25#i_2154199

It turns out upon further analysis by Petr that the error comes a broken patch
generated a couple of years ago that Darcs up to 2.3 simply do not detect.

You can reproduce this fairly easily by just grabbing

  darcs init
  darcs pull -p "restruct little" http://code.haskell.org/leksah-head/leksah
  darcs check

You should get an error message like this: darcs failed:  Error
renaming: destination AnchoredPath [Name "src",Name "Ghf",Name "GUI"] exists.

The problem seems to be this sequence of two patches

Sun Jul  8 13:28:27 CEST 2007  jnf at arcor.de
  * restructure

    A ./src/GHF/GUI/
     ./src/GHF -> ./src/Ghf

Mon Jul  9 16:31:55 CEST 2007  jnf at arcor.de
  * restruct little little

     ./src/Ghf/gui -> ./src/Ghf/GUI

If I could boil that down, we do
 add GHF/GUI
 mv  GHF     -> Ghf
 mv  Ghf/gui -> Ghf/GUI
In other words, we create a patch which would clobber a GUI directory by moving
on to it.

It's not entirely clear how this came to pass.  Because of the case renaming,
my first guess was that it might have been due to a rename on a case
insensitive filesystem with old-fashioned repository.  Petr believes it's more
likely to be some kind of pending patch bug.

In any case, this is going to be a problem in the future because Darcs 2.5 will
be much more stringent about applying patches.  It looks like we need to offer
some sort of workaround for the leksah guys.

What are our options?

1. we could use the new darcs rebase feature (but it's experimental)
2. we could extend darcs repair somehow (so that if it's clobbering an
   empty directory, it slips in a rmdir shim?)
3. we could hope this is a one-time problem and offer some sort of
   recipe based on editing patch bundles?
4. other solution?

We should probably consider that there may be other broken repos out there
that we're only going to notice now.  This may need some discussion before
we release Darcs 2.5 :-(

-- 
Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow>
PGP Key ID: 08AC04F9

----------
messages: 10535
nosy: darcs-devel, dmitry.kurochkin, hamish.k.mackenzie, kowey, mornfall
status: unknown
title: broken patch in leksah repo from old darcs, can't repair

__________________________________
Darcs bug tracker <bugs at darcs.net>
<http://bugs.darcs.net/issue1796>
__________________________________


More information about the darcs-devel mailing list