When a change is detected, remove keys that existed in the old file.
192488
def _remove_existing(self):
        
        for key in self._keys:
            if key in os.environ:
                LOG.debug('%r: removing old key %r', self, key)
                del os.environ[key]
        self._keys = []
854788
def has_changed (filename):
    """"""
    key = os.path.abspath(filename)
    mtime = get_mtime(key)
    if key not in _mtime_cache:
        _mtime_cache[key] = mtime
        return True
    return mtime > _mtime_cache[key]
1264296
def remove_diff(self, diff_key=None, diff_list='intersect'):
        ''''''
        if diff_list == 'intersect':
            for item in self._intersect:
                item['old'].pop(diff_key, None)
                item['new'].pop(diff_key, None)
        if diff_list == 'removed':
            for item in self._removed:
                item.pop(diff_key, None)
329396
def remove_override(self, key):
        """"""
        keys = key.split('.')
        if len(keys) > 1:
            raise NotImplementedError
        elif key in self.overrides:
            del self.overrides[key]
            self._uncache(key)
271799
void deleteNewAndOldFiles() {

        fa.removeElement(fileName + ".data" + ".old");
        fa.removeElement(fileName + ".data" + ".new");
        fa.removeElement(fileName + ".backup" + ".new");
        fa.removeElement(scriptFileName + ".new");
    }
1257699
def delete(key)
      file = filename key
      File.delete file if File.exist? file
    end
41330
public final void revert() {

        if (tagged) {

            // Remove the added entries
            final Iterator<K> addedIt = added.keySet().iterator();
            while (addedIt.hasNext()) {
                final K key = addedIt.next();
                map.remove(key);
                addedIt.remove();
            }

            // Replace the changed entries
            final Iterator<K> changedIt = changed.keySet().iterator();
            while (changedIt.hasNext()) {
                final K key = changedIt.next();
                final V value = changed.get(key);
                map.put(key, value);
                changedIt.remove();
            }

            // Add the removed entries
            final Iterator<K> removedIt = removed.keySet().iterator();
            while (removedIt.hasNext()) {
                final K key = removedIt.next();
                final V value = removed.get(key);
                map.put(key, value);
                removedIt.remove();
            }

        }

    }
434374
def cleanup(self):
        
        empty_keys = [k for k, v in self.items() if not v]

        for k in empty_keys:
            del self[k]
296301
def cleanup(self):
        """"""
        for file in glob.glob(self.basename + '*'):
            os.unlink(file)
1090803
def cleanup(self):
        """"""
        shutil.rmtree(self.name, onerror=lambda *a: os.chmod(a[1], __import__('stat').S_IWRITE) or os.unlink(a[1]))
        if os.path.exists(self.name):
            raise IOError(17, "File exists: '{}'".format(self.name))
908093
private function zRemovePemFiles()
    {
        if (is_file($this->pubKeyFile)) {
            unlink($this->pubKeyFile);
        }
        if (is_file($this->priKeyFile)) {
            unlink($this->priKeyFile);
        }
        if (is_file($this->certKeyFile)) {
            unlink($this->certKeyFile);
        }
    }
252655
def _cleanup(self):
        """"""
        self._expkg = None
        self._extmp = None
        self._flag_e = True
        self._ifile.close()
836388
def removeDuplicates(inFileName, outFileName) :
	"""'"""
	f = open(inFileName)
	legend = f.readline()
	
	data = ''
	h = {}
	h[legend] = 0
	
	lines = f.readlines()
	for l in lines :
		if not h.has_key(l) :
			h[l] = 0
			data += l
			
	f.flush()
	f.close()
	f = open(outFileName, 'w')
	f.write(legend+data)
	f.flush()
	f.close()
928543
def remove(self, key):
        
        self.raise_error_if_not_open()

        if key in self._file:
            del self._file[key]
648333
private void removeStaleEntries() {
        FileLockReference ref;
        while ((ref = (FileLockReference)queue.poll()) != null) {
            FileKey fk = ref.fileKey();
            List<FileLockReference> list = lockMap.get(fk);
            if (list != null) {
                synchronized (list) {
                    list.remove(ref);
                    removeKeyIfEmpty(fk, list);
                }
            }
        }
    }
812509
function onFileChanged(event) {
		if(event && event.type === 'Changed' && Array.isArray(event.modified)) {
			//event = {type, files: [{name, location, metadata: {contentType}}]}
			event.modified.forEach(function(file) {
				if(typeof file === 'string') {
					_cache.remove(_getKey(file));
				}
			});
		}
	}
1248504
def changed(self, filename='.md5', glob=None):
        
        if glob is not None:
            filename += '.glob-' + ''.join(ch.lower()
                                           for ch in glob if ch.isalpha())
        return changed(self, filename, glob=glob)