More clearly show results of folder name translation
For cases like http://article.gmane.org/gmane.mail.imap.offlineimap.general/6468 it is beneficial to see that folder name was translated and the result of this translation on a single line: having log like {{{ Folder Boring/Wreck [acc: tmarble@info9.net]: Syncing Boring/Breck: Gmail -> Maildir }}} with translated name on the "Folder" line and original one on the "Syncing" line isn't very intuitive. Signed-off-by: Eygene Ryabinkin <rea@codelabs.ru>
This commit is contained in:
parent
c92c4e56a0
commit
968ffc20bd
@ -326,7 +326,7 @@ class SyncableAccount(Account):
|
|||||||
thread = InstanceLimitedThread(\
|
thread = InstanceLimitedThread(\
|
||||||
instancename = 'FOLDER_' + self.remoterepos.getname(),
|
instancename = 'FOLDER_' + self.remoterepos.getname(),
|
||||||
target = syncfolder,
|
target = syncfolder,
|
||||||
name = "Folder %s [acc: %s]" % (remotefolder, self),
|
name = "Folder %s [acc: %s]" % (remotefolder.getexplainedname(), self),
|
||||||
args = (self, remotefolder, quick))
|
args = (self, remotefolder, quick))
|
||||||
thread.start()
|
thread.start()
|
||||||
folderthreads.append(thread)
|
folderthreads.append(thread)
|
||||||
|
@ -132,6 +132,13 @@ class BaseFolder(object):
|
|||||||
"""The nametrans-transposed name of the folder's name"""
|
"""The nametrans-transposed name of the folder's name"""
|
||||||
return self.visiblename
|
return self.visiblename
|
||||||
|
|
||||||
|
def getexplainedname(self):
|
||||||
|
""" Name that shows both real and nametrans-mangled values"""
|
||||||
|
if self.name == self.visiblename:
|
||||||
|
return self.name
|
||||||
|
else:
|
||||||
|
return "%s [remote name %s]" % (self.visiblename, self.name)
|
||||||
|
|
||||||
def getrepository(self):
|
def getrepository(self):
|
||||||
"""Returns the repository object that this folder is within."""
|
"""Returns the repository object that this folder is within."""
|
||||||
return self.repository
|
return self.repository
|
||||||
|
Loading…
Reference in New Issue
Block a user