Skip to content

display real change time stamps in directory listing #4087

Closed
@vladak

Description

@vladak

The problem with directory listing currently is that it uses file-system time stamps which can be a bit misleading. If the mirror of particular repository was around long enough, then the timestamps would reflect the changes in individual files, however for repositories reindexed from scratch, the time stamps of files will be initially the same. The file-system time stamps might reflect the history of the files or might not.

Code wise, this would change this:

@Override
public Map<String, Date> getLastModifiedTimes(File directory, Repository repository) {
// We don't have a good way to get this information from the file
// cache, so leave it to the caller to find a reasonable time to
// display (typically the last modified time on the file system).
return Collections.emptyMap();
}

Once the file history cache is converted to use suitable serialization scheme is implemented for #3539, it would make it possible to address this limitation by manually decoding the part of serialized history that contains the latest changeset date (to avoid unnecessary I/O), similarly how this is done in FileAnnotationCache to retrieve the revision ID.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions