transplant interactive filter?
Peter Arrenbrecht
peter.arrenbrecht at gmail.com
Wed Nov 19 13:30:36 CST 2008
On Wed, Nov 19, 2008 at 6:04 PM, Jorge Vargas <jorge.vargas at gmail.com> wrote:
> Hello, I have one of those problems that someone committed "nuclear
> launch code" and we need to purge that from mercurial.
>
> I tried the MQ approach listed here
> http://www.selenic.com/mercurial/wiki/index.cgi/EditingHistory
>
> but that failed on me due to a "can not import merge changeset" even
> worst I ask for r193 and beyond and it imported from r204. So I went
> with the other suggestion to use transplant.
>
> With transplant I failed to find a way to edit the patch in interactive mode.
>
> So I went to the other mode
>
> So far I got the following:
> $ cat fixer.sh
> #!/bin/sh
>
> /usr/bin/vim $2
>
> $ hg transplant -s ../projectone-old/ --filter fixer.sh 193:tip
> searching for changes
> skipping already applied revision 193:bd116addee57
> filtering /tmp/hg-transplant-KOoaJG
> sh: fixer.sh: command not found
> abort: filter failed: fixer.sh exited with status 127
>
> I'm not entirely sure what that 127 is is that mercurial failing or
> vim? either way which is the best way to fix this? I need to delete a
> patch is is actually adding a new file to the repo.
If I understand you correctly, you want to make sure a certain file
that was committed to the repo a while ago vanishes without a trace.
If this is correct, then you could do a hg->hg conversion using the
convert extension with a mapping that excludes the file in question.
Note that this will change all cset hashes beyond the cset that
introduced the file.
-parren
More information about the Mercurial
mailing list