def _updateToAdded(self,directory,fn,dentry,db,service):
services=self.sman.GetServices(fn)<EOL>if services is None:<EOL><INDENT>print("<STR_LIT>" %(fn))<EOL>return<EOL><DEDENT>servicenames=[]<EOL>for s in services:<EOL><INDENT>servicenames.append(s.GetName())<EOL><DEDENT>if service is not None and service not in servicenames:<EOL><INDENT>print("<STR_LIT>"%(fn,service))<EOL>return<EOL><DEDENT>if service is None:<EOL><INDENT>servicelist=servicenames<EOL><DEDENT>else:<EOL><INDENT>servicelist=[service]<EOL><DEDENT>if not db.has_key(fn):<EOL><INDENT>db[fn]=dentry<EOL>del db[fn]['<STR_LIT:status>'] <EOL>db[fn]['<STR_LIT>']={} <EOL><DEDENT>db[fn]['<STR_LIT>']=self._hashfile(os.path.join(directory,fn))<EOL>for service in servicelist:<EOL><INDENT>if not db[fn]['<STR_LIT>'].has_key(service):<EOL><INDENT>db[fn]['<STR_LIT>'][service]={}<EOL>db[fn]['<STR_LIT>'][service]['<STR_LIT:status>']=self.ST_ADDED<EOL><DEDENT>else:<EOL><INDENT>print("<STR_LIT>"%(fn,service))<EOL><DEDENT><DEDENT>logger.info('<STR_LIT>'%(fn,db[fn]['<STR_LIT>'].keys()))<EOL>return<EOL>
Changes to status to 'A' as long as a handler exists,
        also generates a hash
        directory - DIR where stuff is happening
        fn - File name to be added
        dentry - dictionary entry as returned by GetStatus for this file
        db - pusher DB for this directory
        service - None means all services, otherwise looks for service