Child pages
  • Swabra
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 34 Next »


This section concerns only the latest version of the plugin. You are welcome to download it directly from public TeamCity server.

General Info




Apache 2.0


free, open-source

Plugin Description

Plugin adds support for cleaning new files created during the build. The files modified or deleted during the build are also reported in the build log (but are not affected by the plugin).

The plugin remembers the state of the file tree after the sources checkout and on next build start deletes all the newly added files.

The plugin also gives the ability to dump processes which lock the checkout directory before build finish (requires handle.exe)

Plugin Development Status

In final stage of development. Snapshot builds are available.
Everyone is encouraged to try the plugin.

TeamCity Versions Compatibility

The current plugin version is designed to work with TeamCity 5.1, TeamCity 5.0.x and TeamCity 4.5.x (there are three plugin configurations).


Directly from public TeamCity server:
5.1 last nightly build
5.0.x last nightly build
4.5.x last nightly build


Installation instructions

  1. Put into <TeamCity Data Directory>/plugins folder.
  2. Restart the server.

Plugin usage

The plugin can be used with any runner. Swabra tab provides UI options to enable scanning checkout directory for newly created, modified and deleted files and for enabling file locking processes detection.

Checkout directory state is saved into a file in the caches directory named <checkout_directory_name_hash>.snapshot using DiskDir format. Checkout directory to snapshot name map is saved into file. The snapshot is used later (at the start of the next build) to determine which files and folders are newly created, modified or deleted. It is done by actual files' presence, last modification data and size comparison with corresponding records in the snapshot.

Сonfiguring plugin via UI options

The plugin adds its configuration settings panel to the runner settings page.

Check Perform build files cleanup option to enable build files cleanup.
Use Ensure clean checkout directory to ensure that the checkout directory corresponds to the sources in the repository at the build start. If detecting any modified or deleted files in the checkout directory before the build start Swabra will enforce clean checkout. The build will also fail if some newly created during previous build files can't be deleted.

Without Ensure clean checkout directory you will only get warnings about modified and deleted files.

Use Paths to ignore setting to specify files that should be ignored be swabra. A path can be checkout directory relative path or a mask with ant-style wild cards.
Ignoring a directory leads to ignoring the whole it's content.

Use Locking processes setting to inspect the checkout directory for processes locking files in this directory.
Choose Report or Kill options to get report about such processes in the build log or kill them.
Note that for locking processes detection handle.exe is required on agents. Click the Download handle.exe link for downloading.

Check Verbose output option to enable detailed logging to build log.

Paths to ignore

If the build is set up to checkout on agent swabra by default ignores all .svn, .git, .hg, CVS folders and their content.
To turn off this behaviour specify empty swabra.ignored.paths

Note that after removing some ignore rules it's advisable to run clean checkout.

Downloading Handle

Specify URL for downloading, press Download button and TeamCity will automatically download Handle, extract and send to Windows agents.
handle.exe will be present on agents only after the upgrade process.
Note that you need to have enough permissions to start the download.

You may also download Handle, extract it on agent and set up the handle.exe.path system property manually.

Debug options

Generally snapshot file is deleted after files collection. Set swabra.preserve.snapshot system property to preserve snapshots for debug purposes.


If you believe you've faced a bug: Issue Tracker (project: TeamCity)
If you want to ask a question or discuss: Forum

Sources in JetBrains Subversion repository.
Builds for TeamCity 5.1 and
Builds for TeamCity 5.0.x and
Builds for TeamCity 4.5.x at JetBrains public TeamCity

Related Materials

Issue in TeamCity tracker.

  • No labels