Skip to main content

A tool to reset perforce local workspace to its initial state.

Project description

Build status

About

P4clean returns a folder tree inside a local Perfoce workspace to its original state by deleting untracked files and removing all empty folders. An exclusion list can be set so untracked development files are not deleted.

Warning: This tool is to be used only if you are confident untracked files can be deleted. Otherwise ‘p4 reconcile’ (Perforce 2012.1 and later) may be a better choice.

Requirements

Perforce server and command line tools must be installed.

Installation

From pip:

$ pip install --upgrade p4clean

From easy_install:

$ easy_install -ZU p4clean

Usage

To clean current folder hiearchy

$ p4clean

Options:

Usage: p4clean [options]

Clean Perfoce local workspace.

Options:
  -n, --dry-run         Print names of files and folders that would be deleted
  -q, --quiet           Do not print names of deleted files and folders
  -e, --exclude         Semicolon separated list of file and folder patterns to be ignored from the clean-up.
  -v, --version         Show program's version number and exit
  -h, --help            Show this help message and exit

Config file

An optional p4clean config file can be used. Add a file named ‘.p4clean’ anywhere inside the local workspace (Suggested location for .p4clean config file is workspace root). At launch, p4clean looks recursively up to the workspace root for this file. If found, matching pattern files and directories are excluded from the clean-up.

p4clean config file example:

[p4clean]
exclude = *.log;*/.git*;

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

p4clean-0.3.3.zip (12.9 kB view details)

Uploaded Source

File details

Details for the file p4clean-0.3.3.zip.

File metadata

  • Download URL: p4clean-0.3.3.zip
  • Upload date:
  • Size: 12.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for p4clean-0.3.3.zip
Algorithm Hash digest
SHA256 6e238716e3a3a344fabbfd7f99165dbec09d4ddae12b6511bdc27fcc8a53f8d4
MD5 f8bc8b50e879dd782e09014a840296fe
BLAKE2b-256 0cd714e9311813cf1c3050d41fb90ab29c6053d43fd42f63e69ddcd85934381f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page