def update_recent(self, project):
        j = JsonFile(os.path.join(self.primary_dir, "recent.json"))
        recent = j.load([])
        pname = self.project_file_name(project)
        if pname not in recent:
            recent.append(pname)
        else:
            recent.append(recent.pop(recent.index(pname)))
        # only keep the most recent 50 records
        if len(recent) > 50:
            recent = recent[(50-len(recent)):len(recent)]
        j.save(recent)
dataset/ETHPy150Open randy3k/Project-Manager/pm.py/Manager.update_recent/original