def update_columns(self, item, path, status): """ Update the columns (attributes) for a given Nemo item, filling them in with information from the version control server. """ revision = "" if status.revision: revision = str(status.revision) age = "" if status.date: age = pretty_timedelta( datetime.datetime.fromtimestamp(status.date), datetime.datetime.now()) author = "" if status.author: author = str(status.author) values = { "status": status.simple_content_status(), "revision": revision, "author": author, "age": age } for key, value in values.items(): item.add_string_attribute(key, value)
def update_columns(self, item, path, status): """ Update the columns (attributes) for a given Nautilus item, filling them in with information from the version control server. """ revision = "" if status.revision: revision = str(status.revision) age = "" if status.date: age = pretty_timedelta( datetime.datetime.fromtimestamp(status.date), datetime.datetime.now() ) author = "" if status.author: author = str(status.author) values = { "status": status.simple_content_status(), "revision": revision, "author": author, "age": age } for key, value in values.items(): item.add_string_attribute(key, value)