def add(self, filename, filehash, tracking_id, size):
        if filename in self._contents:
            old_filehash, old_tracking_id, old_size = self._contents[filename]
            if old_filehash == filehash:
                log.warn('Filename {0} occurs multiple times in dataset {1} '
                         'with the same hash'.format(filename, self.drs_id))
            elif old_tracking_id == tracking_id:
                raise DuplicateHashError(
                    'Filename {0} occurs multiple times in dataset {1} with '
                    'the same tracking_id and different hash'.format(filename,
                                                                     self.drs_id))
            else:
                raise DuplicateHashError(
                    'Filename {0} occurs multiple times in '
                    'dataset {1}'.format(filename, self.drs_id))
            
        self._contents[filename] = (filehash, tracking_id, size)
dataset/ETHPy150Open stephenpascoe/esgf-pyclient/pyesgf/manifest.py/Manifest.add/original