Created
February 1, 2012 23:45
-
-
Save JeffJacobson/1720204 to your computer and use it in GitHub Desktop.
Remove ".exclude" extension from all files in a directory without losing SVN history
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Remove the ".exclude" extension from all files in this directory. | |
""" | |
import os, re, pysvn | |
# Get all of the files in the directory. | |
excludeFiles = os.listdir('.') | |
# Filter so only those ending with ".exclude" are in the list. | |
regex = re.compile('.+\.exclude$', re.IGNORECASE) | |
excludeFiles = filter(lambda f: regex.search(f), excludeFiles) | |
client = pysvn.Client() | |
for f in excludeFiles: | |
client.move(f, f[:-8]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment