Differences between revisions 10 and 13 (spanning 3 versions)
Revision 10 as of 2008-06-02 23:25:01
Size: 914
Editor: DerekSlager
Comment: Correcting description which implied that ignored files are always removed.
Revision 13 as of 2010-08-28 15:15:46
Size: 920
Editor: abuehl
Comment:
Deletions are marked like this. Additions are marked like this.
Line 7: Line 7:
This extension purges all files an directories not being tracked by Mercurial in the current repository. This extension purges all files and directories not being tracked by Mercurial in the current repository.
Line 33: Line 33:
Line 35: Line 34:
CategoryExtension CategoryBundledExtension

Purge extension

This extension is currently being distributed along with Mercurial.

Author: Marco Barisione

Overview

This extension purges all files and directories not being tracked by Mercurial in the current repository.

It'll remove unknown files and empty directories by default. With the --all option, it will also remove ignored files.

It keeps added files and (unmodified or modified) tracked files.

Configuration

Just add a new entry in the extensions section of the mercurial configuration file (hgrc):

[extensions]
hgext.purge=
#or, if purge.py not in the hgext dir:
#purge=/path/to/purge.py

Usage

To purge the repository contents:

hg purge

To list the files that would be removed by running the previous command use it with the --print option:

hg purge --print


CategoryBundledExtension

PurgeExtension (last edited 2024-06-06 05:28:27 by MarkoManni)