obliterate functionality?

cowwoc cowwoc at bbs.darktech.org
Tue Mar 18 08:51:00 CDT 2008

Peter Arrenbrecht wrote:
> On Tue, Mar 18, 2008 at 6:21 AM, cowwoc <cowwoc at bbs.darktech.org> wrote:
>>  How does one permanently remove a file in Mercurial (aka "obliterate")?
>> CVS
>>  had this, SVN does not and I'm wondering how Mercurial stacks up.
> If you mean to remove it from the version history of a published repo
> entirely, then you cannot (short of exporting and reimporting the
> repo, and this would change revision hashes). Hg's philosophy is that
> you cannot rewrite history.

<sigh> Unfortunately, that is a poor assumption:

If you jump down to "The need to Obliterate" it reads:

>     * You accidently checked in sensitive information and need it removed
>     * You are running a large codebase and need to archive old repository
> entries to clean up to save drivespace
>     * You need to split up a repository in several others for some reason,
> maybe a project needs to be split up
>     * You accidently checked in large chunks of (unused) information
> (perhaps some .iso was somehow included), which is sitting there bloating
> your repository for no good reason

I have personally run into many of these cases. They might be rare, but I
strongly advocate that Hg (and others) make it easier to obliterate files
from the repository so long as you have the necessary privileges.

Subversion also lets you export and re-import but this is a cop-out in my
view. This needs to be a lot faster (especially if the files are leaves in
the repository tree) and more flexible to be usable. Imagine Apache having
to take their repository offline for an entire day while they obliterate
files, it's simply not an option.
View this message in context: http://www.nabble.com/obliterate-functionality--tp16114445p16121631.html
Sent from the Mercurial mailing list archive at Nabble.com.

More information about the Mercurial mailing list