On Wed, Jun 08, 2005 at 05:05:07PM +0000, Nimrod A. Abing wrote:
>                                                               I would
> like to completely remove this file, including any history in the
> repository that will allow it to be pulled again. Is there a way to do
> this?

I think the following should be fairly safe, but you'll have
to do it on your own risk.

Get a copy of the repo with 'darcs get'.  Find the patch file
in _darcs/patches/ that contains "addfile ./secret_file".
(You can uncompress all patch files first with 'darcs optimize
--uncompress'.)  Edit this patch file: remove the line
"addfile ./secret_file", the following "hunk ./secret_file
1" and all trailing "+secret data" lines.  So, now you
have a corrupt repo.  :-)  Do 'darcs repair' and hopefully
darcs will forget it ever knew anything about secret_file.
The secret_file will still be left untouched in working dir,
but it is no longer added (and now never was...) to the repo.

It only works (this simple) if there are no other patches
modifying secret_file, and since darcs does not yet hash the
patch contents for patch file names.

It is probably bad and unsafe in many ways to alter a repo
by hand.  Make sure the new repo works and keep the old repo
as a backup.


-- 
Tommy Pettersson <[EMAIL PROTECTED]>

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

Reply via email to