Skip to content

A Python script to add or remove a file to an empty directory so that various version control systems retain the directory. This is a fork of the script written by Martin Blais (@blais)

License

Notifications You must be signed in to change notification settings

rmburkhead/keep-empty-dirs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 

Repository files navigation

keep-empty-dirs

A Python script to add or remove a file to empty directories so that various version control systems retain them.

This script recurses through the given directories (or the current directory, by default), finds the empty subdirectories, and adds a file in each. This is used to mark all existing empty subdirectories in a hierarchy to be kept from deletion, or for the sentinels to be used to insure the directories are added to a version control repository that does not normally retain empty directories (e.g., Mecurial, Git).

For help and usage information specify the --help option on the command line:

keep-empty-dirs.py --help

Compatibility

Version 1.x of this script is compatible with Python 2 version 2.6 or greater. Tested on Python version 2.7.5 (Linux).

Version 2.x of this script is compatible with Python 3. Tested on Python version 3.3.2 (Windows).

Your mileage may vary.

License and Copyright

In accordance with the original author's licensing, this is licensed under the GNU General Public License v2 (GPL v2). Please see the referenced web page, or the LICENSE file contained in this repostiory.

This work is Copyright © Robert M Burkhead, 2013. Portions of this work are Copyright © Martin Blais, 2001-2008.

GPL v2 Modification Notice

The script found in this repository has been MODIFIED from the original, begining in October 2013, by Robert Burkhead.

About

A Python script to add or remove a file to an empty directory so that various version control systems retain the directory. This is a fork of the script written by Martin Blais (@blais)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages