Make syncfoldersto to accept a single folder only
It is just historic relict Signed-off-by: Vladimir Marek <vlmarek@volny.cz> Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
This commit is contained in:
parent
b6ac1aecb1
commit
c2fc81dd3d
@ -233,7 +233,7 @@ class SyncableAccount(Account):
|
||||
# replicate the folderstructure from REMOTE to LOCAL
|
||||
if not localrepos.getconf('readonly', False):
|
||||
self.ui.syncfolders(remoterepos, localrepos)
|
||||
remoterepos.syncfoldersto(localrepos, [statusrepos])
|
||||
remoterepos.syncfoldersto(localrepos, statusrepos)
|
||||
|
||||
# iterate through all folders on the remote repo and sync
|
||||
for remotefolder in remoterepos.getfolders():
|
||||
|
@ -114,12 +114,12 @@ class BaseRepository(object, CustomConfig.ConfigHelperMixin):
|
||||
def getfolder(self, foldername):
|
||||
raise NotImplementedError
|
||||
|
||||
def syncfoldersto(self, dest, copyfolders):
|
||||
def syncfoldersto(self, dest, status):
|
||||
"""Syncs the folders in this repository to those in dest.
|
||||
It does NOT sync the contents of those folders.
|
||||
|
||||
For every time dest.makefolder() is called, also call makefolder()
|
||||
on each folder in copyfolders."""
|
||||
Whenever makefolder() is called, also call makefolder() on status
|
||||
folder."""
|
||||
src = self
|
||||
srcfolders = src.getfolders()
|
||||
destfolders = dest.getfolders()
|
||||
@ -143,8 +143,7 @@ class BaseRepository(object, CustomConfig.ConfigHelperMixin):
|
||||
if not key in desthash:
|
||||
try:
|
||||
dest.makefolder(key)
|
||||
for copyfolder in copyfolders:
|
||||
copyfolder.makefolder(key.replace(dest.getsep(), copyfolder.getsep()))
|
||||
status.makefolder(key.replace(dest.getsep(), status.getsep()))
|
||||
except (KeyboardInterrupt):
|
||||
raise
|
||||
except:
|
||||
|
Loading…
Reference in New Issue
Block a user