Implemented initialization of directory structure on versioned remote
Change-Id: Iff305bcd521ff11aaf28b40b273f1276c72742d6
diff --git a/rsync_versioned.py b/rsync_versioned.py
index 7cd9fe6..d26a235 100644
--- a/rsync_versioned.py
+++ b/rsync_versioned.py
@@ -29,8 +29,8 @@
# possible check that rsync url is exists
def __init__(self,
rsync_url,
- snapshot_dir='files',
- latest_successful_postfix='staging',
+ snapshot_dir='snapshots',
+ latest_successful_postfix='latest',
save_latest_days=14,
init_directory_structure=True,
):
@@ -52,10 +52,11 @@
def init_directory_structure(self):
# TODO: self.rsyncRemote.mkdir
- #if self.root.url_type != 'path':
- #server_root = rsyncRemote(self.root.urlroot)
- #server_root.mkdir(self.root.path)
- pass
+ if self.url.url_type != 'path':
+ server_root = RsyncRemote(self.url.root)
+ return server_root.mkdir(
+ self.url.a_dir(self.url.path, self.snapshot_dir)
+ )
def push(self, source, repo_name, extra=None):
latest_path = self.url.a_file(