Skip to main content
https://img.shields.io/pypi/v/svn-ignore.svg?maxAge=2592000 https://travis-ci.org/Sidesplitter/SVN-Ignore.svg https://img.shields.io/pypi/pyversions/svn-ignore.svg?maxAge=2592000

A utility that provides .svnignore functionality similar to GIT.

Lets face it, the svn:ignore property is pretty poor in comparison to GIT, it does not update itself when you add new files, exceptions are not possible, and it cannot be specified in a single file. That’s exactly why this utility exists

Features that this utility provides: - A .svnignore file that lets you specify which files should be ignored - The possibility to add exceptions(Lines starting with !) to the SVN Ignore file - Updating the svn:ignore property every time you add new files

Installation

Make sure that you have SVN installed before you run SVN-Ignore, as it requires the svn command.

To install SVN-Ignore, simply run: pip install svn-ingore. After that you can run svn-ignore on any directory

Usage

Simply calling svn-ignore [directory] will run the utility. If the directory is left empty, it will use the working directory.

Valid arguments:

  • --no-recursive: Do not apply the .svnignore file to any of the children of the current directory

  • --overwrite: Overwrite existing svn:ignore properties.

  • --ignore-file <file>: The file to look for. Default is .svnigore

  • --verbose: Display verbose information

  • --help: Display this information

Hook

Because of the way that the svn:ignore property works, this script only applies the contents of .svnigore to files that exist at the time of running. To make sure that the file also applies to newly added files, the command needs to be rerun. An easy way to do this is with a hook.

On the Client

Linux (Bash alias)

The correct way to do this is by using a Bash alias. Create a file somewhere with these contents:

#!/bin/bash
if [ $1 = 'commit' ]; then
    svn-ignore
fi

/usr/bin/svn $@

if [ $1 = 'add' ]; then
    svn-ignore
fi

Make sure to call chmod +x FILENAME afterwards. After that you just need to add the following line to ~/.bashrc: alias svn="/path/to/this/file $@". This hook is both for pre-commit and post-add (A hook you normally won’t find).

Windows (TortoiseSVN)

TortoiseSVN offers a simple way to add pre-commit hooks client side. Simply add svn-ignore as a Pre-Commit Hook in Tortoise-SVN.

On the Repository

This is currently not possible and is planned in a future version

Testing

You can run the tests by calling python -m unittest discover in the project root. Subversion 1.9 is required for running the tests. Automatic testing is done by Travis CI. ## License

License

MIT License

Copyright (c) 2016 Jord Nijhuis

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Release files for SVN-Ignore 1.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for SVN-Ignore 1.2.2
File Size Uploaded
SVN-Ignore-1.2.2.tar.gz 7.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for SVN-Ignore 1.2.2
File Interpreter ABI Platform
SVN-Ignore-1.2.2.linux-x86_64.tar.gz Details

Total release size: 15.5 kB

Release files / SVN-Ignore-1.2.2.tar.gz

Download URL SVN-Ignore-1.2.2.tar.gz
Size 7.4 kB
Tags Source
SHA-256 checksum
How to use checksums
c76c1ecf886c5ce9785b6c45b3ea567e9d47c74ee69341e353fc4b68f15fe7b4
BLAKE2b-256 checksum
How to use checksums
4ba3031b60bd66e84fdd3f8681213351b995db5900c41fc3a7767d50a619fb6a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / SVN-Ignore-1.2.2.linux-x86_64.tar.gz

Download URL SVN-Ignore-1.2.2.linux-x86_64.tar.gz
Size 8.1 kB
Tags Source
SHA-256 checksum
How to use checksums
6215270f8ec8ba644ee8872e2927c1205ff2fe2fc546a909be57cbbebed31c6f
BLAKE2b-256 checksum
How to use checksums
e4a12707ff898e0791fd63e1d6538b1a8dabff8457e614112a7ae6de9583507c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

1.2.2 This release

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.0

1 release file

1.0.4

1 release file

1.0.3

1 release file

1.0.2

1 release file

1.0.1

1 release file

1.0.0

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page