Hello,

I managed to remove the file completely from the repo by using both
unrecord and manual repo editing.

Here are some notes regarding this:

o The patch that originally added the secret file also added other
files that were subsequently modified by other patches.

o I had the presence of mind to commit later patches to the secret
file that modified the secret file alone. (I wish I had the presence
of mind not to commit the secret file in the first place :D)

The steps I had to take were:

1. First unrecord all patches to secret file.

2. Then darcs optimize --uncompress (would gunzip *.gz in
_darcs/patches/ worked as well?).

3. grep all the files in _darcs/patches for the patch file that added
the secret file. Edit the file removing the add line and the hunk
below it.

4. darcs check to make sure that the repo *is* indeed corrupted.

5. darcs repair.

6. darcs check again and make sure the repo is *not* corrupted anymore.

7. Woohoo!

I have a question now, are there any plans to do:

darcs unrecord --patches="Patch that added the file" ./secret-file

Currently unrecord only works "en masse". If a patch modifies several
files, it will unrecord changes made to those files as well.

On 6/8/05, David Roundy <[EMAIL PROTECTED]> wrote:
> On Wed, Jun 08, 2005 at 09:09:31PM +0200, Tommy Pettersson wrote:
> > 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.
> 
> It's generally a bad idea to edit patches by hand--mostly because most
> people wouldn't know if what they're doing is actually safe--but in this
> case it's fine, and is what I'd recommend.  He'll have to uncompress the
> files, of course, before editing them.  And you're right that he'd better
> keep the old repo around.
> --
> David Roundy
> 
> _______________________________________________
> darcs-users mailing list
> [email protected]
> http://www.abridgegame.org/mailman/listinfo/darcs-users
> 


-- 
_nimrod_a_abing_

v1sw5CPJYUhw5ln3pr8OUSck6ma8u7LBw3DWNTm5g/l7DaIs7Rr4e6t5Xb4Op1en3g5RZAHC

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

Reply via email to