-f command line option only works on the untranslated remote names

Previously folderfilters had to match both the local AND remote
name which caused unwanted behavior in combination with nametrans
rules. Make it operate on the untranslated remote names now and
clarify in the command line option help text.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
This commit is contained in:
Sebastian Spaeth 2012-02-24 14:52:30 +01:00
parent bfb7a79d6b
commit 3c481d9ce5
2 changed files with 13 additions and 12 deletions

View File

@ -39,5 +39,10 @@ Changes
sphinx). The resulting user docs are in `docs/html`. You can also
only create the man pages with `make man` in the `docs` dir.
* -f command line option only works on the untranslated remote
repository folder names now. Previously folderfilters had to match
both the local AND remote name which caused unwanted behavior in
combination with nametrans rules. Clarify in the help text.
Bug Fixes
---------

View File

@ -121,12 +121,10 @@ class OfflineImap:
help="Log to FILE")
parser.add_option("-f", dest="folders", metavar="folder1,[folder2...]",
help=
"Only sync the specified folders. The folder names "
"are the *untranslated* foldernames. This "
"command-line option overrides any 'folderfilter' "
"and 'folderincludes' options in the configuration "
"file.")
help="Only sync the specified folders. The folder names "
"are the *untranslated* foldernames of the remote repository. "
"This command-line option overrides any 'folderfilter' "
"and 'folderincludes' options in the configuration file.")
parser.add_option("-k", dest="configoverride",
action="append",
@ -269,12 +267,10 @@ class OfflineImap:
for accountname in accounts.getaccountlist(config):
account_section = 'Account ' + accountname
remote_repo_section = 'Repository ' + \
config.get(account_section, 'remoterepository')
local_repo_section = 'Repository ' + \
config.get(account_section, 'localrepository')
for section in [remote_repo_section, local_repo_section]:
config.set(section, "folderfilter", folderfilter)
config.set(section, "folderincludes", folderincludes)
config.get(account_section, 'remoterepository')
config.set(remote_repo_section, "folderfilter", folderfilter)
config.set(remote_repo_section, "folderincludes",
folderincludes)
if options.logfile:
sys.stderr = self.ui.logfile