diff --git a/swh/storage/in_memory.py b/swh/storage/in_memory.py --- a/swh/storage/in_memory.py +++ b/swh/storage/in_memory.py @@ -286,29 +286,22 @@ individual revisions to add. Each dict has the following keys: - id (sha1_git): id of the revision to add - - date (datetime.DateTime): date the revision was written - - date_offset (int): offset from UTC in minutes the revision - was written - - date_neg_utc_offset (boolean): whether a null date_offset - represents a negative UTC offset - - committer_date (datetime.DateTime): date the revision got + - date (dict): date the revision was written + - committer_date (dict): date the revision got added to the origin - - committer_date_offset (int): offset from UTC in minutes the - revision was added to the origin - - committer_date_neg_utc_offset (boolean): whether a null - committer_date_offset represents a negative UTC offset - type (one of 'git', 'tar'): type of the revision added - directory (sha1_git): the directory the revision points at - message (bytes): the message associated with the revision - - author_name (bytes): the name of the revision author - - author_email (bytes): the email of the revision author - - committer_name (bytes): the name of the revision committer - - committer_email (bytes): the email of the revision committer + - author (Dict[str, bytes]): dictionary with keys: + name, fullname, email + - committer (Dict[str, bytes]): dictionary with keys: + name, fullname, email - metadata (jsonb): extra information as dictionary - synthetic (bool): revision's nature (tarball, directory creates synthetic revision) - parents (list of sha1_git): the parents of this revision + date dictionaries have the form defined in :mod:`swh.model`. """ for revision in revisions: if revision['id'] not in self._revisions: @@ -385,16 +378,13 @@ - id (sha1_git): id of the release to add - revision (sha1_git): id of the revision the release points to - - date (datetime.DateTime): the date the release was made - - date_offset (int): offset from UTC in minutes the release was - made - - date_neg_utc_offset (boolean): whether a null date_offset - represents a negative UTC offset + - date (dict): the date the release was made - name (bytes): the name of the release - comment (bytes): the comment associated with the release - - author_name (bytes): the name of the release author - - author_email (bytes): the email of the release author + - author (Dict[str, bytes]): dictionary with keys: + name, fullname, email + the date dictionary has the form defined in :mod:`swh.model`. """ for rel in releases: rel['date'] = normalize_timestamp(rel['date']) diff --git a/swh/storage/storage.py b/swh/storage/storage.py --- a/swh/storage/storage.py +++ b/swh/storage/storage.py @@ -528,11 +528,9 @@ individual revisions to add. Each dict has the following keys: - id (sha1_git): id of the revision to add - - date (datetime.DateTime): date the revision was written - - date_offset (int): offset from UTC in minutes the revision - was written - - date_neg_utc_offset (boolean): whether a null date_offset - represents a negative UTC offset + - date (dict): date the revision was written + - committer_date (dict): date the revision got + added to the origin - committer_date (datetime.DateTime): date the revision got added to the origin - committer_date_offset (int): offset from UTC in minutes the @@ -542,15 +540,16 @@ - type (one of 'git', 'tar'): type of the revision added - directory (sha1_git): the directory the revision points at - message (bytes): the message associated with the revision - - author_name (bytes): the name of the revision author - - author_email (bytes): the email of the revision author - - committer_name (bytes): the name of the revision committer - - committer_email (bytes): the email of the revision committer + - author (Dict[str, bytes]): dictionary with keys: + name, fullname, email + - committer (Dict[str, bytes]): dictionary with keys: + name, fullname, email - metadata (jsonb): extra information as dictionary - synthetic (bool): revision's nature (tarball, directory creates synthetic revision) - parents (list of sha1_git): the parents of this revision + date dictionaries have the form defined in :mod:`swh.model`. """ db = self.get_db() @@ -662,16 +661,15 @@ - id (sha1_git): id of the release to add - revision (sha1_git): id of the revision the release points to - - date (datetime.DateTime): the date the release was made - - date_offset (int): offset from UTC in minutes the release was - made + - date (dict): the date the release was made - date_neg_utc_offset (boolean): whether a null date_offset represents a negative UTC offset - name (bytes): the name of the release - comment (bytes): the comment associated with the release - - author_name (bytes): the name of the release author - - author_email (bytes): the email of the release author + - author (Dict[str, bytes]): dictionary with keys: + name, fullname, email + the date dictionary has the form defined in :mod:`swh.model`. """ db = self.get_db()