keramida at ceid.upatras.gr
Wed Mar 19 11:39:28 CDT 2008
On 2008-03-19 11:06, Theodore Tso <tytso at MIT.EDU> wrote:
> You can't help invalidating all of the hashes *after* the fatal commit
> containing the illegal material. But it is possible to keep all of
> the hashes before the fatal commit.
You are quite right about keeping the hashes *before* a history
tinkering operation :)
> I would highly commend to people the interface used by git:
> What this allows you to do is to pass in a shell script fragment, like
> git filter-branch --tree-filter 'rm -f drivers/sekrit_aacs_breaker.c' HEAD
> This will remove the file "drivers/sekit_aacs_breaker.c" from all
> commits in the repository. Of course, the hash for any commits which
> end up getting modified by git-filter-branch will have new SHA-1 id's.
> Ones before it will not.
> It shouldn't be that hard for a Hg developer to code equivalent
> functionality into Mercurial.
It's already there, as part of the 'filemap' part of the convert
echo 'exclude drivers/sekit_aacs_breaker.c'
hg convert --filemap linux-2.4-orig linux-2.4
Probably not as convenient as 'git filter-branch', but the feature is
already there. The main point of grief whenever this issue comes up in
FreeBSD developer meetings is that this forces everyone to rebase, but I
don't see how this can be avoided.
More information about the Mercurial