merge: review2-p5a-fix-workspace into phase 5a fix round 1 integration
# Conflicts: # src/Chronos.Data/Workspaces/WorkspaceSync.cs
This commit is contained in:
commit
9772c2f934
18 files changed
+958
-93
No files matched your search
@@ -20,7 +20,7 @@ public static class ArchiveFailures
|
||||
// any more (FrameTrash.RestoreAsync). Other IOExceptions and InvalidDataExceptions (a sidecar of another sequence)
|
||||
// carry technical text.
|
||||
LeaseUnavailableException or NewerFormatException or StaleRenamePlanException or NestedRenameException or StaleDeletePlanException
|
||||
or SequenceInLibraryException or TrashMismatchException => ex.Message,
|
||||
or SequenceInLibraryException or TrashMismatchException or Core.Project.ProjectTooLargeException => ex.Message,
|
||||
UnauthorizedAccessException => Loc.L("Archive.Failed.Access"),
|
||||
DatabaseException => Loc.L("Archive.Failed.Index"),
|
||||
ArgumentException => Loc.L("Archive.Failed.Gone"),
|
||||
|
||||
@@ -228,7 +228,7 @@ public sealed class WorkspaceSequenceSource : ISequenceSource, IProjectRenders
|
||||
/// The render at the home (owner review 2, R8: edit with proxies, render where the originals are): one job of this PC's
|
||||
/// engine per preset, with the project's portable settings (positions parked by photo, placed on the home's frames by
|
||||
/// the render) and the project recorded on the render; the version too when the settings are those of the last
|
||||
/// version saved (an unsaved working state renders as it is, without a version).
|
||||
/// version the home holds (an unsaved working state, or one saved here and not sent yet, renders as it is, without a version).
|
||||
/// </summary>
|
||||
public IReadOnlyList<ArchiveJobRequest> RenderRequests(Sequence sequence, ProjectSettings project, ExportSettings export, int sourceWidth, int sourceHeight)
|
||||
{
|
||||
@@ -293,12 +293,16 @@ public sealed class WorkspaceSequenceSource : ISequenceSource, IProjectRenders
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>The last version saved: the newest one not sent yet, else the base; with its content hash.</summary>
|
||||
/// <summary>
|
||||
/// The version a render may name, with its content hash: the base, which the home holds, while no version waits to be
|
||||
/// sent; none otherwise. A version not sent yet may never reach the home under its id (a replay or a save-both sends it
|
||||
/// under another), so a render of it names the project alone.
|
||||
/// </summary>
|
||||
private (Guid? Id, string? Hash) Tip()
|
||||
{
|
||||
try
|
||||
{
|
||||
if (_sync.Unpushed(ProjectId) is { Count: > 0 } unsent) return (unsent[^1].Id, unsent[^1].ContentHash);
|
||||
if (_sync.Unpushed(ProjectId).Count > 0) return (null, null);
|
||||
return Project.ReadBundle().Workspace?.Base is { } basis ? (basis.VersionId, basis.ContentHash) : (null, null);
|
||||
}
|
||||
catch (Exception ex) when (ex is IOException or InvalidDataException or InvalidOperationException)
|
||||
|
||||
@@ -43,7 +43,7 @@ public static class ErrorText
|
||||
private static string? Describe(Exception ex) => ex switch
|
||||
{
|
||||
LeaseUnavailableException or ArchiveOfflineException or NewerFormatException or ImportSourceUnavailableException
|
||||
or CopyVerificationException or StaleRenamePlanException or SyncConflictChangedException => ex.Message,
|
||||
or CopyVerificationException or StaleRenamePlanException or SyncConflictChangedException or Core.Project.ProjectTooLargeException => ex.Message,
|
||||
// A template an archive refused (Settings › Archive, or this PC's templates for a new archive): the rule it breaks.
|
||||
TemplateRuleException rule => Loc.L("Errors.Template." + rule.Rule),
|
||||
// The workspace (owner review 2, R8): its own sentences, a home out of reach, a project the home refused.
|
||||
|
||||
Reference in new issue
Block a user