Initialize a MaildirRepository object. Takes a path name to the directory holding all the Maildir directories.
(self, reposname, account)
| 24 | |
| 25 | class MaildirRepository(BaseRepository): |
| 26 | def __init__(self, reposname, account): |
| 27 | """Initialize a MaildirRepository object. Takes a path name |
| 28 | to the directory holding all the Maildir directories.""" |
| 29 | |
| 30 | BaseRepository.__init__(self, reposname, account) |
| 31 | |
| 32 | self.root = self.getlocalroot() |
| 33 | self.folders = None |
| 34 | self.ui = getglobalui() |
| 35 | self.debug("MaildirRepository initialized, sep is %s"% repr(self.getsep())) |
| 36 | self.folder_atimes = [] |
| 37 | |
| 38 | # Create the top-level folder if it doesn't exist |
| 39 | if not os.path.isdir(self.root): |
| 40 | os.makedirs(self.root, 0o700) |
| 41 | |
| 42 | # Create the keyword->char mapping |
| 43 | self.keyword2char = dict() |
| 44 | for c in 'abcdefghijklmnopqrstuvwxyz': |
| 45 | confkey = 'customflag_' + c |
| 46 | keyword = self.getconf(confkey, None) |
| 47 | if keyword is not None: |
| 48 | self.keyword2char[keyword] = c |
| 49 | |
| 50 | def _append_folder_atimes(self, foldername): |
| 51 | """Store the atimes of a folder's new|cur in self.folder_atimes""" |
nothing calls this directly
no test coverage detected