Adds 'head' as revision for Subversion repositories

To still support the editor plugin, a new field in the
browse command results is needed to indicate, whether
such a result or rather the requested revision can be
modified by a new commit.

This is the case, when
- for Subversion repositories either the new 'head' or the
latest revision has been requested, or
- for Git and HG when a branch (or the default by specifying
no concrete revision) has been used.
This commit is contained in:
Rene Pfeuffer
2024-11-05 10:54:49 +01:00
parent 9ff259df03
commit 4ebf0e2044
14 changed files with 140 additions and 62 deletions

View File

@@ -40,7 +40,7 @@ public abstract class BrowserResultToFileObjectDtoMapper extends BaseFileObjectD
FileObjectDto map(BrowserResult browserResult, NamespaceAndName namespaceAndName, int offset) {
FileObjectDto fileObjectDto = fileObjectToDto(browserResult.getFile(), namespaceAndName, browserResult, offset);
fileObjectDto.setRevision(browserResult.getRevision());
fileObjectDto.setRevision(browserResult.getRequestedRevision());
return fileObjectDto;
}
@@ -59,7 +59,7 @@ public abstract class BrowserResultToFileObjectDtoMapper extends BaseFileObjectD
applyEnrichers(appender, browserResult, namespaceAndName);
}
// we call enrichers, which are responsible for all file object top level browse result and its children
applyEnrichers(appender, fileObject, namespaceAndName, browserResult, browserResult.getRevision());
applyEnrichers(appender, fileObject, namespaceAndName, browserResult, browserResult.getRequestedRevision());
}
Optional<Instant> mapOptionalInstant(OptionalLong optionalLong) {