Do not create folders on readonly repositories

1) Rename the unintuitive repository.syncfoldersto() to
sync_folder_structure()

2) We were checking if the local repository is readonly and then turning
off any folder creation. But as we can create folders on a remote
repository too, we need to be more fine grained here. Just don't create
a folder on the repository that is marked readonly=True.

This still does not do away with the error message that one currently
gets on missing local folders.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
This commit is contained in:
Sebastian Spaeth
2012-01-05 14:05:51 +01:00
parent 6f361c4d9a
commit 3e28073f98
2 changed files with 10 additions and 4 deletions

View File

@ -289,10 +289,10 @@ class SyncableAccount(Account):
localrepos.getfolders()
statusrepos.getfolders()
remoterepos.sync_folder_structure(localrepos, statusrepos)
# replicate the folderstructure between REMOTE to LOCAL
if not localrepos.getconfboolean('readonly', False):
self.ui.syncfolders(remoterepos, localrepos)
remoterepos.syncfoldersto(localrepos, statusrepos)
# iterate through all folders on the remote repo and sync
for remotefolder in remoterepos.getfolders():