Created
June 6, 2014 12:07
-
-
Save jborg/d5bd7ceb419becdbc8f0 to your computer and use it in GitHub Desktop.
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
import sys | |
from attic.remote import RemoteRepository | |
from attic.repository import Repository | |
from attic.helpers import Location, Manifest, unhexlify | |
if __name__ == '__main__': | |
location = Location(sys.argv[1]) | |
if location.proto == 'ssh': | |
repository = RemoteRepository(location) | |
else: | |
repository = Repository(location.path) | |
manifest, key = Manifest.load(repository) | |
for key in sys.argv[2:]: | |
print('Deleting', key) | |
repository.delete(unhexlify(key)) | |
repository.commit() | |
print('Done') | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment