Hi David,

I still haven't had a chance to look at this fully, but if it helps I've
made a stab at boiling down Florent's example, here attached as a
tarball.  The idea is that if you apply 1.dpatch, and then 2.dpatch, you
should get the same error message.  It's not truly minimal, but
hopefully reducing it to just the one file helps.

For the interested, the technique I used was to edit patch bundles by
hand.  Below is an informal tutorial for repository forensics.  I hope
somebody finds it useful (and that we don't have to do this too often).

Get the both repositories
-------------------------
darcs get http://code.haskell.org/~galbolle/darcs2-bug/darcs-doc/ repo-x 
darcs get http://darcs.net repo-y

Determine what the trunk is
---------------------------
cd repo-x; darcs changes | less
cd ..
darcs get http://darcs.net trunk\
      --to-patch 'fix type witnesses in with_selected_patch_from_repo.'

Create an empty repository
--------------------------
mkdir tminimal
cd tminimal
darcs init --darcs-2
cp ../trunk/src/Darcs/Match.lhs foo
darcs add foo
darcs record -am 'from trunk'
darcs changes --context > cxt

Create patch bundles
--------------------
cd repo-x; darcs send -O ../trunk --match 'touch src/Darcs/Match.lhs'
cd repo-y; darcs send -O ../trunk --match 'touch src/Darcs/Match.lhs'

Edit the patch bundles by hand
------------------------------
In Vim, I found it particularly helpful to delete lines up to
a regexp match:
   d/^\(hunk\|conflictor\|\[\|\]\|:\)
and then use '.' to mindlessly repeat the last command.

I basically just deleted changes that did not affect the file I was
interested in.  A more clever solution would have to been to use the
darcs code to write a patch-bundle-stripping utility that removes all
changes in a bundle expect those that touch a particular file.  I think
such a tool stands a good chance of being helpful for future forensics,
given the number of patch bundles I have hand-edited :-)

I also replaced all occurrences of ./src/Darcs/Match.lhs with ./foo,
deleted the patch bundle hash and replaced the context with that of
my minimal repository.

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

Attachment: issue1043_example.tgz
Description: application/tar-gz

Attachment: pgpk6l464i0hi.pgp
Description: PGP signature

_______________________________________________
darcs-users mailing list
[email protected]
http://lists.osuosl.org/mailman/listinfo/darcs-users

Reply via email to