Do not create folder on REMOTE if it would fall in REMOTE's folderfilter

Previously, we only checked if a LOCAL folder falls under the local
repositories folderfilter rule when deciding whether a folder should be
created on REMOTE.

However, we also do not want to create the folder on REMOTE if it would
fall under a folderfilter rule there. This patch prevents us from doing
so.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
This commit is contained in:
Sebastian Spaeth 2011-09-19 21:25:50 +02:00
parent b0e88622c4
commit 1c58ebe348

View File

@ -177,6 +177,13 @@ class BaseRepository(object, CustomConfig.ConfigHelperMixin):
dst_repo.getsep(), dst_repo.getsep(),
src_repo.getsep()) src_repo.getsep())
folder = self.getfolder(newsrc_name) folder = self.getfolder(newsrc_name)
# would src repo filter out the new folder name? In this
# case don't create it on it:
if not self.folderfilter(newsrc_name):
self.ui.debug('', "Not creating folder '%s' (repository '%s"
"') as it would be filtered out on that repository." %
(newsrc_name, self))
continue
newdst_name = folder.getvisiblename().replace( newdst_name = folder.getvisiblename().replace(
src_repo.getsep(), dst_repo.getsep()) src_repo.getsep(), dst_repo.getsep())
if dst_name != newdst_name: if dst_name != newdst_name: