fix(copies): close the sixth verification round of owner review 6
A merge that finds the other changed drops its journal so the retry plans again. Unlink and Keep apart name the local side and leave a link that now joins another sequence alone; Link only and the Integrate job refuse to touch a link or a pair another integration holds. A sweep of 404s asks the server once. To trash... trashes from the kept sequence after a swap and every trash re-checks for new last copies. The Compare dialog and Settings choices fit in every language, Details segments say which value they take, twins need their sibling at the other home, and a linked row keeps three buttons. Captures updated for the dialog and Settings scenes. Refs #73 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
No files matched your search
@@ -178,6 +178,20 @@ match. A 1.1 server works as before, without Integrate; a 1.2 server adds the ph
|
||||
- A server sequence's Library card in a match offers Compare… alone.
|
||||
- Italian: *attività* for job and *spazio di lavoro* for workspace in the match strings; *Quella tenuta*; Settings ›
|
||||
Server reads *Integrazione foto* and *Integrazione progetti*.
|
||||
- A merge stopped after the other changed plans again on the next retry instead of failing on the same journal.
|
||||
- *Unlink* or *Keep apart* of a pair that no longer holds the link leaves the other pair's link and integration
|
||||
alone; *Link only* waits while an integration of either side runs, and an integration never undoes a link given
|
||||
to another sequence since.
|
||||
- A sweep of server sequences no longer found asks the server once, not once per pair.
|
||||
- *To trash…* on *Deleted in other* of a merge trashes from the kept sequence, after a swap too, and on any trash
|
||||
stops when a photo became a last copy since the plan; the version Main uses is marked from the kept sequence.
|
||||
- A linked match whose server deleted photos shows three row buttons (*Compare…*, *Unlink*, *Review*).
|
||||
- The policy and version choices, and Settings › Server's three match rows, fit in every language; the side of a
|
||||
version reads whole and Drop… keeps its gap; each choice of a Details line says which value it takes, naming the
|
||||
server; a long raw value wraps in its tooltip; the Projects headings stay over their lists.
|
||||
- The Edit picker marks a project as a twin only when the other home holds its sibling (the same name, or the name
|
||||
Copy across gave it).
|
||||
- Italian: *Solo in quella tenuta*, *Eliminate in quella tenuta*; the replace tooltips name the kept sequence.
|
||||
|
||||
## [1.1.1] — 2026-11-16
|
||||
|
||||
|
||||
@@ -993,3 +993,12 @@ One line per decision: date · decision · alternative · reason.
|
||||
| 2026-11-17 | A server sequence's Library card in a match offers *Compare…* alone (`Menu.CardMatchRemote`): Two versions… lists a local sequence's own photos (#73) | The local card's menu | Two versions… on a server card listed nothing it could act on |
|
||||
| 2026-11-17 | Italian: Job is *attività* and workspace *spazio di lavoro* in every new string (`i18n/GLOSSARY.md`); Kept reads *Quella tenuta*; the Settings rows read *Integrazione foto* and *Integrazione progetti* (#73) | Lavoro | The glossary fixes both terms; "lavoro" read as work, not a job |
|
||||
| 2026-11-17 | Finding 9 of the fifth verification round (a pair of this PC's sequences dropping a version listed "0 photos") is not reproduced: `DropVersionPlan.Photos` counts each local side's version, 2 for two local sequences; a test keeps it so (#73) | Change the count | The count was right; the test proves it |
|
||||
| 2026-11-17 | A merge that finds the other changed since its journal (frames version, a frame not verified, the trash re-check) deletes the journal before it fails, so the retry plans again (#73) | Keep the journal | Every retry failed on the same stale journal |
|
||||
| 2026-11-17 | Unlink names the local side it unlinks (`SyncService.UnlinkAsync(server, remote, local)`): a link that now joins another local is left alone; an integrating pair is refused (*Busy*); the state moves by compare-and-set. Link only is refused while a pair of either side integrates, and the Integrate job checks at Link, Trash and Details that the link still joins its two sides (#73) | Unlink by the remote alone | Unlinking a stale pair cut the link and the integration of the pair that held it |
|
||||
| 2026-11-17 | A sweep of 404s (`MarkGoneAsync` over many pairs) does not ask the server for each pair again; only a single pair's 404 is confirmed (#73) | Confirm each | A sweep asked the server once per pair, the sweep's own question |
|
||||
| 2026-11-17 | To trash… names the sequence it trashes from (`PlanTrashHereAsync(copy, fromSequence, …)`): a merge's *Deleted in other* trashes from the kept sequence, after a swap too; every trash or drop re-checks for photos that became a last copy since the plan and fails as stale (#73) | Always the pair's first | After a swap the trash came from the sequence that goes to the trash anyway |
|
||||
| 2026-11-17 | A row shows three buttons at most: a linked pair with photos deleted there drops *Integrate…* (Compare… and Review both reach it); a test holds every state to three. No new sample pair for it, to keep the captures (#73) | Four buttons | The fourth button overflowed the actions column |
|
||||
| 2026-11-17 | The policy boxes (dialog and Settings › Server) are 240 px and the version box 185 px, sized by a test that measures every label in every shipped language (Greek is the longest); the label trims with an ellipsis if a future one is longer (#73) | Fixed narrower widths | Long translations were cut without a sign |
|
||||
| 2026-11-17 | A Details segment's tooltip says which value it takes (*Take the value of Studio NAS: 33*; a merge: the kept or the other sequence's); a raw value tooltip wraps at 480 px (#73) | One tooltip for the row | The two segments did not say which side was which |
|
||||
| 2026-11-17 | A workspace project is a twin only when the other home holds its sibling: the same name, or the name Copy across gave it ("name (PC)", "name (server)"), either way round, ignoring case (#73) | Any project of a linked sequence | Every project read as a twin, one with no counterpart too |
|
||||
| 2026-11-17 | Italian: *Solo in quella tenuta* and *Eliminate in quella tenuta* (four words, over the three-word label rule, as the finding proposed: *quella* says it is a sequence, not a place) (#73) | Solo nella tenuta | "Nella tenuta" read as a place |
|
||||
@@ -20,7 +20,7 @@ by its `windows` job once a Windows runner is registered (`WINDOWS_RUNNER`), and
|
||||
| 8.4 Owner review 4 | Done (request and plan: `docs/requests/2026-11-06-owner-review-4.md`): released as `v0.1.0-rc.14` with owner review 1 phase 6 (the deploy guide `docs/deploy/`), then as `v1.0.0` (#23), the first stable release: R1 work board of every video made or published, the published apart from workspace work (#29); R2 the anonymous usage counts removed, nothing sent by itself (#30); R3 the archive's whole folder structure created inside the chosen archive path, desktop and server (#31); R4 the repository on Gitea in order (earlier work as closed issues #32–#54 in their milestones, the original documentation in `docs/reference/original`, `fe50b877`); R5 licensing set aside and recorded in #24. |
|
||||
| 8.5 Owner review 5 | Done (request, answers and plan: `docs/requests/2026-11-15-owner-review-5.md`; issues #64–#67, milestone v1.1.0), released as `v1.1.0`: one setup for Chronos Desktop and Chronos Uploader with the Uploader's update check (#64); the detail of mass passes (step, photo x of y, sequence n of m, rate, time left) on the desktop, the admin panel and, for the connected server's jobs, the desktop's Server section (#65); separate homes per server keyed by a stable server id, with the 1.0 workspace and cache sorted at the first start and a separate originals archive per server (#66); Chronos Desktop sharing its library on the LAN in place of Chronos Server for Windows, running on in the tray while it shares (#67). One review round, 15 findings fixed; strings in all 38 languages. Not run on the PC: the Windows-only smoke tests, `installer-test.ps1` and the release dry run (CI runs them). Follow-ups: a firewall status row, Change…/Forget on known servers, the LAN beacon announcing the server id, docs/ui DESIGN and mockups for the new screens. |
|
||||
| 8.6 Windows test of 1.1.0 | Done (#70, milestone v1.1.1), released as `v1.1.1`: the App and Core.Windows suites run whole on the development PC (5 stale screen tests brought up to date); a hands-on test of a portable 1.1.0 (import, Reorganize, sharing, a client, tray, Exit with clients); fixes: job log times in local time, the Jobs Type column, Forget in Bulgarian, the Reorganize capture. Still to do by the owner: the real 1.0 → 1.1 upgrade on this PC (UAC). |
|
||||
| 8.7 Owner review 6 | In progress (request, answers and plan: `docs/requests/2026-11-16-owner-review-6.md`; #73, milestone v1.2.0), implemented on `or6-duplicates`, not released: matches, the same time-lapse on a server and on this PC under different ids or twice on this PC, found after each sync refresh (the server's new photo lookup) and after jobs that change photos (migration 0012, `Chronos.Data.Copies`); Server › Matches with Keep apart, Link only, Unlink and the Compare dialog (Photos, Details line by line, Projects, Plan); Integrate of a local and a server sequence (job 25: photos both ways under Union by default, details as one change, projects copied across, losers to the trash only after a hash check) and the merge of two local sequences (job 26: the other to its archive's trash once every photo is verified); new photos of integrated pairs moved by themselves, *deleted there* and *deleted on server* reviewed by the user; Settings › Server › Link matches (Ask always), Integrate photos (Union), Integrate projects (Copy across); Upload all local skips suspected matches. Eight parcels, one review round (correctness, safety, conformance) with every verified finding fixed, a gap round and five verification rounds; the strings in all 38 languages. Still to do: the PostgreSQL tests in CI, the Windows capture of the new screens against the design, the release. The photos a sequence keeps in two versions are listed with Drop… from the Library (Two versions…) and a merge job's Open. Follow-ups: a field-level merge of an integrated pair's settings (to ask the owner), the Import › Folder… warning, the same list in Edit. |
|
||||
| 8.7 Owner review 6 | In progress (request, answers and plan: `docs/requests/2026-11-16-owner-review-6.md`; #73, milestone v1.2.0), implemented on `or6-duplicates`, not released: matches, the same time-lapse on a server and on this PC under different ids or twice on this PC, found after each sync refresh (the server's new photo lookup) and after jobs that change photos (migration 0012, `Chronos.Data.Copies`); Server › Matches with Keep apart, Link only, Unlink and the Compare dialog (Photos, Details line by line, Projects, Plan); Integrate of a local and a server sequence (job 25: photos both ways under Union by default, details as one change, projects copied across, losers to the trash only after a hash check) and the merge of two local sequences (job 26: the other to its archive's trash once every photo is verified); new photos of integrated pairs moved by themselves, *deleted there* and *deleted on server* reviewed by the user; Settings › Server › Link matches (Ask always), Integrate photos (Union), Integrate projects (Copy across); Upload all local skips suspected matches. Eight parcels, one review round (correctness, safety, conformance) with every verified finding fixed, a gap round and six verification rounds; the strings in all 38 languages. Still to do: the PostgreSQL tests in CI, the Windows capture of the new screens against the design, the release. The photos a sequence keeps in two versions are listed with Drop… from the Library (Two versions…) and a merge job's Open. Follow-ups: a field-level merge of an integrated pair's settings (to ask the owner), the Import › Folder… warning, the same list in Edit. |
|
||||
| 9 Monetization | Not started: requires explicit approval (§22); the proposal is recorded in issue #24 (owner review 4, R5). |
|
||||
|
||||
## Verification (2026-10-12)
|
||||
|
||||
@@ -840,6 +840,10 @@
|
||||
<data name="Tooltips.Server.Copies.Detail.AllKept" xml:space="preserve"><value>أخذ قيمة التسلسل المحتفظ به لكل اختلاف.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.AllOther" xml:space="preserve"><value>أخذ قيمة التسلسل الآخر لكل اختلاف.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.AllThere" xml:space="preserve"><value>أخذ قيمة {0} لكل اختلاف.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseHere" xml:space="preserve"><value>أخذ قيمة هذا الكمبيوتر: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseThere" xml:space="preserve"><value>أخذ قيمة {0}: {1}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseKept" xml:space="preserve"><value>أخذ قيمة التسلسل المحتفظ به: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseOther" xml:space="preserve"><value>أخذ قيمة التسلسل الآخر: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Drop" xml:space="preserve"><value>نقل هذا الإصدار إلى سلة محذوفات كل جانب يحتوي عليه.</value></data>
|
||||
<data name="Tooltips.Server.Copies.InMain" xml:space="preserve"><value>يستخدم الفاصل الزمني والعروض في الرئيسي هذه النسخة؛ الأخرى مستبعدة.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Find" xml:space="preserve"><value>البحث الآن عن تطابقات لهذه التسلسلات على {0} وعلى هذا الكمبيوتر.</value></data>
|
||||
|
||||
@@ -804,6 +804,10 @@
|
||||
<data name="Tooltips.Server.Copies.Detail.AllKept" xml:space="preserve"><value>Взема стойността на запазената серия за всяка разлика.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.AllOther" xml:space="preserve"><value>Взема стойността на другата серия за всяка разлика.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.AllThere" xml:space="preserve"><value>Взема стойността на {0} за всяка разлика.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseHere" xml:space="preserve"><value>Взема стойността на този компютър: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseThere" xml:space="preserve"><value>Взема стойността на {0}: {1}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseKept" xml:space="preserve"><value>Взема стойността на запазената серия: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseOther" xml:space="preserve"><value>Взема стойността на другата серия: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Drop" xml:space="preserve"><value>Премества тази версия в кошчето на всяка страна, която я има.</value></data>
|
||||
<data name="Tooltips.Server.Copies.InMain" xml:space="preserve"><value>Таймлапсът и рендерите на Основен използват тази версия; другата е изключена.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Find" xml:space="preserve"><value>Търси сега съвпадения на тези серии на {0} и на този компютър.</value></data>
|
||||
|
||||
@@ -822,6 +822,10 @@
|
||||
<data name="Tooltips.Server.Copies.Detail.AllKept" xml:space="preserve"><value>U každého rozdílu převezme hodnotu ponechané sekvence.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.AllOther" xml:space="preserve"><value>U každého rozdílu převezme hodnotu druhé sekvence.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.AllThere" xml:space="preserve"><value>U každého rozdílu převezme hodnotu z {0}.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseHere" xml:space="preserve"><value>Převezme hodnotu z tohoto počítače: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseThere" xml:space="preserve"><value>Převezme hodnotu z {0}: {1}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseKept" xml:space="preserve"><value>Převezme hodnotu ponechané sekvence: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseOther" xml:space="preserve"><value>Převezme hodnotu druhé sekvence: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Drop" xml:space="preserve"><value>Přesune tuto verzi do koše každé strany, která ji má.</value></data>
|
||||
<data name="Tooltips.Server.Copies.InMain" xml:space="preserve"><value>Časosběr a rendery Hlavního používají tuto verzi; druhá je vyloučená.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Find" xml:space="preserve"><value>Hned vyhledá shody těchto sekvencí na {0} a v tomto počítači.</value></data>
|
||||
|
||||
@@ -804,6 +804,10 @@
|
||||
<data name="Tooltips.Server.Copies.Detail.AllKept" xml:space="preserve"><value>Brug den beholdte sekvens' værdi for hver forskel.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.AllOther" xml:space="preserve"><value>Brug den anden sekvens' værdi for hver forskel.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.AllThere" xml:space="preserve"><value>Brug værdien fra {0} for hver forskel.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseHere" xml:space="preserve"><value>Brug værdien fra denne pc: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseThere" xml:space="preserve"><value>Brug værdien fra {0}: {1}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseKept" xml:space="preserve"><value>Brug den beholdte sekvens' værdi: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseOther" xml:space="preserve"><value>Brug den anden sekvens' værdi: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Drop" xml:space="preserve"><value>Flyt denne version til papirkurven på hver side, der har den.</value></data>
|
||||
<data name="Tooltips.Server.Copies.InMain" xml:space="preserve"><value>Hoveds timelapse og renderinger bruger denne version; den anden er udeladt.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Find" xml:space="preserve"><value>Søg nu efter match til disse sekvenser på {0} og på denne pc.</value></data>
|
||||
|
||||
@@ -804,6 +804,10 @@
|
||||
<data name="Tooltips.Server.Copies.Detail.AllKept" xml:space="preserve"><value>Für jede Abweichung den Wert der bleibenden Sequenz übernehmen.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.AllOther" xml:space="preserve"><value>Für jede Abweichung den Wert der anderen Sequenz übernehmen.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.AllThere" xml:space="preserve"><value>Für jede Abweichung den Wert von {0} übernehmen.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseHere" xml:space="preserve"><value>Den Wert dieses PCs übernehmen: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseThere" xml:space="preserve"><value>Den Wert von {0} übernehmen: {1}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseKept" xml:space="preserve"><value>Den Wert der bleibenden Sequenz übernehmen: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseOther" xml:space="preserve"><value>Den Wert der anderen Sequenz übernehmen: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Drop" xml:space="preserve"><value>Diese Version in den Papierkorb jeder Seite verschieben, die sie enthält.</value></data>
|
||||
<data name="Tooltips.Server.Copies.InMain" xml:space="preserve"><value>Zeitraffer und Renderings des Hauptprojekts verwenden diese Version; die andere ist ausgeschlossen.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Find" xml:space="preserve"><value>Jetzt auf {0} und auf diesem PC nach Übereinstimmungen dieser Sequenzen suchen.</value></data>
|
||||
|
||||
@@ -804,6 +804,10 @@
|
||||
<data name="Tooltips.Server.Copies.Detail.AllKept" xml:space="preserve"><value>Χρήση της τιμής της διατηρούμενης ακολουθίας για κάθε διαφορά.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.AllOther" xml:space="preserve"><value>Χρήση της τιμής της άλλης ακολουθίας για κάθε διαφορά.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.AllThere" xml:space="preserve"><value>Χρήση της τιμής του διακομιστή {0} για κάθε διαφορά.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseHere" xml:space="preserve"><value>Χρήση της τιμής αυτού του υπολογιστή: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseThere" xml:space="preserve"><value>Χρήση της τιμής του διακομιστή {0}: {1}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseKept" xml:space="preserve"><value>Χρήση της τιμής της διατηρούμενης ακολουθίας: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseOther" xml:space="preserve"><value>Χρήση της τιμής της άλλης ακολουθίας: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Drop" xml:space="preserve"><value>Μετακίνηση αυτής της έκδοσης στον κάδο κάθε πλευράς που την έχει.</value></data>
|
||||
<data name="Tooltips.Server.Copies.InMain" xml:space="preserve"><value>Το time-lapse και οι αποδόσεις του Κύριου χρησιμοποιούν αυτή την έκδοση· η άλλη εξαιρείται.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Find" xml:space="preserve"><value>Αναζήτηση τώρα αντιστοιχιών αυτών των ακολουθιών στον διακομιστή {0} και σε αυτόν τον υπολογιστή.</value></data>
|
||||
|
||||
@@ -1232,6 +1232,10 @@
|
||||
<data name="Tooltips.Server.Copies.Detail" xml:space="preserve"><value>The value both sequences take.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.AllHere" xml:space="preserve"><value>Take this PC's value for every difference.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.AllThere" xml:space="preserve"><value>Take the value of {0} for every difference.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseHere" xml:space="preserve"><value>Take this PC's value: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseThere" xml:space="preserve"><value>Take the value of {0}: {1}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseKept" xml:space="preserve"><value>Take the kept sequence's value: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseOther" xml:space="preserve"><value>Take the other sequence's value: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.AllKept" xml:space="preserve"><value>Take the kept sequence's value for every difference.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.AllOther" xml:space="preserve"><value>Take the other sequence's value for every difference.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Projects.CopyAcross" xml:space="preserve"><value>Each side's other projects appear on the other home with their history, renamed on a clash.</value></data>
|
||||
|
||||
@@ -804,6 +804,10 @@
|
||||
<data name="Tooltips.Server.Copies.Detail.AllKept" xml:space="preserve"><value>Toma el valor de la secuencia conservada en cada diferencia.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.AllOther" xml:space="preserve"><value>Toma el valor de la otra secuencia en cada diferencia.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.AllThere" xml:space="preserve"><value>Toma el valor de {0} en cada diferencia.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseHere" xml:space="preserve"><value>Toma el valor de este equipo: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseThere" xml:space="preserve"><value>Toma el valor de {0}: {1}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseKept" xml:space="preserve"><value>Toma el valor de la secuencia conservada: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseOther" xml:space="preserve"><value>Toma el valor de la otra secuencia: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Drop" xml:space="preserve"><value>Mueve esta versión a la papelera de cada lado que la tiene.</value></data>
|
||||
<data name="Tooltips.Server.Copies.InMain" xml:space="preserve"><value>El timelapse y los renders de Principal usan esta versión; la otra está excluida.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Find" xml:space="preserve"><value>Busca ahora coincidencias de estas secuencias en {0} y en este equipo.</value></data>
|
||||
|
||||
@@ -804,6 +804,10 @@
|
||||
<data name="Tooltips.Server.Copies.Detail.AllKept" xml:space="preserve"><value>Võtke iga erinevuse puhul säilitatava jada väärtus.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.AllOther" xml:space="preserve"><value>Võtke iga erinevuse puhul teise jada väärtus.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.AllThere" xml:space="preserve"><value>Võtke iga erinevuse puhul serveri {0} väärtus.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseHere" xml:space="preserve"><value>Võtke selle arvuti väärtus: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseThere" xml:space="preserve"><value>Võtke serveri {0} väärtus: {1}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseKept" xml:space="preserve"><value>Võtke säilitatava jada väärtus: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseOther" xml:space="preserve"><value>Võtke teise jada väärtus: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Drop" xml:space="preserve"><value>Teisaldage see versioon iga poole prügikasti, kus see on.</value></data>
|
||||
<data name="Tooltips.Server.Copies.InMain" xml:space="preserve"><value>Põhiprojekti aegvõte ja renderdused kasutavad seda versiooni; teine on välja jäetud.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Find" xml:space="preserve"><value>Otsige kohe nende jadade vasteid serverist {0} ja sellest arvutist.</value></data>
|
||||
|
||||
@@ -804,6 +804,10 @@
|
||||
<data name="Tooltips.Server.Copies.Detail.AllKept" xml:space="preserve"><value>Käytä säilytettävän sarjan arvoa jokaisessa erossa.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.AllOther" xml:space="preserve"><value>Käytä toisen sarjan arvoa jokaisessa erossa.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.AllThere" xml:space="preserve"><value>Käytä kohteen {0} arvoa jokaisessa erossa.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseHere" xml:space="preserve"><value>Käytä tämän tietokoneen arvoa: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseThere" xml:space="preserve"><value>Käytä kohteen {0} arvoa: {1}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseKept" xml:space="preserve"><value>Käytä säilytettävän sarjan arvoa: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseOther" xml:space="preserve"><value>Käytä toisen sarjan arvoa: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Drop" xml:space="preserve"><value>Siirrä tämä versio jokaisen sen sisältävän puolen roskakoriin.</value></data>
|
||||
<data name="Tooltips.Server.Copies.InMain" xml:space="preserve"><value>Pääprojektin aikaväli ja renderöinnit käyttävät tätä versiota; toinen on jätetty pois.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Find" xml:space="preserve"><value>Etsi nyt näiden sarjojen vastaavuuksia palvelimelta {0} ja tältä tietokoneelta.</value></data>
|
||||
|
||||
@@ -804,6 +804,10 @@
|
||||
<data name="Tooltips.Server.Copies.Detail.AllKept" xml:space="preserve"><value>Prendre la valeur de la séquence conservée pour chaque différence.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.AllOther" xml:space="preserve"><value>Prendre la valeur de l'autre séquence pour chaque différence.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.AllThere" xml:space="preserve"><value>Prendre la valeur de {0} pour chaque différence.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseHere" xml:space="preserve"><value>Prendre la valeur de ce PC : {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseThere" xml:space="preserve"><value>Prendre la valeur de {0} : {1}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseKept" xml:space="preserve"><value>Prendre la valeur de la séquence conservée : {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseOther" xml:space="preserve"><value>Prendre la valeur de l'autre séquence : {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Drop" xml:space="preserve"><value>Mettre cette version à la corbeille de chaque côté qui la contient.</value></data>
|
||||
<data name="Tooltips.Server.Copies.InMain" xml:space="preserve"><value>Le timelapse et les rendus de Principal utilisent cette version ; l'autre est exclue.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Find" xml:space="preserve"><value>Rechercher maintenant les correspondances de ces séquences sur {0} et sur ce PC.</value></data>
|
||||
|
||||
@@ -822,6 +822,10 @@
|
||||
<data name="Tooltips.Server.Copies.Detail.AllKept" xml:space="preserve"><value>לקיחת הערך של הרצף הנשמר לכל הבדל.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.AllOther" xml:space="preserve"><value>לקיחת הערך של הרצף השני לכל הבדל.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.AllThere" xml:space="preserve"><value>לקיחת הערך של {0} לכל הבדל.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseHere" xml:space="preserve"><value>לקיחת הערך של המחשב הזה: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseThere" xml:space="preserve"><value>לקיחת הערך של {0}: {1}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseKept" xml:space="preserve"><value>לקיחת הערך של הרצף הנשמר: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseOther" xml:space="preserve"><value>לקיחת הערך של הרצף השני: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Drop" xml:space="preserve"><value>העברת הגרסה הזו לאשפה של כל צד שמחזיק אותה.</value></data>
|
||||
<data name="Tooltips.Server.Copies.InMain" xml:space="preserve"><value>הצילום בהילוך מהיר והרינדורים של ראשי משתמשים בגרסה זו; האחרת מוחרגת.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Find" xml:space="preserve"><value>חיפוש עכשיו של התאמות לרצפים האלה ב-{0} ובמחשב הזה.</value></data>
|
||||
|
||||
@@ -804,6 +804,10 @@
|
||||
<data name="Tooltips.Server.Copies.Detail.AllKept" xml:space="preserve"><value>हर अंतर के लिए रखे गए सीक्वेंस का मान लें।</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.AllOther" xml:space="preserve"><value>हर अंतर के लिए दूसरे सीक्वेंस का मान लें।</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.AllThere" xml:space="preserve"><value>हर अंतर के लिए {0} का मान लें।</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseHere" xml:space="preserve"><value>इस PC का मान लें: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseThere" xml:space="preserve"><value>{0} का मान लें: {1}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseKept" xml:space="preserve"><value>रखे गए सीक्वेंस का मान लें: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseOther" xml:space="preserve"><value>दूसरे सीक्वेंस का मान लें: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Drop" xml:space="preserve"><value>इस संस्करण को उसे रखने वाले हर पक्ष के ट्रैश में ले जाएँ।</value></data>
|
||||
<data name="Tooltips.Server.Copies.InMain" xml:space="preserve"><value>मुख्य का टाइम-लैप्स और रेंडर इस संस्करण का उपयोग करते हैं; दूसरा बाहर है।</value></data>
|
||||
<data name="Tooltips.Server.Copies.Find" xml:space="preserve"><value>अभी {0} पर और इस PC पर इन सीक्वेंस के मिलान खोजें।</value></data>
|
||||
|
||||
@@ -822,6 +822,10 @@
|
||||
<data name="Tooltips.Server.Copies.Detail.AllKept" xml:space="preserve"><value>Preuzima vrijednost zadržane sekvence za svaku razliku.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.AllOther" xml:space="preserve"><value>Preuzima vrijednost druge sekvence za svaku razliku.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.AllThere" xml:space="preserve"><value>Preuzima vrijednost poslužitelja {0} za svaku razliku.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseHere" xml:space="preserve"><value>Preuzima vrijednost ovog računala: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseThere" xml:space="preserve"><value>Preuzima vrijednost poslužitelja {0}: {1}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseKept" xml:space="preserve"><value>Preuzima vrijednost zadržane sekvence: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseOther" xml:space="preserve"><value>Preuzima vrijednost druge sekvence: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Drop" xml:space="preserve"><value>Premješta ovu verziju u koš svake strane koja je sadrži.</value></data>
|
||||
<data name="Tooltips.Server.Copies.InMain" xml:space="preserve"><value>Timelapse i renderi Glavnog koriste ovu verziju; druga je isključena.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Find" xml:space="preserve"><value>Odmah traži podudaranja ovih sekvenci na poslužitelju {0} i na ovom računalu.</value></data>
|
||||
|
||||
@@ -804,6 +804,10 @@
|
||||
<data name="Tooltips.Server.Copies.Detail.AllKept" xml:space="preserve"><value>Minden eltérésnél a megtartott sorozat értékét veszi át.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.AllOther" xml:space="preserve"><value>Minden eltérésnél a másik sorozat értékét veszi át.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.AllThere" xml:space="preserve"><value>Minden eltérésnél a(z) {0} szerver értékét veszi át.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseHere" xml:space="preserve"><value>A számítógép értékét veszi át: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseThere" xml:space="preserve"><value>A(z) {0} szerver értékét veszi át: {1}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseKept" xml:space="preserve"><value>A megtartott sorozat értékét veszi át: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseOther" xml:space="preserve"><value>A másik sorozat értékét veszi át: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Drop" xml:space="preserve"><value>Ezt a verziót minden olyan oldalon a lomtárba helyezi, ahol megvan.</value></data>
|
||||
<data name="Tooltips.Server.Copies.InMain" xml:space="preserve"><value>A Fő projekt timelapse-e és renderei ezt a verziót használják; a másik ki van zárva.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Find" xml:space="preserve"><value>Most egyezéseket keres ezekhez a sorozatokhoz a(z) {0} szerveren és ezen a számítógépen.</value></data>
|
||||
|
||||
@@ -804,6 +804,10 @@
|
||||
<data name="Tooltips.Server.Copies.Detail.AllKept" xml:space="preserve"><value>Pakai nilai sekuens yang dipertahankan untuk setiap perbedaan.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.AllOther" xml:space="preserve"><value>Pakai nilai sekuens lain untuk setiap perbedaan.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.AllThere" xml:space="preserve"><value>Pakai nilai {0} untuk setiap perbedaan.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseHere" xml:space="preserve"><value>Pakai nilai PC ini: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseThere" xml:space="preserve"><value>Pakai nilai {0}: {1}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseKept" xml:space="preserve"><value>Pakai nilai sekuens yang dipertahankan: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseOther" xml:space="preserve"><value>Pakai nilai sekuens lain: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Drop" xml:space="preserve"><value>Pindahkan versi ini ke sampah setiap sisi yang memilikinya.</value></data>
|
||||
<data name="Tooltips.Server.Copies.InMain" xml:space="preserve"><value>Time-lapse dan render Utama memakai versi ini; versi lain dikecualikan.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Find" xml:space="preserve"><value>Cari padanan sekuens ini di {0} dan di PC ini sekarang.</value></data>
|
||||
|
||||
@@ -368,9 +368,9 @@
|
||||
<data name="Server.Copies.Class.DeletedHere" xml:space="preserve"><value>Eliminate qui</value></data>
|
||||
<data name="Server.Copies.Class.DeletedThere" xml:space="preserve"><value>Eliminate là</value></data>
|
||||
<data name="Server.Copies.Class.Versions" xml:space="preserve"><value>Due versioni</value></data>
|
||||
<data name="Server.Copies.Class.OnlyKept" xml:space="preserve"><value>Solo nella tenuta</value></data>
|
||||
<data name="Server.Copies.Class.OnlyKept" xml:space="preserve"><value>Solo in quella tenuta</value></data>
|
||||
<data name="Server.Copies.Class.OnlyOther" xml:space="preserve"><value>Solo nell'altra</value></data>
|
||||
<data name="Server.Copies.Class.DeletedKept" xml:space="preserve"><value>Eliminate nella tenuta</value></data>
|
||||
<data name="Server.Copies.Class.DeletedKept" xml:space="preserve"><value>Eliminate in quella tenuta</value></data>
|
||||
<data name="Server.Copies.Class.DeletedOther" xml:space="preserve"><value>Eliminate nell'altra</value></data>
|
||||
<data name="Server.Copies.Class.None" xml:space="preserve"><value>Nessuna foto diversa.</value></data>
|
||||
<data name="Server.Copies.Policy.Label" xml:space="preserve"><value>Foto</value></data>
|
||||
|
||||
@@ -1206,8 +1206,8 @@
|
||||
<data name="Tooltips.Server.Copies.Class.Differs" xml:space="preserve"><value>Stesso nome e ora di scatto, file diversi. Unione tiene entrambe le versioni.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Class.Differs.ThisPcWins" xml:space="preserve"><value>Stesso nome e ora di scatto, file diversi. Il file di questo PC sostituisce quello del server, che va nel cestino.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Class.Differs.OtherWins" xml:space="preserve"><value>Stesso nome e ora di scatto, file diversi. Il file del server sostituisce quello di questo PC, che va nel cestino.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Class.Differs.KeptWins" xml:space="preserve"><value>Stesso nome e ora di scatto, file diversi. Il file della sequenza tenuta resta; quello dell'altra va nel cestino con lei.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Class.Differs.OtherCopyWins" xml:space="preserve"><value>Stesso nome e ora di scatto, file diversi. Il file dell'altra sequenza sostituisce quello della tenuta, che va nel cestino.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Class.Differs.KeptWins" xml:space="preserve"><value>Stesso nome e ora di scatto, file diversi. Il file della sequenza tenuta resta; quello dell'altra va nel cestino insieme a essa.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Class.Differs.OtherCopyWins" xml:space="preserve"><value>Stesso nome e ora di scatto, file diversi. Il file dell'altra sequenza sostituisce quello della sequenza tenuta, che va nel cestino.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Class.Differs.Choose" xml:space="preserve"><value>Stesso nome e ora di scatto, file diversi. Scegli per ogni foto; Lascia non cambia nulla.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Class.Differs.ChooseMerge" xml:space="preserve"><value>Stesso nome e ora di scatto, file diversi. Scegli per ogni foto: entrambe, quella tenuta o l'altra.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Class.Differs.Merge" xml:space="preserve"><value>Stesso nome e ora di scatto, file diversi. La sequenza tenuta conserva entrambe le versioni.</value></data>
|
||||
@@ -1230,6 +1230,10 @@
|
||||
<data name="Tooltips.Server.Copies.Detail" xml:space="preserve"><value>Il valore che prendono entrambe le sequenze.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.AllHere" xml:space="preserve"><value>Prende il valore di questo PC per ogni differenza.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.AllThere" xml:space="preserve"><value>Prende il valore di {0} per ogni differenza.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseHere" xml:space="preserve"><value>Prende il valore di questo PC: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseThere" xml:space="preserve"><value>Prende il valore di {0}: {1}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseKept" xml:space="preserve"><value>Prende il valore della sequenza tenuta: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseOther" xml:space="preserve"><value>Prende il valore dell'altra sequenza: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.AllKept" xml:space="preserve"><value>Prende il valore della sequenza tenuta per ogni differenza.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.AllOther" xml:space="preserve"><value>Prende il valore dell'altra sequenza per ogni differenza.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Projects.CopyAcross" xml:space="preserve"><value>Gli altri progetti di ogni lato compaiono nell'altra sede con la loro storia, rinominati se il nome è preso.</value></data>
|
||||
|
||||
@@ -804,6 +804,10 @@
|
||||
<data name="Tooltips.Server.Copies.Detail.AllKept" xml:space="preserve"><value>すべての相違点で残すシーケンスの値を採用します。</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.AllOther" xml:space="preserve"><value>すべての相違点でもう一方のシーケンスの値を採用します。</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.AllThere" xml:space="preserve"><value>すべての相違点で {0} の値を採用します。</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseHere" xml:space="preserve"><value>この PC の値を採用します: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseThere" xml:space="preserve"><value>{0} の値を採用します: {1}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseKept" xml:space="preserve"><value>残すシーケンスの値を採用します: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseOther" xml:space="preserve"><value>もう一方のシーケンスの値を採用します: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Drop" xml:space="preserve"><value>このバージョンを、それを保持する各側のごみ箱に移動します。</value></data>
|
||||
<data name="Tooltips.Server.Copies.InMain" xml:space="preserve"><value>メインのタイムラプスとレンダリングはこのバージョンを使用します。もう一方は除外されています。</value></data>
|
||||
<data name="Tooltips.Server.Copies.Find" xml:space="preserve"><value>{0} とこの PC で、これらのシーケンスの一致を今すぐ検索します。</value></data>
|
||||
|
||||
@@ -804,6 +804,10 @@
|
||||
<data name="Tooltips.Server.Copies.Detail.AllKept" xml:space="preserve"><value>모든 차이에 유지 시퀀스의 값을 사용합니다.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.AllOther" xml:space="preserve"><value>모든 차이에 다른 시퀀스의 값을 사용합니다.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.AllThere" xml:space="preserve"><value>모든 차이에 {0}의 값을 사용합니다.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseHere" xml:space="preserve"><value>이 PC의 값을 사용합니다: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseThere" xml:space="preserve"><value>{0}의 값을 사용합니다: {1}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseKept" xml:space="preserve"><value>유지 시퀀스의 값을 사용합니다: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseOther" xml:space="preserve"><value>다른 시퀀스의 값을 사용합니다: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Drop" xml:space="preserve"><value>이 버전을 보관하고 있는 각 쪽의 휴지통으로 이동합니다.</value></data>
|
||||
<data name="Tooltips.Server.Copies.InMain" xml:space="preserve"><value>기본의 타임랩스와 렌더링은 이 버전을 사용합니다. 다른 버전은 제외됩니다.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Find" xml:space="preserve"><value>지금 {0} 서버와 이 PC에서 이 시퀀스의 일치 항목을 찾습니다.</value></data>
|
||||
|
||||
@@ -822,6 +822,10 @@
|
||||
<data name="Tooltips.Server.Copies.Detail.AllKept" xml:space="preserve"><value>Kiekvienam skirtumui imti paliekamos sekos reikšmę.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.AllOther" xml:space="preserve"><value>Kiekvienam skirtumui imti kitos sekos reikšmę.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.AllThere" xml:space="preserve"><value>Kiekvienam skirtumui imti reikšmę iš {0}.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseHere" xml:space="preserve"><value>Imti šio kompiuterio reikšmę: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseThere" xml:space="preserve"><value>Imti reikšmę iš {0}: {1}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseKept" xml:space="preserve"><value>Imti paliekamos sekos reikšmę: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseOther" xml:space="preserve"><value>Imti kitos sekos reikšmę: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Drop" xml:space="preserve"><value>Perkelti šią versiją į kiekvienos ją turinčios pusės šiukšlinę.</value></data>
|
||||
<data name="Tooltips.Server.Copies.InMain" xml:space="preserve"><value>Pagrindinio laiko intervalų vaizdas ir atvaizdai naudoja šią versiją; kita neįtraukta.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Find" xml:space="preserve"><value>Dabar ieškoti šių sekų atitikmenų serveryje {0} ir šiame kompiuteryje.</value></data>
|
||||
|
||||
@@ -822,6 +822,10 @@
|
||||
<data name="Tooltips.Server.Copies.Detail.AllKept" xml:space="preserve"><value>Katrai atšķirībai ņemt paturētās secības vērtību.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.AllOther" xml:space="preserve"><value>Katrai atšķirībai ņemt otras secības vērtību.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.AllThere" xml:space="preserve"><value>Katrai atšķirībai ņemt vērtību no {0}.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseHere" xml:space="preserve"><value>Ņemt šī datora vērtību: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseThere" xml:space="preserve"><value>Ņemt vērtību no {0}: {1}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseKept" xml:space="preserve"><value>Ņemt paturētās secības vērtību: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseOther" xml:space="preserve"><value>Ņemt otras secības vērtību: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Drop" xml:space="preserve"><value>Pārvietot šo versiju uz katras puses atkritni, kurā tā ir.</value></data>
|
||||
<data name="Tooltips.Server.Copies.InMain" xml:space="preserve"><value>Galvenā laika intervāla video un renderējumi izmanto šo versiju; otra ir izslēgta.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Find" xml:space="preserve"><value>Tagad meklēt šo secību atbilstības serverī {0} un šajā datorā.</value></data>
|
||||
|
||||
@@ -804,6 +804,10 @@
|
||||
<data name="Tooltips.Server.Copies.Detail.AllKept" xml:space="preserve"><value>Ambil nilai jujukan yang dikekalkan bagi setiap perbezaan.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.AllOther" xml:space="preserve"><value>Ambil nilai jujukan lain bagi setiap perbezaan.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.AllThere" xml:space="preserve"><value>Ambil nilai {0} bagi setiap perbezaan.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseHere" xml:space="preserve"><value>Ambil nilai PC ini: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseThere" xml:space="preserve"><value>Ambil nilai {0}: {1}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseKept" xml:space="preserve"><value>Ambil nilai jujukan yang dikekalkan: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseOther" xml:space="preserve"><value>Ambil nilai jujukan lain: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Drop" xml:space="preserve"><value>Pindahkan versi ini ke tong sampah setiap pihak yang menyimpannya.</value></data>
|
||||
<data name="Tooltips.Server.Copies.InMain" xml:space="preserve"><value>Selang masa dan render Utama menggunakan versi ini; versi lain dikecualikan.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Find" xml:space="preserve"><value>Cari padanan jujukan ini pada {0} dan pada PC ini sekarang.</value></data>
|
||||
|
||||
@@ -804,6 +804,10 @@
|
||||
<data name="Tooltips.Server.Copies.Detail.AllKept" xml:space="preserve"><value>Bruk verdien fra den beholdte sekvensen for alle forskjeller.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.AllOther" xml:space="preserve"><value>Bruk verdien fra den andre sekvensen for alle forskjeller.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.AllThere" xml:space="preserve"><value>Bruk verdien fra {0} for alle forskjeller.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseHere" xml:space="preserve"><value>Bruk verdien fra denne PC-en: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseThere" xml:space="preserve"><value>Bruk verdien fra {0}: {1}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseKept" xml:space="preserve"><value>Bruk verdien fra den beholdte sekvensen: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseOther" xml:space="preserve"><value>Bruk verdien fra den andre sekvensen: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Drop" xml:space="preserve"><value>Flytt denne versjonen til papirkurven på hver side som har den.</value></data>
|
||||
<data name="Tooltips.Server.Copies.InMain" xml:space="preserve"><value>Hoveds timelapse og gjengivelser bruker denne versjonen; den andre er utelatt.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Find" xml:space="preserve"><value>Søk etter samsvar for disse sekvensene på {0} og på denne PC-en nå.</value></data>
|
||||
|
||||
@@ -804,6 +804,10 @@
|
||||
<data name="Tooltips.Server.Copies.Detail.AllKept" xml:space="preserve"><value>Neem voor elk verschil de waarde van de behouden reeks.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.AllOther" xml:space="preserve"><value>Neem voor elk verschil de waarde van de andere reeks.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.AllThere" xml:space="preserve"><value>Neem voor elk verschil de waarde van {0}.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseHere" xml:space="preserve"><value>Neem de waarde van deze pc: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseThere" xml:space="preserve"><value>Neem de waarde van {0}: {1}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseKept" xml:space="preserve"><value>Neem de waarde van de behouden reeks: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseOther" xml:space="preserve"><value>Neem de waarde van de andere reeks: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Drop" xml:space="preserve"><value>Verplaats deze versie naar de prullenbak van elke kant die haar heeft.</value></data>
|
||||
<data name="Tooltips.Server.Copies.InMain" xml:space="preserve"><value>De timelapse en renders van Hoofd gebruiken deze versie; de andere is uitgesloten.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Find" xml:space="preserve"><value>Zoek nu naar overeenkomsten van deze reeksen op {0} en op deze pc.</value></data>
|
||||
|
||||
@@ -840,6 +840,10 @@
|
||||
<data name="Tooltips.Server.Copies.Detail.AllKept" xml:space="preserve"><value>Przyjmij wartość zachowanej sekwencji dla każdej różnicy.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.AllOther" xml:space="preserve"><value>Przyjmij wartość drugiej sekwencji dla każdej różnicy.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.AllThere" xml:space="preserve"><value>Przyjmij wartość z {0} dla każdej różnicy.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseHere" xml:space="preserve"><value>Przyjmij wartość z tego komputera: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseThere" xml:space="preserve"><value>Przyjmij wartość z {0}: {1}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseKept" xml:space="preserve"><value>Przyjmij wartość zachowanej sekwencji: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseOther" xml:space="preserve"><value>Przyjmij wartość drugiej sekwencji: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Drop" xml:space="preserve"><value>Przenieś tę wersję do kosza po każdej stronie, która ją ma.</value></data>
|
||||
<data name="Tooltips.Server.Copies.InMain" xml:space="preserve"><value>Timelapse i rendery projektu Główny używają tej wersji; druga jest wykluczona.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Find" xml:space="preserve"><value>Wyszukaj teraz dopasowania tych sekwencji na {0} i na tym komputerze.</value></data>
|
||||
|
||||
@@ -804,6 +804,10 @@
|
||||
<data name="Tooltips.Server.Copies.Detail.AllKept" xml:space="preserve"><value>Usa o valor da sequência mantida em todas as diferenças.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.AllOther" xml:space="preserve"><value>Usa o valor da outra sequência em todas as diferenças.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.AllThere" xml:space="preserve"><value>Usa o valor de {0} em todas as diferenças.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseHere" xml:space="preserve"><value>Usa o valor deste PC: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseThere" xml:space="preserve"><value>Usa o valor de {0}: {1}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseKept" xml:space="preserve"><value>Usa o valor da sequência mantida: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseOther" xml:space="preserve"><value>Usa o valor da outra sequência: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Drop" xml:space="preserve"><value>Move esta versão para a lixeira de cada lado que a tem.</value></data>
|
||||
<data name="Tooltips.Server.Copies.InMain" xml:space="preserve"><value>O time-lapse e as renderizações do Principal usam esta versão; a outra está excluída.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Find" xml:space="preserve"><value>Procura agora correspondências destas sequências em {0} e neste PC.</value></data>
|
||||
|
||||
@@ -804,6 +804,10 @@
|
||||
<data name="Tooltips.Server.Copies.Detail.AllKept" xml:space="preserve"><value>Usar o valor da sequência mantida em todas as diferenças.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.AllOther" xml:space="preserve"><value>Usar o valor da outra sequência em todas as diferenças.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.AllThere" xml:space="preserve"><value>Usar o valor de {0} em todas as diferenças.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseHere" xml:space="preserve"><value>Usar o valor deste PC: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseThere" xml:space="preserve"><value>Usar o valor de {0}: {1}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseKept" xml:space="preserve"><value>Usar o valor da sequência mantida: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseOther" xml:space="preserve"><value>Usar o valor da outra sequência: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Drop" xml:space="preserve"><value>Mover esta versão para o lixo de cada lado que a contém.</value></data>
|
||||
<data name="Tooltips.Server.Copies.InMain" xml:space="preserve"><value>O time-lapse e as renderizações do Principal usam esta versão; a outra está excluída.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Find" xml:space="preserve"><value>Procurar agora correspondências destas sequências em {0} e neste PC.</value></data>
|
||||
|
||||
@@ -822,6 +822,10 @@
|
||||
<data name="Tooltips.Server.Copies.Detail.AllKept" xml:space="preserve"><value>Preluați valoarea secvenței păstrate pentru fiecare diferență.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.AllOther" xml:space="preserve"><value>Preluați valoarea celeilalte secvențe pentru fiecare diferență.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.AllThere" xml:space="preserve"><value>Preluați valoarea din {0} pentru fiecare diferență.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseHere" xml:space="preserve"><value>Preluați valoarea acestui PC: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseThere" xml:space="preserve"><value>Preluați valoarea din {0}: {1}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseKept" xml:space="preserve"><value>Preluați valoarea secvenței păstrate: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseOther" xml:space="preserve"><value>Preluați valoarea celeilalte secvențe: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Drop" xml:space="preserve"><value>Mutați această versiune în coșul de gunoi al fiecărei părți care o deține.</value></data>
|
||||
<data name="Tooltips.Server.Copies.InMain" xml:space="preserve"><value>Time-lapse-ul și randările din Principal folosesc această versiune; cealaltă este exclusă.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Find" xml:space="preserve"><value>Căutați acum corespondențe ale acestor secvențe pe {0} și pe acest PC.</value></data>
|
||||
|
||||
@@ -840,6 +840,10 @@
|
||||
<data name="Tooltips.Server.Copies.Detail.AllKept" xml:space="preserve"><value>Взять значение сохраняемой серии для всех различий.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.AllOther" xml:space="preserve"><value>Взять значение другой серии для всех различий.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.AllThere" xml:space="preserve"><value>Взять значение из {0} для всех различий.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseHere" xml:space="preserve"><value>Взять значение этого ПК: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseThere" xml:space="preserve"><value>Взять значение из {0}: {1}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseKept" xml:space="preserve"><value>Взять значение сохраняемой серии: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseOther" xml:space="preserve"><value>Взять значение другой серии: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Drop" xml:space="preserve"><value>Переместить эту версию в корзину на каждой стороне, где она есть.</value></data>
|
||||
<data name="Tooltips.Server.Copies.InMain" xml:space="preserve"><value>Таймлапс и рендеры Основного используют эту версию; другая исключена.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Find" xml:space="preserve"><value>Найти сейчас совпадения этих серий на сервере «{0}» и на этом ПК.</value></data>
|
||||
|
||||
@@ -822,6 +822,10 @@
|
||||
<data name="Tooltips.Server.Copies.Detail.AllKept" xml:space="preserve"><value>Použije hodnotu ponechanej sekvencie pre každý rozdiel.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.AllOther" xml:space="preserve"><value>Použije hodnotu druhej sekvencie pre každý rozdiel.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.AllThere" xml:space="preserve"><value>Použije hodnotu z {0} pre každý rozdiel.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseHere" xml:space="preserve"><value>Použije hodnotu tohto počítača: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseThere" xml:space="preserve"><value>Použije hodnotu z {0}: {1}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseKept" xml:space="preserve"><value>Použije hodnotu ponechanej sekvencie: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseOther" xml:space="preserve"><value>Použije hodnotu druhej sekvencie: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Drop" xml:space="preserve"><value>Presunie túto verziu do koša na každej strane, ktorá ju má.</value></data>
|
||||
<data name="Tooltips.Server.Copies.InMain" xml:space="preserve"><value>Časozber a rendery Hlavného používajú túto verziu; druhá je vylúčená.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Find" xml:space="preserve"><value>Teraz vyhľadá zhody týchto sekvencií na serveri {0} a na tomto počítači.</value></data>
|
||||
|
||||
@@ -822,6 +822,10 @@
|
||||
<data name="Tooltips.Server.Copies.Detail.AllKept" xml:space="preserve"><value>Prevzemi vrednost ohranjene sekvence za vsako razliko.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.AllOther" xml:space="preserve"><value>Prevzemi vrednost druge sekvence za vsako razliko.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.AllThere" xml:space="preserve"><value>Prevzemi vrednost strežnika {0} za vsako razliko.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseHere" xml:space="preserve"><value>Prevzemi vrednost tega računalnika: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseThere" xml:space="preserve"><value>Prevzemi vrednost strežnika {0}: {1}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseKept" xml:space="preserve"><value>Prevzemi vrednost ohranjene sekvence: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseOther" xml:space="preserve"><value>Prevzemi vrednost druge sekvence: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Drop" xml:space="preserve"><value>Premakni to različico v koš vsake strani, ki jo ima.</value></data>
|
||||
<data name="Tooltips.Server.Copies.InMain" xml:space="preserve"><value>Časovni zamik in upodobitve Glavnega uporabljajo to različico; druga je izključena.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Find" xml:space="preserve"><value>Zdaj poišči ujemanja teh sekvenc na strežniku {0} in v tem računalniku.</value></data>
|
||||
|
||||
@@ -804,6 +804,10 @@
|
||||
<data name="Tooltips.Server.Copies.Detail.AllKept" xml:space="preserve"><value>Använd den behållna sekvensens värde för varje skillnad.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.AllOther" xml:space="preserve"><value>Använd den andra sekvensens värde för varje skillnad.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.AllThere" xml:space="preserve"><value>Använd värdet från {0} för varje skillnad.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseHere" xml:space="preserve"><value>Använd den här datorns värde: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseThere" xml:space="preserve"><value>Använd värdet från {0}: {1}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseKept" xml:space="preserve"><value>Använd den behållna sekvensens värde: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseOther" xml:space="preserve"><value>Använd den andra sekvensens värde: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Drop" xml:space="preserve"><value>Flytta den här versionen till papperskorgen på varje sida som har den.</value></data>
|
||||
<data name="Tooltips.Server.Copies.InMain" xml:space="preserve"><value>Huvudprojektets timelapse och renderingar använder den här versionen; den andra är utesluten.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Find" xml:space="preserve"><value>Sök efter matchningar för de här sekvenserna på {0} och på den här datorn nu.</value></data>
|
||||
|
||||
@@ -804,6 +804,10 @@
|
||||
<data name="Tooltips.Server.Copies.Detail.AllKept" xml:space="preserve"><value>ใช้ค่าของซีเควนซ์ที่เก็บไว้สำหรับทุกความแตกต่าง</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.AllOther" xml:space="preserve"><value>ใช้ค่าของอีกซีเควนซ์สำหรับทุกความแตกต่าง</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.AllThere" xml:space="preserve"><value>ใช้ค่าของ {0} สำหรับทุกความแตกต่าง</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseHere" xml:space="preserve"><value>ใช้ค่าของพีซีเครื่องนี้: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseThere" xml:space="preserve"><value>ใช้ค่าของ {0}: {1}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseKept" xml:space="preserve"><value>ใช้ค่าของซีเควนซ์ที่เก็บไว้: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseOther" xml:space="preserve"><value>ใช้ค่าของอีกซีเควนซ์: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Drop" xml:space="preserve"><value>ย้ายเวอร์ชันนี้ไปที่ถังขยะของทุกฝั่งที่มีเวอร์ชันนี้</value></data>
|
||||
<data name="Tooltips.Server.Copies.InMain" xml:space="preserve"><value>ไทม์แลปส์และการเรนเดอร์ของหลักใช้เวอร์ชันนี้ อีกเวอร์ชันถูกยกเว้น</value></data>
|
||||
<data name="Tooltips.Server.Copies.Find" xml:space="preserve"><value>ค้นหารายการที่ตรงกันของซีเควนซ์เหล่านี้บน {0} และบนพีซีเครื่องนี้ทันที</value></data>
|
||||
|
||||
@@ -804,6 +804,10 @@
|
||||
<data name="Tooltips.Server.Copies.Detail.AllKept" xml:space="preserve"><value>Her fark için korunan sekansın değerini alır.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.AllOther" xml:space="preserve"><value>Her fark için diğer sekansın değerini alır.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.AllThere" xml:space="preserve"><value>Her fark için {0} sunucusunun değerini alır.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseHere" xml:space="preserve"><value>Bu bilgisayarın değerini alır: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseThere" xml:space="preserve"><value>{0} sunucusunun değerini alır: {1}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseKept" xml:space="preserve"><value>Korunan sekansın değerini alır: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseOther" xml:space="preserve"><value>Diğer sekansın değerini alır: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Drop" xml:space="preserve"><value>Bu sürümü, onu tutan her tarafın çöp kutusuna taşır.</value></data>
|
||||
<data name="Tooltips.Server.Copies.InMain" xml:space="preserve"><value>Ana projenin hızlandırılmış videosu ve çıktıları bu sürümü kullanır; diğeri hariç tutulur.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Find" xml:space="preserve"><value>Bu sekansların eşleşmelerini şimdi {0} sunucusunda ve bu bilgisayarda arar.</value></data>
|
||||
|
||||
@@ -840,6 +840,10 @@
|
||||
<data name="Tooltips.Server.Copies.Detail.AllKept" xml:space="preserve"><value>Взяти значення залишеної послідовності для кожної відмінності.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.AllOther" xml:space="preserve"><value>Взяти значення іншої послідовності для кожної відмінності.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.AllThere" xml:space="preserve"><value>Взяти значення {0} для кожної відмінності.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseHere" xml:space="preserve"><value>Взяти значення цього ПК: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseThere" xml:space="preserve"><value>Взяти значення {0}: {1}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseKept" xml:space="preserve"><value>Взяти значення залишеної послідовності: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseOther" xml:space="preserve"><value>Взяти значення іншої послідовності: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Drop" xml:space="preserve"><value>Перемістити цю версію до кошика кожного боку, де вона є.</value></data>
|
||||
<data name="Tooltips.Server.Copies.InMain" xml:space="preserve"><value>Таймлапс і рендери Основного використовують цю версію; інша виключена.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Find" xml:space="preserve"><value>Зараз шукати збіги цих послідовностей на {0} і на цьому ПК.</value></data>
|
||||
|
||||
@@ -804,6 +804,10 @@
|
||||
<data name="Tooltips.Server.Copies.Detail.AllKept" xml:space="preserve"><value>Lấy giá trị của chuỗi giữ lại cho mọi khác biệt.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.AllOther" xml:space="preserve"><value>Lấy giá trị của chuỗi kia cho mọi khác biệt.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.AllThere" xml:space="preserve"><value>Lấy giá trị của {0} cho mọi khác biệt.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseHere" xml:space="preserve"><value>Lấy giá trị của máy tính này: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseThere" xml:space="preserve"><value>Lấy giá trị của {0}: {1}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseKept" xml:space="preserve"><value>Lấy giá trị của chuỗi giữ lại: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseOther" xml:space="preserve"><value>Lấy giá trị của chuỗi kia: {0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Drop" xml:space="preserve"><value>Chuyển phiên bản này vào thùng rác của mỗi bên đang giữ nó.</value></data>
|
||||
<data name="Tooltips.Server.Copies.InMain" xml:space="preserve"><value>Time-lapse và bản kết xuất của Chính dùng phiên bản này; phiên bản kia bị loại trừ.</value></data>
|
||||
<data name="Tooltips.Server.Copies.Find" xml:space="preserve"><value>Tìm ngay các cặp tương ứng của những chuỗi ảnh này trên {0} và trên máy tính này.</value></data>
|
||||
|
||||
@@ -804,6 +804,10 @@
|
||||
<data name="Tooltips.Server.Copies.Detail.AllKept" xml:space="preserve"><value>对每处差异采用保留序列的值。</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.AllOther" xml:space="preserve"><value>对每处差异采用另一个序列的值。</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.AllThere" xml:space="preserve"><value>对每处差异采用 {0} 的值。</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseHere" xml:space="preserve"><value>采用此电脑的值:{0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseThere" xml:space="preserve"><value>采用 {0} 的值:{1}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseKept" xml:space="preserve"><value>采用保留序列的值:{0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseOther" xml:space="preserve"><value>采用另一个序列的值:{0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Drop" xml:space="preserve"><value>将此版本移到持有它的每一端的回收站。</value></data>
|
||||
<data name="Tooltips.Server.Copies.InMain" xml:space="preserve"><value>主项目的延时视频和渲染使用此版本;另一个已排除。</value></data>
|
||||
<data name="Tooltips.Server.Copies.Find" xml:space="preserve"><value>立即在 {0} 和此电脑上查找这些序列的匹配项。</value></data>
|
||||
|
||||
@@ -804,6 +804,10 @@
|
||||
<data name="Tooltips.Server.Copies.Detail.AllKept" xml:space="preserve"><value>對每項差異採用保留序列的值。</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.AllOther" xml:space="preserve"><value>對每項差異採用另一個序列的值。</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.AllThere" xml:space="preserve"><value>對每項差異採用 {0} 的值。</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseHere" xml:space="preserve"><value>採用此電腦的值:{0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseThere" xml:space="preserve"><value>採用 {0} 的值:{1}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseKept" xml:space="preserve"><value>採用保留序列的值:{0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Detail.UseOther" xml:space="preserve"><value>採用另一個序列的值:{0}</value></data>
|
||||
<data name="Tooltips.Server.Copies.Drop" xml:space="preserve"><value>將此版本移至持有它的每一端的垃圾桶。</value></data>
|
||||
<data name="Tooltips.Server.Copies.InMain" xml:space="preserve"><value>主要專案的縮時影片和算繪使用此版本;另一個已排除。</value></data>
|
||||
<data name="Tooltips.Server.Copies.Find" xml:space="preserve"><value>立即在 {0} 和此電腦上尋找這些序列的相符項目。</value></data>
|
||||
|
||||
@@ -8,9 +8,16 @@ using Chronos.Data.Sync;
|
||||
|
||||
namespace Chronos.App.DesignTime;
|
||||
|
||||
/// <summary>One sample pair: the pair, both sides, the photos of each class, the details that differ and the projects.</summary>
|
||||
/// <summary>
|
||||
/// One sample pair: the pair, both sides, the photos of each class, the details that differ and the projects; the photos
|
||||
/// each side's Main leaves out (of a photo kept in two versions, the one it does not use).
|
||||
/// </summary>
|
||||
internal sealed record SampleCopy(FoundCopy Copy, CopyFacts Here, CopyFacts There, IReadOnlyList<ComparedPhoto> Photos,
|
||||
IReadOnlyList<DetailLine> Details, CopyProjectsView Projects, Guid? PreselectedKeep = null);
|
||||
IReadOnlyList<DetailLine> Details, CopyProjectsView Projects, Guid? PreselectedKeep = null)
|
||||
{
|
||||
public IReadOnlySet<string> ExcludedHere { get; init; } = new HashSet<string>(StringComparer.Ordinal);
|
||||
public IReadOnlySet<string> ExcludedThere { get; init; } = new HashSet<string>(StringComparer.Ordinal);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The matches engine of the screenshots and the App tests (owner review 6, #73, design §8.7): pairs held in memory over the
|
||||
@@ -51,11 +58,17 @@ internal sealed class SampleCopyEngine : ICopyEngine
|
||||
/// </summary>
|
||||
internal Action WithManyProjects(Guid copyId, int count)
|
||||
{
|
||||
var at = _pairs.FindIndex(p => p.Copy.Id == copyId);
|
||||
var saved = _pairs[at];
|
||||
IReadOnlyList<ProjectLine> Lines(string suffix, int days) =>
|
||||
[SampleCopies.Project("Main", true, 2, days), .. Enumerable.Range(1, count - 1).Select(i => SampleCopies.Project($"Cut {i:00}{suffix}", false, 1 + i % 3, days + i))];
|
||||
_pairs[at] = saved with { Projects = saved.Projects with { Here = Lines(string.Empty, 1), There = Lines(" NAS", 3) } };
|
||||
return With(copyId, saved => saved with { Projects = saved.Projects with { Here = Lines(string.Empty, 1), There = Lines(" NAS", 3) } });
|
||||
}
|
||||
|
||||
/// <summary>Changes pair <paramref name="copyId"/> for a while (tests); the returned action puts its own back.</summary>
|
||||
internal Action With(Guid copyId, Func<SampleCopy, SampleCopy> change)
|
||||
{
|
||||
var at = _pairs.FindIndex(p => p.Copy.Id == copyId);
|
||||
var saved = _pairs[at];
|
||||
_pairs[at] = change(saved);
|
||||
return () => _pairs[at] = saved;
|
||||
}
|
||||
|
||||
@@ -80,7 +93,11 @@ internal sealed class SampleCopyEngine : ICopyEngine
|
||||
var renders = new CopyRendersView(2, 1, 1, 180_000_000, 90_000_000);
|
||||
var can = new CopyCapabilities(Integrate: true, LinkOnly: pair.Copy is { Kind: CopyKind.LocalServer, State: CopyState.Candidate }, DeleteThere: true, []);
|
||||
return Task.FromResult(new CopyReview(pair.Copy, pair.Here, pair.There, new CopyComparisonResult(pair.Photos, totals, pair.Copy.Score),
|
||||
pair.Details, pair.Projects, renders, can));
|
||||
pair.Details, pair.Projects, renders, can)
|
||||
{
|
||||
ExcludedHere = pair.ExcludedHere,
|
||||
ExcludedThere = pair.ExcludedThere,
|
||||
});
|
||||
}
|
||||
|
||||
public Task<IntegratePlan> PlanIntegrateAsync(Guid copyId, ISyncRemote remote, IntegrateChoices choices, CancellationToken ct)
|
||||
@@ -159,9 +176,13 @@ internal sealed class SampleCopyEngine : ICopyEngine
|
||||
|
||||
public Task UnlinkAsync(Guid copyId, ISyncRemote? remote, CancellationToken ct) => Change(copyId, c => c with { State = CopyState.KeptApart, PreviousState = c.State });
|
||||
|
||||
public Task<TrashHerePlan> PlanTrashHereAsync(Guid copyId, IReadOnlyCollection<string> photoKeys, CancellationToken ct) =>
|
||||
Task.FromResult(new TrashHerePlan(new FrameDeletePlan(new Sequence { Id = Pair(copyId).Copy.LocalId, ArchiveId = Guid.Empty, Folder = string.Empty }, [], 0, []),
|
||||
[]));
|
||||
public Task<TrashHerePlan> PlanTrashHereAsync(Guid copyId, Guid fromSequence, IReadOnlyCollection<string> photoKeys, CancellationToken ct)
|
||||
{
|
||||
var copy = Pair(copyId).Copy;
|
||||
if (fromSequence != copy.LocalId && fromSequence != copy.OtherId)
|
||||
throw new ArgumentException($"Sequence {fromSequence} is not a side of pair {copyId}.", nameof(fromSequence));
|
||||
return Task.FromResult(new TrashHerePlan(new FrameDeletePlan(new Sequence { Id = fromSequence, ArchiveId = Guid.Empty, Folder = string.Empty }, [], 0, []), []));
|
||||
}
|
||||
|
||||
public Task<DropVersionPlan> PlanDropVersionAsync(Guid copyId, string key, ISyncRemote? remote, CancellationToken ct)
|
||||
{
|
||||
@@ -185,7 +206,7 @@ internal sealed class SampleCopyEngine : ICopyEngine
|
||||
|
||||
public Task<IReadOnlyList<FoundCopy>> ListAllPairsAsync(CancellationToken ct) => Task.FromResult<IReadOnlyList<FoundCopy>>([.. _pairs.Select(p => p.Copy)]);
|
||||
|
||||
public Task<int> TrashHereAsync(Guid copyId, FrameDeletePlan plan, ISyncRemote? remote, CancellationToken ct) => Task.FromResult(plan.Frames.Count);
|
||||
public Task<int> TrashHereAsync(Guid copyId, TrashHerePlan plan, ISyncRemote? remote, CancellationToken ct) => Task.FromResult(plan.Plan.Frames.Count);
|
||||
|
||||
public Task<TrashTherePlan> PlanTrashThereAsync(Guid copyId, ISyncRemote remote, IReadOnlyCollection<string> photoKeys, CancellationToken ct)
|
||||
{
|
||||
@@ -202,9 +223,10 @@ internal sealed class SampleCopyEngine : ICopyEngine
|
||||
public async Task<IReadOnlyList<CopyTwin>> TwinsAsync(CancellationToken ct)
|
||||
{
|
||||
IReadOnlyList<CopyTwin> more = MoreTwins is { } read ? await read() : [];
|
||||
// Each home's projects as the pair lists them: Main pairs with Main; a project only one home has is no twin.
|
||||
return [.. _pairs.Where(p => p.Copy is { Kind: CopyKind.LocalServer, State: CopyState.Integrated or CopyState.Linked })
|
||||
.Select(p => new CopyTwin(p.Copy.Id, p.Copy.LocalId, p.Here.Where, "Main", p.Copy.Server ?? string.Empty, p.Copy.RemoteId ?? Guid.Empty, "Vertical",
|
||||
p.There.Where)), .. more];
|
||||
.Select(p => new CopyTwin(p.Copy.Id, p.Copy.LocalId, p.Here.Where, [.. p.Projects.Here.Select(l => l.Name)], p.Copy.Server ?? string.Empty,
|
||||
p.Copy.RemoteId ?? Guid.Empty, [.. p.Projects.There.Select(l => l.Name)], p.There.Where, AppEnvironment.SamplePcName)), .. more];
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -386,15 +386,21 @@ public sealed class SampleData
|
||||
// (4) Alps 2025 twice on this PC: the copy downloaded into the server's originals archive is kept.
|
||||
var alps = await SequenceAsync("Alps 2025", main.Id, 940, new DateTime(2025, 7, 14, 5, 30, 0), "Canon EOS R5");
|
||||
var alpsNas = await SequenceAsync("Alps 2025", originals.Id, 902, new DateTime(2025, 7, 14, 5, 30, 0), "Canon EOS R5");
|
||||
// Both copies keep both versions of one photo (as the comparer finds them); each Main uses another one.
|
||||
var versions = SampleCopies.Photos(PhotoClass.Versions, 2, start, 938, true, true, "IMG_V").ToList();
|
||||
photos =
|
||||
[
|
||||
.. SampleCopies.Photos(PhotoClass.Same, 900, start, 0, true, true),
|
||||
.. SampleCopies.Photos(PhotoClass.OnlyHere, 38, start, 900, true, false),
|
||||
.. SampleCopies.Photos(PhotoClass.Versions, 2, start, 938, true, false, "IMG_V"),
|
||||
.. versions,
|
||||
];
|
||||
engine.Add(new SampleCopy(Copy(alps, CopyKind.LocalLocal, CopyState.Candidate, photos, other: alpsNas.Id),
|
||||
SampleCopies.Facts(alps, main.Name, 940), SampleCopies.Facts(alpsNas, originals.Name, 902, originals: true, servers: [ServerName]), photos,
|
||||
[new DetailLine("sequence.rating", "5", "4")], Projects(other: true), PreselectedKeep: alpsNas.Id));
|
||||
[new DetailLine("sequence.rating", "5", "4")], Projects(other: true), PreselectedKeep: alpsNas.Id)
|
||||
{
|
||||
ExcludedHere = new HashSet<string>([versions[1].Key], StringComparer.Ordinal),
|
||||
ExcludedThere = new HashSet<string>([versions[0].Key], StringComparer.Ordinal),
|
||||
});
|
||||
|
||||
// (5) Garden 2026: the server deleted its copy.
|
||||
var garden = await SequenceAsync("Garden 2026", main.Id, 480, new DateTime(2026, 5, 2, 6, 0, 0), "Canon EOS R6");
|
||||
@@ -407,7 +413,7 @@ public sealed class SampleData
|
||||
var workspace = _services.Workspace;
|
||||
engine.MoreTwins = async () => !workspace.IsAvailable ? []
|
||||
: [.. (await workspace.ListAsync()).Where(e => !e.IsServerHome).Take(1)
|
||||
.Select(e => new CopyTwin(Guid.Empty, e.SequenceId, main.Name, e.Name, server, Guid.Empty, "Main", ServerName))];
|
||||
.Select(e => new CopyTwin(Guid.Empty, e.SequenceId, main.Name, [e.Name], server, Guid.Empty, [e.Name], ServerName, AppEnvironment.SamplePcName))];
|
||||
_services.Sync.Copies = engine;
|
||||
return engine;
|
||||
}
|
||||
|
||||
@@ -350,8 +350,9 @@ public sealed class SequencePickerViewModel : LocalizedViewModel
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Marks the projects whose time-lapse (a linked or integrated match) has a workspace project at the other home too
|
||||
/// (owner review 6, #73): a muted Twin chip, "Also at {home}: {project}".
|
||||
/// Marks the projects whose time-lapse (a linked or integrated match) has their sibling at the other home (owner review
|
||||
/// 6, #73; BRIEF §12.3): the same project name there, or the name Copy across gave it. A muted Twin chip, "Also at
|
||||
/// {home}: {project}", naming that sibling; a project with none at the other home is not a twin.
|
||||
/// </summary>
|
||||
private async Task MarkTwinsAsync(IReadOnlyList<WorkspaceProjectItem> items)
|
||||
{
|
||||
@@ -361,14 +362,16 @@ public sealed class SequencePickerViewModel : LocalizedViewModel
|
||||
var twins = await copies.TwinsAsync(CancellationToken.None);
|
||||
foreach (var item in items)
|
||||
{
|
||||
var twin = item.Entry.IsServerHome
|
||||
? twins.FirstOrDefault(t => t.RemoteId == item.SequenceId && t.LocalProject is not null)
|
||||
: twins.FirstOrDefault(t => t.LocalId == item.SequenceId && t.ServerProject is not null);
|
||||
if (twin is null) continue;
|
||||
var server = string.Equals(twin.Server, Shell.Services.Sync.Server, StringComparison.OrdinalIgnoreCase)
|
||||
? Shell.Services.Server.Flow.Info?.Name ?? twin.ServerName : twin.ServerName;
|
||||
if (item.Entry.IsServerHome) item.SetTwin(twin.LocalHome, twin.LocalProject);
|
||||
else item.SetTwin(server, twin.ServerProject);
|
||||
var atServer = item.Entry.IsServerHome;
|
||||
foreach (var twin in twins.Where(t => atServer ? t.RemoteId == item.SequenceId : t.LocalId == item.SequenceId))
|
||||
{
|
||||
var server = string.Equals(twin.Server, Shell.Services.Sync.Server, StringComparison.OrdinalIgnoreCase)
|
||||
? Shell.Services.Server.Flow.Info?.Name ?? twin.ServerName : twin.ServerName;
|
||||
if (twin.CounterpartOf(item.Entry.Name, atServer, server) is not { } sibling) continue;
|
||||
if (atServer) item.SetTwin(twin.LocalHome, sibling);
|
||||
else item.SetTwin(server, sibling);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex) when (ex is IOException or InvalidOperationException or DatabaseException)
|
||||
|
||||
@@ -78,6 +78,10 @@
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
<Setter Property="Typography.NumeralAlignment" Value="Tabular" />
|
||||
</Style>
|
||||
<!-- A choice's label: a translation longer than its box ends in an ellipsis, never clipped mid-letter. -->
|
||||
<DataTemplate x:Key="Template.OptionLabel">
|
||||
<TextBlock Text="{Binding Label}" TextTrimming="CharacterEllipsis" />
|
||||
</DataTemplate>
|
||||
</UserControl.Resources>
|
||||
|
||||
<Grid Margin="20,16,20,16">
|
||||
@@ -682,7 +686,7 @@
|
||||
AutomationProperties.Name="{l:Loc Settings.Server.Default}" FlowDirection="LeftToRight" />
|
||||
</HeaderedContentControl>
|
||||
<HeaderedContentControl Style="{StaticResource Setting.Row}" Header="{l:Loc Settings.Server.CopyLinking}">
|
||||
<ComboBox Width="170" HorizontalAlignment="Left" ItemsSource="{Binding CopyRows.LinkingOptions}" SelectedItem="{Binding CopyRows.Linking}" DisplayMemberPath="Label"
|
||||
<ComboBox Width="240" HorizontalAlignment="Left" ItemsSource="{Binding CopyRows.LinkingOptions}" SelectedItem="{Binding CopyRows.Linking}" ItemTemplate="{StaticResource Template.OptionLabel}"
|
||||
ToolTip="{l:Loc Tooltips.Settings.CopyLinking}" AutomationProperties.Name="{l:Loc Settings.Server.CopyLinking}">
|
||||
<ComboBox.ItemContainerStyle>
|
||||
<Style TargetType="ComboBoxItem" BasedOn="{StaticResource {x:Type ComboBoxItem}}">
|
||||
@@ -692,7 +696,7 @@
|
||||
</ComboBox>
|
||||
</HeaderedContentControl>
|
||||
<HeaderedContentControl Style="{StaticResource Setting.Row}" Header="{l:Loc Settings.Server.CopyPhotos}">
|
||||
<ComboBox Width="170" HorizontalAlignment="Left" ItemsSource="{Binding CopyRows.PhotoOptions}" SelectedItem="{Binding CopyRows.PhotoPolicy}" DisplayMemberPath="Label"
|
||||
<ComboBox Width="240" HorizontalAlignment="Left" ItemsSource="{Binding CopyRows.PhotoOptions}" SelectedItem="{Binding CopyRows.PhotoPolicy}" ItemTemplate="{StaticResource Template.OptionLabel}"
|
||||
ToolTip="{l:Loc Tooltips.Settings.CopyPhotos}" AutomationProperties.Name="{l:Loc Settings.Server.CopyPhotos}">
|
||||
<ComboBox.ItemContainerStyle>
|
||||
<Style TargetType="ComboBoxItem" BasedOn="{StaticResource {x:Type ComboBoxItem}}">
|
||||
@@ -702,7 +706,7 @@
|
||||
</ComboBox>
|
||||
</HeaderedContentControl>
|
||||
<HeaderedContentControl Style="{StaticResource Setting.Row}" Header="{l:Loc Settings.Server.CopyProjects}">
|
||||
<ComboBox Width="170" HorizontalAlignment="Left" ItemsSource="{Binding CopyRows.ProjectOptions}" SelectedItem="{Binding CopyRows.ProjectsChoice}" DisplayMemberPath="Label"
|
||||
<ComboBox Width="240" HorizontalAlignment="Left" ItemsSource="{Binding CopyRows.ProjectOptions}" SelectedItem="{Binding CopyRows.ProjectsChoice}" ItemTemplate="{StaticResource Template.OptionLabel}"
|
||||
ToolTip="{l:Loc Tooltips.Settings.CopyProjects}" AutomationProperties.Name="{l:Loc Settings.Server.CopyProjects}">
|
||||
<ComboBox.ItemContainerStyle>
|
||||
<Style TargetType="ComboBoxItem" BasedOn="{StaticResource {x:Type ComboBoxItem}}">
|
||||
|
||||
@@ -9,12 +9,14 @@ namespace Chronos.App.Server.Copies;
|
||||
/// (nothing preselected: <see cref="ChoiceIndex"/> -1 until the user picks). The lines of one setting (the members of an
|
||||
/// Auto parameter, the positions parked by photo) are one row and one choice. In a merge the first column is the kept
|
||||
/// sequence's: <paramref name="swapped"/> when that is the pair's other sequence (the line compares the pair's first with it).
|
||||
/// <paramref name="serverName"/>: the server's display name, which the second segment's tooltip names.
|
||||
/// </summary>
|
||||
public sealed class CopyDetailRow(IReadOnlyList<DetailLine> lines, bool isMerge, Action changed, bool swapped = false) : ObservableObject
|
||||
public sealed class CopyDetailRow(IReadOnlyList<DetailLine> lines, bool isMerge, Action changed, bool swapped = false, string? serverName = null) : ObservableObject
|
||||
{
|
||||
private int _choiceIndex = -1;
|
||||
|
||||
public CopyDetailRow(DetailLine line, bool isMerge, Action changed, bool swapped = false) : this([line], isMerge, changed, swapped)
|
||||
public CopyDetailRow(DetailLine line, bool isMerge, Action changed, bool swapped = false, string? serverName = null)
|
||||
: this([line], isMerge, changed, swapped, serverName)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -32,9 +34,20 @@ public sealed class CopyDetailRow(IReadOnlyList<DetailLine> lines, bool isMerge,
|
||||
private string? Second(DetailLine l) => swapped ? l.Here : l.There;
|
||||
public string HereText => Values(First);
|
||||
public string ThereText => Values(Second);
|
||||
/// <summary>The first value cell's tooltip: the side's raw values (a long one wraps).</summary>
|
||||
public string HereToolTip => Raw(First);
|
||||
|
||||
/// <summary>The second value cell's tooltip: the side's raw values.</summary>
|
||||
public string ThereToolTip => Raw(Second);
|
||||
|
||||
/// <summary>What choosing the first segment does: "Use this PC's value: 41" (a merge: the kept sequence's).</summary>
|
||||
public string HereChoiceToolTip => Loc.L(isMerge ? "Tooltips.Server.Copies.Detail.UseKept" : "Tooltips.Server.Copies.Detail.UseHere", HereText);
|
||||
|
||||
/// <summary>What choosing the second segment does: "Use the value of Studio NAS: 33" (a merge: the other sequence's).</summary>
|
||||
public string ThereChoiceToolTip => isMerge
|
||||
? Loc.L("Tooltips.Server.Copies.Detail.UseOther", ThereText)
|
||||
: Loc.L("Tooltips.Server.Copies.Detail.UseThere", string.IsNullOrEmpty(serverName) ? ThereWord : serverName, ThereText);
|
||||
|
||||
public string HereWord => Loc.L(isMerge ? "Server.Copies.Detail.Kept" : "Server.Copies.Detail.ThisPc");
|
||||
public string ThereWord => Loc.L(isMerge ? "Server.Copies.Detail.Other" : "Server.Copies.Detail.Server");
|
||||
|
||||
|
||||
@@ -193,7 +193,15 @@ public sealed class CopyDialogViewModel : ArchiveDialogViewModel
|
||||
|
||||
public bool CanBringAll => _photos.Any(p => p.CanBring);
|
||||
public bool CanKeepAllBoth => _photos.Any(p => p.CanChoose);
|
||||
public bool CanTrashHere => _class?.Class == PhotoClass.DeletedThere && _photos.Count > 0;
|
||||
/// <summary>
|
||||
/// To trash… is offered on the photos the other side deleted that the trashed side still holds: "Deleted on server"
|
||||
/// (this PC's copy), or in a merge "Deleted in other" from the kept sequence (the unoriented Deleted here once the pair's
|
||||
/// other sequence is kept); never on "Deleted in kept", whose frames go with the dropped sequence anyway.
|
||||
/// </summary>
|
||||
public bool CanTrashHere => _class?.Class == (Swapped ? PhotoClass.DeletedHere : PhotoClass.DeletedThere) && _photos.Count > 0;
|
||||
|
||||
/// <summary>The sequence To trash… moves photos of: this PC's copy, or in a merge the kept one (the pair's first until one is kept).</summary>
|
||||
private Guid TrashFrom => Swapped ? Copy.OtherId!.Value : Copy.LocalId;
|
||||
public bool CanDeleteThere => !IsMerge && _class?.Class == PhotoClass.DeletedHere && _photos.Count > 0 && _review?.Can.DeleteThere == true;
|
||||
|
||||
public ICommand BringAllCommand { get; }
|
||||
@@ -416,7 +424,7 @@ public sealed class CopyDialogViewModel : ArchiveDialogViewModel
|
||||
{
|
||||
var chosen = _details.GroupBy(d => d.Path, StringComparer.Ordinal).ToDictionary(g => g.Key, g => g.First().ChoiceIndex, StringComparer.Ordinal);
|
||||
Details = [.. review.Details.GroupBy(line => SyncText.DetailSetting(line.Path), StringComparer.Ordinal)
|
||||
.Select(setting => new CopyDetailRow([.. setting], IsMerge, Changed, Swapped))];
|
||||
.Select(setting => new CopyDetailRow([.. setting], IsMerge, Changed, Swapped, ServerName))];
|
||||
foreach (var row in _details) row.SetQuietly(chosen.GetValueOrDefault(row.Path, -1));
|
||||
}
|
||||
|
||||
@@ -440,7 +448,7 @@ public sealed class CopyDialogViewModel : ArchiveDialogViewModel
|
||||
: [.. review.Photos.Of(cls.Value).Select(p => new CopyPhotoRow(p, IsMerge,
|
||||
choosing && !IsMerge && cls is PhotoClass.OnlyHere or PhotoClass.OnlyThere,
|
||||
choosing && cls == PhotoClass.Differs, choices, _perPhoto.TryGetValue(p.Key, out var c) ? c : null, () => OnPhotoChanged(p.Key), drop,
|
||||
Swapped, Places, cls == PhotoClass.Versions && !review.ExcludedHere.Contains(p.Key)))];
|
||||
Swapped, Places, cls == PhotoClass.Versions && !(Swapped ? review.ExcludedThere : review.ExcludedHere).Contains(p.Key)))];
|
||||
foreach (var row in _photos) row.PropertyChanged += (_, e) =>
|
||||
{
|
||||
if (e.PropertyName != nameof(CopyPhotoRow.IsSelected)) return;
|
||||
@@ -864,14 +872,18 @@ public sealed class CopyDialogViewModel : ArchiveDialogViewModel
|
||||
await LoadAsync();
|
||||
}
|
||||
|
||||
/// <summary>To trash…: the dry run of moving these photos of this PC's copy to its archive trash, the confirmation, then the move.</summary>
|
||||
/// <summary>The dry run of To trash… for <paramref name="keys"/>: photos of <see cref="TrashFrom"/>.</summary>
|
||||
internal Task<TrashHerePlan> PlanTrashHereAsync(IReadOnlyCollection<string> keys) => _engine.PlanTrashHereAsync(Copy.Id, TrashFrom, keys, CancellationToken.None);
|
||||
|
||||
/// <summary>To trash…: the dry run of moving these photos of this PC's copy (a merge: the kept one) to its archive trash, the confirmation, then the move.</summary>
|
||||
private async Task TrashHereAsync(IReadOnlyCollection<string> keys)
|
||||
{
|
||||
if (keys.Count == 0) return;
|
||||
IsBusy = true;
|
||||
try
|
||||
{
|
||||
var (plan, lasts) = await _engine.PlanTrashHereAsync(Copy.Id, keys, CancellationToken.None);
|
||||
var trash = await PlanTrashHereAsync(keys);
|
||||
var (plan, lasts) = trash;
|
||||
if (plan.Frames.Count == 0)
|
||||
{
|
||||
ShowMessage(Loc.L("Errors.Copies.NotThere"));
|
||||
@@ -879,7 +891,7 @@ public sealed class CopyDialogViewModel : ArchiveDialogViewModel
|
||||
}
|
||||
var request = TrashRequest(plan.Frames.Count, plan.Frames.Select(f => f.FileName), Loc.L("Tooltips.Server.Copies.ToTrash"), lasts);
|
||||
if (!_shell.Services.Dialogs.Confirm(request)) return;
|
||||
await _engine.TrashHereAsync(Copy.Id, plan, Copy.Kind == CopyKind.LocalServer ? _shell.Services.Sync.Remote : null, CancellationToken.None);
|
||||
await _engine.TrashHereAsync(Copy.Id, trash, Copy.Kind == CopyKind.LocalServer ? _shell.Services.Sync.Remote : null, CancellationToken.None);
|
||||
}
|
||||
catch (Exception ex) when (Expected(ex))
|
||||
{
|
||||
|
||||
@@ -17,6 +17,16 @@
|
||||
<Setter Property="ToolTip" Value="{Binding ToolTip}" />
|
||||
</Style>
|
||||
|
||||
<!-- A choice's label: a translation longer than its box ends in an ellipsis, never clipped mid-letter. -->
|
||||
<DataTemplate x:Key="Template.OptionLabel">
|
||||
<TextBlock Text="{Binding Label}" TextTrimming="CharacterEllipsis" />
|
||||
</DataTemplate>
|
||||
|
||||
<!-- A value cell's raw value: long values (the frame positions' JSON) wrap inside the tooltip. -->
|
||||
<DataTemplate x:Key="Template.RawValue">
|
||||
<TextBlock Text="{Binding}" TextWrapping="Wrap" MaxWidth="480" />
|
||||
</DataTemplate>
|
||||
|
||||
<!-- Rows of the dialog's lists read as their text; Tab goes to their controls. -->
|
||||
<Style x:Key="ListBoxItem.CopyPhoto" TargetType="ListBoxItem" BasedOn="{StaticResource ListBoxItem.Row}">
|
||||
<Setter Property="AutomationProperties.Name" Value="{Binding Name}" />
|
||||
@@ -103,8 +113,8 @@
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel Orientation="Horizontal" Margin="0,0,0,8">
|
||||
<TextBlock Text="{l:Loc Server.Copies.Policy.Label}" Style="{StaticResource Text.DialogLabel}" VerticalAlignment="Center" Margin="0,0,10,0" />
|
||||
<ComboBox Width="170" ItemsSource="{Binding Policies}" SelectedItem="{Binding Policy}" DisplayMemberPath="Label" ToolTip="{Binding PolicyToolTip}"
|
||||
ItemContainerStyle="{StaticResource ComboBoxItem.Option}" AutomationProperties.Name="{l:Loc Server.Copies.Policy.Label}" />
|
||||
<ComboBox Width="240" ItemsSource="{Binding Policies}" SelectedItem="{Binding Policy}" ItemTemplate="{StaticResource Template.OptionLabel}"
|
||||
ToolTip="{Binding PolicyToolTip}" ItemContainerStyle="{StaticResource ComboBoxItem.Option}" AutomationProperties.Name="{l:Loc Server.Copies.Policy.Label}" />
|
||||
</StackPanel>
|
||||
<DockPanel Grid.Row="1" Margin="0,0,14,0">
|
||||
<!-- Column headings: the class, how many photos, their size (on the side that holds them). -->
|
||||
@@ -191,18 +201,19 @@
|
||||
<TextBlock Grid.Column="1" Text="{Binding TimeText}" VerticalAlignment="Center" Typography.NumeralAlignment="Tabular" FontSize="12" TextTrimming="CharacterEllipsis" />
|
||||
<TextBlock Grid.Column="2" Text="{Binding Name}" VerticalAlignment="Center" TextTrimming="CharacterEllipsis" FlowDirection="LeftToRight" FontSize="12" />
|
||||
<TextBlock Grid.Column="3" Text="{Binding SizeText}" VerticalAlignment="Center" TextAlignment="Right" Typography.NumeralAlignment="Tabular" FontSize="12" />
|
||||
<!-- The side, then "In Main" on the version Main uses (it gives way to the side's name, never to Drop…). -->
|
||||
<DockPanel Grid.Column="4" Width="110" Margin="10,0,0,0" VerticalAlignment="Center"
|
||||
<!-- The side, then "In Main" on the version Main uses: the column takes the widest row's (shared), so
|
||||
"This PC · Server" and "In Main" both show whole; a very long archive name gives way first. -->
|
||||
<DockPanel Grid.Column="4" MaxWidth="280" Margin="10,0,0,0" VerticalAlignment="Center"
|
||||
Visibility="{Binding CanChoose, Converter={x:Static ui:InverseBoolToVisibilityConverter.Instance}}">
|
||||
<TextBlock DockPanel.Dock="Right" Text="{l:Loc Server.Copies.Photo.InMain}" ToolTip="{l:Loc Tooltips.Server.Copies.InMain}"
|
||||
Foreground="{DynamicResource Brush.TextMuted}" Margin="6,0,0,0" FontSize="12"
|
||||
Visibility="{Binding InMain, Converter={StaticResource CopyBoolToVisibility}}" />
|
||||
<TextBlock Text="{Binding SideText}" Foreground="{DynamicResource Brush.TextMuted}" TextTrimming="CharacterEllipsis" FontSize="12" />
|
||||
</DockPanel>
|
||||
<ComboBox Grid.Column="5" Width="150" Margin="10,0,0,0" ItemsSource="{Binding Choices}" SelectedItem="{Binding Choice}" DisplayMemberPath="Label"
|
||||
<ComboBox Grid.Column="5" Width="185" Margin="10,0,0,0" ItemsSource="{Binding Choices}" SelectedItem="{Binding Choice}" ItemTemplate="{StaticResource Template.OptionLabel}"
|
||||
ItemContainerStyle="{StaticResource ComboBoxItem.Option}" ToolTip="{l:Loc Tooltips.Server.Copies.Version}"
|
||||
AutomationProperties.Name="{Binding ChoiceAccessibleName}" Visibility="{Binding CanChoose, Converter={StaticResource CopyBoolToVisibility}}" />
|
||||
<Button Grid.Column="5" Style="{StaticResource Button.Row}" Content="{l:Loc Server.Copies.Action.Drop}" Command="{Binding DropCommand}"
|
||||
<Button Grid.Column="5" Style="{StaticResource Button.Row}" Margin="10,0,6,0" Content="{l:Loc Server.Copies.Action.Drop}" Command="{Binding DropCommand}"
|
||||
ToolTip="{l:Loc Tooltips.Server.Copies.Drop}" AutomationProperties.Name="{Binding DropAccessibleName}" FontSize="12"
|
||||
Visibility="{Binding CanDrop, Converter={StaticResource CopyBoolToVisibility}}" />
|
||||
</Grid>
|
||||
@@ -257,11 +268,20 @@
|
||||
<ColumnDefinition Width="Auto" SharedSizeGroup="CopyDetailChoice" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="{Binding Label}" Style="{StaticResource Text.DialogLabel}" VerticalAlignment="Center" TextTrimming="CharacterEllipsis" ToolTip="{Binding Label}" />
|
||||
<TextBlock Grid.Column="1" Text="{Binding HereText}" ToolTip="{Binding HereToolTip}" VerticalAlignment="Center" TextTrimming="CharacterEllipsis" Margin="10,0,0,0" />
|
||||
<TextBlock Grid.Column="2" Text="{Binding ThereText}" ToolTip="{Binding ThereToolTip}" VerticalAlignment="Center" TextTrimming="CharacterEllipsis" Margin="10,0,0,0" />
|
||||
<TextBlock Grid.Column="1" Text="{Binding HereText}" VerticalAlignment="Center" TextTrimming="CharacterEllipsis" Margin="10,0,0,0">
|
||||
<TextBlock.ToolTip>
|
||||
<ToolTip Content="{Binding HereToolTip}" ContentTemplate="{StaticResource Template.RawValue}" />
|
||||
</TextBlock.ToolTip>
|
||||
</TextBlock>
|
||||
<TextBlock Grid.Column="2" Text="{Binding ThereText}" VerticalAlignment="Center" TextTrimming="CharacterEllipsis" Margin="10,0,0,0">
|
||||
<TextBlock.ToolTip>
|
||||
<ToolTip Content="{Binding ThereToolTip}" ContentTemplate="{StaticResource Template.RawValue}" />
|
||||
</TextBlock.ToolTip>
|
||||
</TextBlock>
|
||||
<!-- Each segment says what choosing it does, with the value it takes; the raw values stay on the cells. -->
|
||||
<v:SegmentedControl Grid.Column="3" SelectedIndex="{Binding ChoiceIndex}" ToolTip="{Binding ToolTip}" AutomationProperties.Name="{Binding AccessibleName}" Margin="10,0,0,0">
|
||||
<v:SegmentedItem Content="{Binding HereWord}" ToolTip="{Binding HereToolTip}" AutomationProperties.Name="{Binding HereWord}" />
|
||||
<v:SegmentedItem Content="{Binding ThereWord}" ToolTip="{Binding ThereToolTip}" AutomationProperties.Name="{Binding ThereWord}" />
|
||||
<v:SegmentedItem Content="{Binding HereWord}" ToolTip="{Binding HereChoiceToolTip}" AutomationProperties.Name="{Binding HereWord}" />
|
||||
<v:SegmentedItem Content="{Binding ThereWord}" ToolTip="{Binding ThereChoiceToolTip}" AutomationProperties.Name="{Binding ThereWord}" />
|
||||
</v:SegmentedControl>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
@@ -274,7 +294,6 @@
|
||||
<!-- Projects: Copy across or Leave them; each side's projects, and where each goes. -->
|
||||
<Grid Visibility="{Binding IsProjects, Converter={StaticResource CopyBoolToVisibility}}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
@@ -290,18 +309,23 @@
|
||||
</v:SegmentedControl>
|
||||
<TextBlock Grid.Row="1" Grid.ColumnSpan="2" Text="{Binding ProjectsNote}" Foreground="{DynamicResource Brush.TextMuted}" Margin="0,0,0,8"
|
||||
Visibility="{Binding ProjectsNote, Converter={x:Static ui:NullToCollapsedConverter.Instance}}" />
|
||||
<!-- Each column says whose projects it lists: this PC and the server, or the pair's two sequences (the lists do not follow the kept one). -->
|
||||
<TextBlock Grid.Row="2" Text="{Binding ProjectsHereHeading}" FontWeight="SemiBold" Margin="0,0,14,6" TextTrimming="CharacterEllipsis" ToolTip="{Binding ProjectsHereHeading}" />
|
||||
<TextBlock Grid.Row="2" Grid.Column="1" Text="{Binding ProjectsThereHeading}" FontWeight="SemiBold" Margin="0,0,0,6" TextTrimming="CharacterEllipsis" ToolTip="{Binding ProjectsThereHeading}" />
|
||||
<!-- Both lists scroll together: a pair with many projects stays inside the dialog. -->
|
||||
<ScrollViewer Grid.Row="3" Grid.ColumnSpan="2" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled" Focusable="False">
|
||||
<!-- Both lists scroll together: a pair with many projects stays inside the dialog. Each column's heading says whose
|
||||
projects it lists (this PC and the server, or the pair's two sequences; they do not follow the kept one) and
|
||||
shares its list's column, so a scroll bar never moves one off the other. -->
|
||||
<ScrollViewer Grid.Row="2" Grid.ColumnSpan="2" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled" Focusable="False">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<ItemsControl ItemsSource="{Binding HereProjects}" ItemTemplate="{StaticResource Template.CopyProjectRow}" Focusable="False" Margin="0,0,14,0" />
|
||||
<ItemsControl Grid.Column="1" ItemsSource="{Binding ThereProjects}" ItemTemplate="{StaticResource Template.CopyProjectRow}" Focusable="False" />
|
||||
<TextBlock Text="{Binding ProjectsHereHeading}" FontWeight="SemiBold" Margin="0,0,14,6" TextTrimming="CharacterEllipsis" ToolTip="{Binding ProjectsHereHeading}" />
|
||||
<TextBlock Grid.Column="1" Text="{Binding ProjectsThereHeading}" FontWeight="SemiBold" Margin="0,0,0,6" TextTrimming="CharacterEllipsis" ToolTip="{Binding ProjectsThereHeading}" />
|
||||
<ItemsControl Grid.Row="1" ItemsSource="{Binding HereProjects}" ItemTemplate="{StaticResource Template.CopyProjectRow}" Focusable="False" Margin="0,0,14,0" />
|
||||
<ItemsControl Grid.Row="1" Grid.Column="1" ItemsSource="{Binding ThereProjects}" ItemTemplate="{StaticResource Template.CopyProjectRow}" Focusable="False" />
|
||||
</Grid>
|
||||
</ScrollViewer>
|
||||
</Grid>
|
||||
|
||||
@@ -115,7 +115,10 @@ public static class CopyText
|
||||
return withTitle && facts.Title.Length > 0 ? Loc.L("Server.Copies.Titled", facts.Title, text) : text;
|
||||
}
|
||||
|
||||
/// <summary>The row's buttons in the order of design §8.1.</summary>
|
||||
/// <summary>
|
||||
/// The row's buttons in the order of design §8.1, never more than three (the actions column holds three): a linked pair
|
||||
/// whose other side deleted photos gives Integrate… up for Review (both open the dialog that offers Integrate).
|
||||
/// </summary>
|
||||
public static IReadOnlyList<CopyAction> Actions(FoundCopy copy, Core.Model.JobState? job = null)
|
||||
{
|
||||
var local = copy.Kind == CopyKind.LocalLocal;
|
||||
@@ -125,7 +128,7 @@ public static class CopyText
|
||||
{
|
||||
CopyState.Candidate => [CopyAction.Compare, local ? CopyAction.Merge : CopyAction.Integrate, CopyAction.KeepApart],
|
||||
CopyState.KeptApart => [CopyAction.Compare, CopyAction.AskAgain],
|
||||
CopyState.Linked when copy.Score.DeletedThere > 0 => [CopyAction.Compare, CopyAction.Integrate, CopyAction.Unlink, CopyAction.Review],
|
||||
CopyState.Linked when copy.Score.DeletedThere > 0 => [CopyAction.Compare, CopyAction.Unlink, CopyAction.Review],
|
||||
CopyState.Linked => [CopyAction.Compare, CopyAction.Integrate, CopyAction.Unlink],
|
||||
CopyState.Integrating => [job == Core.Model.JobState.Paused ? CopyAction.Resume : CopyAction.Pause],
|
||||
_ when copy.Score.DeletedThere > 0 => [CopyAction.Compare, CopyAction.Unlink, CopyAction.Review],
|
||||
|
||||
@@ -300,6 +300,16 @@ internal sealed class MergeJobHandler(ChronosDatabase db, SequenceMerger merger,
|
||||
|
||||
private InvalidOperationException Changed(string title) => new(Loc.L("Errors.Copies.Changed", title));
|
||||
|
||||
/// <summary>
|
||||
/// <see cref="Changed"/> for a change that never goes back (a frames version, a photo gone from the kept sequence):
|
||||
/// retrying this journal would fail the same way, so it goes and the next run plans again.
|
||||
/// </summary>
|
||||
private InvalidOperationException Stale(string title)
|
||||
{
|
||||
ForgetJournal();
|
||||
return Changed(title);
|
||||
}
|
||||
|
||||
/// <summary>Asks for this run's journal and staging to go as it fails (<see cref="AbandonAsync"/>): what it planned no longer holds.</summary>
|
||||
private void ForgetJournal() => _forget = true;
|
||||
|
||||
@@ -344,7 +354,7 @@ internal sealed class MergeJobHandler(ChronosDatabase db, SequenceMerger merger,
|
||||
private async Task EnsureDropUnchangedAsync(int expected)
|
||||
{
|
||||
var drop = await _db.Sequences.GetAsync(journal.DropId, _ct).ConfigureAwait(false);
|
||||
if (drop is null || drop.FramesVersion != expected) throw Changed(_dropTitle);
|
||||
if (drop is null || drop.FramesVersion != expected) throw Stale(_dropTitle);
|
||||
}
|
||||
|
||||
// ---- copy ----
|
||||
@@ -401,7 +411,7 @@ internal sealed class MergeJobHandler(ChronosDatabase db, SequenceMerger merger,
|
||||
catch (PhotoRemovedException)
|
||||
{
|
||||
File.Delete(staged);
|
||||
if (planned) throw Changed(_keepTitle); // deleted from the kept sequence since the plan: a last copy the plan did not list
|
||||
if (planned) throw Stale(_keepTitle); // deleted from the kept sequence since the plan: a last copy the plan did not list
|
||||
// A photo the plan could not compare by content (unhashed) that the kept sequence deleted: a last copy the
|
||||
// plan did not list. Retrying this journal would fail the same way: it goes, and the user plans again.
|
||||
ForgetJournal();
|
||||
@@ -516,7 +526,7 @@ internal sealed class MergeJobHandler(ChronosDatabase db, SequenceMerger merger,
|
||||
private async Task VerifyAsync()
|
||||
{
|
||||
var drop = await _db.Sequences.GetAsync(journal.DropId, _ct).ConfigureAwait(false) ?? throw Changed(_dropTitle);
|
||||
if (drop.FramesVersion != journal.DropFramesVersion) throw Changed(_dropTitle);
|
||||
if (drop.FramesVersion != journal.DropFramesVersion) throw Stale(_dropTitle);
|
||||
EnsureDropReadable(drop);
|
||||
await EnsureFolderReadAsync(drop).ConfigureAwait(false);
|
||||
var keepFrames = await ProcessingFrames.ListAsync(_db, journal.KeepId, _ct).ConfigureAwait(false);
|
||||
@@ -920,8 +930,8 @@ internal sealed class MergeJobHandler(ChronosDatabase db, SequenceMerger merger,
|
||||
ForgetJournal();
|
||||
throw Changed(_dropTitle);
|
||||
}
|
||||
var expected = journal.VerifiedDropFramesVersion ?? throw Changed(_dropTitle);
|
||||
if (drop.FramesVersion != expected) throw Changed(_dropTitle);
|
||||
var expected = journal.VerifiedDropFramesVersion ?? throw Stale(_dropTitle);
|
||||
if (drop.FramesVersion != expected) throw Stale(_dropTitle);
|
||||
EnsureDropReadable(drop);
|
||||
if (beforeLinks) await EnsureFolderReadAsync(drop).ConfigureAwait(false);
|
||||
return expected;
|
||||
@@ -998,7 +1008,7 @@ internal sealed class MergeJobHandler(ChronosDatabase db, SequenceMerger merger,
|
||||
// folder) never lets the rest through unread.
|
||||
var dropFrames = await ProcessingFrames.ListAsync(_db, journal.DropId, _ct).ConfigureAwait(false);
|
||||
if (dropFrames.Any(f => (f.Flags & CopySides.UnusableFlags) == 0 && !journal.Verified.ContainsKey(f.Id) && !journal.Settled.Contains(f.Id)))
|
||||
throw Changed(_dropTitle);
|
||||
throw Stale(_dropTitle);
|
||||
// A frame flagged Missing or Corrupt since the verify, its file there: never hashed as such, so planned again.
|
||||
if (dropFrames.Any(f => (f.Flags & CopySides.UnusableFlags) != 0 && !journal.FlaggedVerified.Contains(f.Id)
|
||||
&& File.Exists(_dropPaths.FromRelative(f.RelativePath))))
|
||||
@@ -1028,7 +1038,7 @@ internal sealed class MergeJobHandler(ChronosDatabase db, SequenceMerger merger,
|
||||
&& (frame.Sha256 is null || string.Equals(frame.Sha256, verified.Sha256, StringComparison.OrdinalIgnoreCase)))
|
||||
continue;
|
||||
if (hashes.Contains(verified.Sha256)) continue;
|
||||
throw Changed(_keepTitle);
|
||||
throw Stale(_keepTitle);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -231,7 +231,7 @@ public sealed class CopyEngine(SyncService sync, ArchiveService archives, Integr
|
||||
return;
|
||||
case CopyState.Linked or CopyState.Integrated when copy is { Kind: CopyKind.LocalServer, Server: { } server, RemoteId: { } remoteId }:
|
||||
// Kept apart from the server's copy it is linked to: the link goes (the server row stays as an observation).
|
||||
await _sync.UnlinkAsync(server, remoteId, ct).ConfigureAwait(false);
|
||||
await _sync.UnlinkAsync(server, remoteId, copy.LocalId, ct).ConfigureAwait(false);
|
||||
if (await StateAsync(copyId, ct).ConfigureAwait(false) == CopyState.KeptApart) return;
|
||||
break;
|
||||
}
|
||||
@@ -259,6 +259,10 @@ public sealed class CopyEngine(SyncService sync, ArchiveService archives, Integr
|
||||
throw new ArgumentException($"Pair {copyId} is not a pair with a sequence of {remote.Server}.", nameof(copyId));
|
||||
if (copy.State == CopyState.Integrating) throw new InvalidOperationException(Loc.L("Errors.Copies.Busy"));
|
||||
var local = await Db.Sequences.GetAsync(copy.LocalId, ct).ConfigureAwait(false) ?? throw new StaleCopyPlanException();
|
||||
// Another pair of either side being integrated links them its own way: this link waits for that job.
|
||||
if ((await Store.ListByServerAsync(server, ct).ConfigureAwait(false))
|
||||
.Any(c => c is { Kind: CopyKind.LocalServer, State: CopyState.Integrating } && (c.RemoteId == remoteId || c.LocalId == local.Id)))
|
||||
throw new InvalidOperationException(Loc.L("Errors.Copies.Busy"));
|
||||
var mine = await _sync.LinkOfAsync(server, local.Id, ct).ConfigureAwait(false);
|
||||
var theirs = await _sync.Links.GetAsync(server, remoteId, ct).ConfigureAwait(false);
|
||||
if ((mine is not null && mine.RemoteId != remoteId) || (theirs?.LocalId is { } holder && holder != local.Id))
|
||||
@@ -289,7 +293,15 @@ public sealed class CopyEngine(SyncService sync, ArchiveService archives, Integr
|
||||
return;
|
||||
}
|
||||
if (copy.State == CopyState.Integrating) throw new InvalidOperationException(Loc.L("Errors.Copies.Busy"));
|
||||
if (copy.State is CopyState.Linked or CopyState.Integrated && remote is not null && string.Equals(remote.Server, server, StringComparison.Ordinal))
|
||||
if (copy.State is not (CopyState.Linked or CopyState.Integrated))
|
||||
{
|
||||
// No link holds this pair (kept apart, or a candidate a re-link demoted): only its own row changes; the server
|
||||
// sequence's link, held by another copy or none, is not this pair's to drop.
|
||||
if (copy.State != CopyState.KeptApart && !await Store.SetStateAsync(copyId, copy.State, CopyState.KeptApart, Answer(copy), ct).ConfigureAwait(false))
|
||||
throw new StaleCopyPlanException();
|
||||
return;
|
||||
}
|
||||
if (remote is not null && string.Equals(remote.Server, server, StringComparison.Ordinal))
|
||||
{
|
||||
// The answer is measured against what the two hold now, not at the last comparison.
|
||||
try
|
||||
@@ -301,10 +313,13 @@ public sealed class CopyEngine(SyncService sync, ArchiveService archives, Integr
|
||||
Log.Warning(LogCategory, $"Pair {copyId} could not be compared again before its Unlink; its last comparison is kept", ex);
|
||||
}
|
||||
}
|
||||
await _sync.UnlinkAsync(server, remoteId, ct).ConfigureAwait(false);
|
||||
// No link held the pair (a candidate): it is kept apart all the same.
|
||||
if (await StateAsync(copyId, ct).ConfigureAwait(false) is { } state && state != CopyState.KeptApart)
|
||||
await Store.SetStateAsync(copyId, state, CopyState.KeptApart, Answer(copy), ct).ConfigureAwait(false);
|
||||
await _sync.UnlinkAsync(server, remoteId, copy.LocalId, ct).ConfigureAwait(false);
|
||||
// The link had gone meanwhile (another copy holds the server sequence now): this pair is kept apart all the same,
|
||||
// from the state read, never over an integration that began since.
|
||||
var state = await StateAsync(copyId, ct).ConfigureAwait(false);
|
||||
if (state == CopyState.Integrating) throw new InvalidOperationException(Loc.L("Errors.Copies.Busy"));
|
||||
if (state is { } now && now != CopyState.KeptApart && !await Store.SetStateAsync(copyId, now, CopyState.KeptApart, Answer(copy), ct).ConfigureAwait(false))
|
||||
throw new StaleCopyPlanException();
|
||||
}
|
||||
|
||||
public async Task KeepHereAsync(Guid copyId, CancellationToken ct)
|
||||
@@ -352,6 +367,7 @@ public sealed class CopyEngine(SyncService sync, ArchiveService archives, Integr
|
||||
var row = await Db.Sequences.GetAsync(sequenceId, ct).ConfigureAwait(false);
|
||||
if (row?.FramesVersion != plan.Plan.Sequence.FramesVersion || (plan.SettingsVersion is { } settings && row.SettingsVersion != settings))
|
||||
throw new StaleCopyPlanException();
|
||||
await EnsureNoNewLastCopiesAsync([plan.Sha256], plan.LastCopies, [sequenceId], ct).ConfigureAwait(false);
|
||||
await _archives.FrameTrash.DeleteAsync(plan.Plan, _context(null).PcName, followUps?.Invoke(), ct).ConfigureAwait(false);
|
||||
Log.Info(LogCategory, $"Sequence {sequenceId}: one version of a photo kept in two went to its archive trash");
|
||||
if (plan.Sha256 is { Length: > 0 } dropped) await KeepInMainAsync(sequenceId, plan.PartnerSha256, dropped, plan.SettingsVersion, ct).ConfigureAwait(false);
|
||||
@@ -444,20 +460,56 @@ public sealed class CopyEngine(SyncService sync, ArchiveService archives, Integr
|
||||
|
||||
// ---------------- Deleted on one side ----------------
|
||||
|
||||
public async Task<TrashHerePlan> PlanTrashHereAsync(Guid copyId, IReadOnlyCollection<string> photoKeys, CancellationToken ct)
|
||||
public async Task<TrashHerePlan> PlanTrashHereAsync(Guid copyId, Guid fromSequence, IReadOnlyCollection<string> photoKeys, CancellationToken ct)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(photoKeys);
|
||||
var copy = await RequireAsync(copyId, ct).ConfigureAwait(false);
|
||||
var sequence = await Db.Sequences.GetAsync(copy.LocalId, ct).ConfigureAwait(false) ?? throw new StaleCopyPlanException();
|
||||
var here = await _sides.LocalAsync(copy.LocalId, ct).ConfigureAwait(false);
|
||||
_ = OtherOf(copy, fromSequence);
|
||||
var sequence = await Db.Sequences.GetAsync(fromSequence, ct).ConfigureAwait(false) ?? throw new StaleCopyPlanException();
|
||||
var here = await _sides.LocalAsync(fromSequence, ct).ConfigureAwait(false);
|
||||
var frames = FramesOf(here, SyncTombstones.FromDtos(here.Removed, null), photoKeys);
|
||||
if (frames.Count == 0) throw new InvalidOperationException(Loc.L("Errors.Copies.NotThere"));
|
||||
var plan = await _archives.FrameTrash.PlanDeleteAsync(copy.LocalId, [.. frames.Select(f => f.FrameId)], sequence.FramesVersion, ct).ConfigureAwait(false);
|
||||
var plan = await _archives.FrameTrash.PlanDeleteAsync(fromSequence, [.. frames.Select(f => f.FrameId)], sequence.FramesVersion, ct).ConfigureAwait(false);
|
||||
// The other side deleted these photos: what no other sequence of this index holds goes with its last copy.
|
||||
var lasts = await LastCopiesAsync(frames, CopySide.ThisPc, [copy.LocalId], ct).ConfigureAwait(false);
|
||||
var lasts = await LastCopiesAsync(frames, CopySide.ThisPc, [fromSequence], ct).ConfigureAwait(false);
|
||||
return new TrashHerePlan(plan, lasts);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The pair's other local sequence when <paramref name="fromSequence"/> is one of two copies of this PC; null when it is
|
||||
/// the local copy of a server pair. Any other sequence is not this pair's.
|
||||
/// </summary>
|
||||
private static Guid? OtherOf(FoundCopy copy, Guid fromSequence)
|
||||
{
|
||||
if (copy.Kind == CopyKind.LocalLocal && copy.OtherId is { } other)
|
||||
{
|
||||
if (fromSequence == copy.LocalId) return other;
|
||||
if (fromSequence == other) return copy.LocalId;
|
||||
}
|
||||
else if (fromSequence == copy.LocalId)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
throw new ArgumentException($"Sequence {fromSequence} is not a side of pair {copy.Id}.", nameof(fromSequence));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// At the moment of a delete: the photos planned (by content) that no sequence outside <paramref name="except"/> holds
|
||||
/// now must all be among the last copies the plan listed; one that became a last copy since (another sequence trashed
|
||||
/// meanwhile) makes the plan stale, so the next confirmation names it.
|
||||
/// </summary>
|
||||
private async Task EnsureNoNewLastCopiesAsync(IEnumerable<string?> hashes, IReadOnlyList<LastCopy> listed, IReadOnlyCollection<Guid> except, CancellationToken ct)
|
||||
{
|
||||
var keys = hashes.OfType<string>().Where(h => h.Length > 0).Select(h => h.ToLowerInvariant()).Distinct(StringComparer.Ordinal).ToList();
|
||||
if (keys.Count == 0) return;
|
||||
var named = listed.Select(l => l.Key).ToHashSet(StringComparer.OrdinalIgnoreCase);
|
||||
var elsewhere = await _sides.HeldElsewhereAsync(keys, except, ct).ConfigureAwait(false);
|
||||
var now = keys.Count(k => !named.Contains(k) && !elsewhere.Contains(k));
|
||||
if (now == 0) return;
|
||||
Log.Info(LogCategory, $"{now} photo(s) became last copies since the plan; nothing went to a trash");
|
||||
throw new StaleCopyPlanException();
|
||||
}
|
||||
|
||||
public async Task<DropVersionPlan> PlanDropVersionAsync(Guid copyId, string key, ISyncRemote? remote, CancellationToken ct)
|
||||
{
|
||||
ArgumentException.ThrowIfNullOrEmpty(key);
|
||||
@@ -514,6 +566,8 @@ public sealed class CopyEngine(SyncService sync, ArchiveService archives, Integr
|
||||
Log.Info(LogCategory, $"Pair {plan.CopyId}: the version kept is no longer on both sides; nothing went to a trash");
|
||||
throw new StaleCopyPlanException(Loc.L("Errors.Copies.OtherVersionGone"));
|
||||
}
|
||||
Guid[] pairSides = copy.OtherId is { } o ? [copy.LocalId, o] : [copy.LocalId];
|
||||
await EnsureNoNewLastCopiesAsync(FramesOf(here, tombstones, [plan.Key]).Take(1).Select(f => f.Sha256), plan.LastCopies, pairSides, ct).ConfigureAwait(false);
|
||||
// The local plans are checked before the server moves anything, so a stale one moves nothing anywhere.
|
||||
foreach (var local in new[] { plan.Here, plan.Other }.OfType<FrameDeletePlan>())
|
||||
{
|
||||
@@ -550,15 +604,25 @@ public sealed class CopyEngine(SyncService sync, ArchiveService archives, Integr
|
||||
return moved;
|
||||
}
|
||||
|
||||
public async Task<int> TrashHereAsync(Guid copyId, FrameDeletePlan plan, ISyncRemote? remote, CancellationToken ct)
|
||||
public async Task<int> TrashHereAsync(Guid copyId, TrashHerePlan trash, ISyncRemote? remote, CancellationToken ct)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(plan);
|
||||
ArgumentNullException.ThrowIfNull(trash);
|
||||
var plan = trash.Plan;
|
||||
var copy = await RequireAsync(copyId, ct).ConfigureAwait(false);
|
||||
if (plan.Sequence.Id != copy.LocalId) throw new ArgumentException($"The plan is not of pair {copyId}'s sequence.", nameof(plan));
|
||||
var from = plan.Sequence.Id;
|
||||
Guid? otherLocal;
|
||||
try
|
||||
{
|
||||
otherLocal = OtherOf(copy, from);
|
||||
}
|
||||
catch (ArgumentException ex)
|
||||
{
|
||||
throw new ArgumentException($"The plan is not of pair {copyId}'s sequence.", nameof(trash), ex);
|
||||
}
|
||||
if (copy.State == CopyState.Integrating) throw new InvalidOperationException(Loc.L("Errors.Copies.Busy"));
|
||||
// The other side as it is now: each photo must still be deleted there, and not held there again (restored from its trash).
|
||||
CopySideInput there;
|
||||
if (copy.Kind == CopyKind.LocalServer)
|
||||
if (otherLocal is null)
|
||||
{
|
||||
if (remote is null || !string.Equals(remote.Server, copy.Server, StringComparison.Ordinal))
|
||||
throw new ArgumentException("A pair with a server sequence is checked over that server's session.", nameof(remote));
|
||||
@@ -566,9 +630,9 @@ public sealed class CopyEngine(SyncService sync, ArchiveService archives, Integr
|
||||
}
|
||||
else
|
||||
{
|
||||
there = await _sides.LocalAsync(copy.OtherId!.Value, ct).ConfigureAwait(false);
|
||||
there = await _sides.LocalAsync(otherLocal.Value, ct).ConfigureAwait(false);
|
||||
}
|
||||
var here = await _sides.LocalAsync(copy.LocalId, ct).ConfigureAwait(false);
|
||||
var here = await _sides.LocalAsync(from, ct).ConfigureAwait(false);
|
||||
var tombstones = SyncTombstones.FromDtos(here.Removed, there.Removed);
|
||||
var held = Keys(there, tombstones);
|
||||
var refused = plan.Frames.Count(f => !tombstones.DeletedRemotely(f.Sha256) || held.Contains(tombstones.Canonical(f.Sha256) ?? string.Empty));
|
||||
@@ -577,6 +641,7 @@ public sealed class CopyEngine(SyncService sync, ArchiveService archives, Integr
|
||||
Log.Info(LogCategory, $"Pair {copyId}: {refused} photo(s) are no longer deleted on the other side; none went to the trash");
|
||||
throw new StaleCopyPlanException(Loc.L("Errors.Copies.NotThere"));
|
||||
}
|
||||
await EnsureNoNewLastCopiesAsync(plan.Frames.Select(f => f.Sha256), trash.LastCopies, [from], ct).ConfigureAwait(false);
|
||||
var result = await _archives.FrameTrash.DeleteAsync(plan, _context(remote).PcName, followUps?.Invoke(), ct).ConfigureAwait(false);
|
||||
Log.Info(LogCategory, $"{plan.Frames.Count} photo(s) of {result.Sequence.DisplayTitle} deleted on the other side went to the trash");
|
||||
await RecountAsync(copy, remote, ct).ConfigureAwait(false);
|
||||
@@ -622,6 +687,8 @@ public sealed class CopyEngine(SyncService sync, ArchiveService archives, Integr
|
||||
Log.Info(LogCategory, $"Pair {plan.CopyId}: {refused} photo(s) are no longer deleted on this PC; none went to the server's trash");
|
||||
throw new StaleCopyPlanException(Loc.L("Errors.Copies.NotThere"));
|
||||
}
|
||||
await EnsureNoNewLastCopiesAsync(FramesOf(there, tombstones, plan.Keys).Where(f => plan.FrameIds.Contains(f.FrameId)).Select(f => f.Sha256),
|
||||
plan.LastCopies, [], ct).ConfigureAwait(false);
|
||||
var done = await ServerAsync(() => remote.DeleteFramesAsync(remoteId, new FrameDeleteRequest(plan.FrameIds, plan.FramesVersion, DryRun: false), ct))
|
||||
.ConfigureAwait(false);
|
||||
Log.Info(LogCategory, $"{done.Photos} photo(s) of server sequence {remoteId} deleted on this PC went to the server's trash");
|
||||
@@ -643,12 +710,14 @@ public sealed class CopyEngine(SyncService sync, ArchiveService archives, Integr
|
||||
var twins = new List<CopyTwin>();
|
||||
foreach (var pair in pairs)
|
||||
{
|
||||
var here = projects.FirstOrDefault(p => p.Home.IsArchive && p.Home.SequenceId == pair.LocalId).Name;
|
||||
var there = projects.FirstOrDefault(p => !p.Home.IsArchive && p.Home.SequenceId == pair.RemoteId && identity.Same(p.Home.Server, pair.Server)).Name;
|
||||
if (here is null && there is null) continue;
|
||||
// Every project of each home: the picker marks only those whose sibling the other home holds.
|
||||
List<string> here = [.. projects.Where(p => p.Home.IsArchive && p.Home.SequenceId == pair.LocalId).Select(p => p.Name)];
|
||||
List<string> there = [.. projects.Where(p => !p.Home.IsArchive && p.Home.SequenceId == pair.RemoteId && identity.Same(p.Home.Server, pair.Server))
|
||||
.Select(p => p.Name)];
|
||||
if (here.Count == 0 || there.Count == 0) continue;
|
||||
var local = await Db.Sequences.GetAsync(pair.LocalId, ct).ConfigureAwait(false);
|
||||
twins.Add(new CopyTwin(pair.Id, pair.LocalId, local is null ? string.Empty : archives.GetValueOrDefault(local.ArchiveId) ?? string.Empty, here, pair.Server!,
|
||||
pair.RemoteId!.Value, there, ServerName(pair.Server!)));
|
||||
pair.RemoteId!.Value, there, ServerName(pair.Server!), _context(null).PcName));
|
||||
}
|
||||
return twins;
|
||||
}
|
||||
|
||||
@@ -96,6 +96,7 @@ public sealed class CopyReviewBuilder(ChronosDatabase db, ProjectService project
|
||||
return new CopyReview(copy, hereFacts, thereFacts, photos, details, projectsView, renders, can)
|
||||
{
|
||||
ExcludedHere = CopyPayload.ExcludedKeys(CopyPayload.Portable(herePayload, herePhotos)),
|
||||
ExcludedThere = CopyPayload.ExcludedKeys(CopyPayload.Portable(therePayload, therePhotos)),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -31,6 +31,9 @@ public sealed record CopyReview(FoundCopy Copy, CopyFacts Here, CopyFacts There,
|
||||
{
|
||||
/// <summary>The photos (by key) this PC's Main leaves out: of a photo kept in two versions, the one Main does not use.</summary>
|
||||
public IReadOnlySet<string> ExcludedHere { get; init; } = new HashSet<string>(StringComparer.Ordinal);
|
||||
|
||||
/// <summary>The photos (by key) the other side's Main leaves out (a merge keeping the pair's other sequence marks its Main's versions).</summary>
|
||||
public IReadOnlySet<string> ExcludedThere { get; init; } = new HashSet<string>(StringComparer.Ordinal);
|
||||
}
|
||||
|
||||
/// <summary>Whether Integrate (or Merge), Link only and Delete on server are possible, and why not (<see cref="CopyBlock"/>s).</summary>
|
||||
@@ -40,9 +43,29 @@ public sealed record CopyCapabilities(bool Integrate, bool LinkOnly, bool Delete
|
||||
public sealed record FoundCopyView(FoundCopy Copy, CopyFacts Here, CopyFacts There);
|
||||
|
||||
/// <summary>
|
||||
/// The same time-lapse with workspace projects at two homes (a linked or integrated pair): the Edit picker marks each as the
|
||||
/// other's twin. LocalHome names the local copy's archive; a project name is null when that home has no workspace project.
|
||||
/// ServerName is the name shown for Server (the key itself when no name is known).
|
||||
/// The same time-lapse with workspace projects at two homes (a linked or integrated pair): the Edit picker marks a project
|
||||
/// as a twin only when the other home holds its sibling (<see cref="CounterpartOf"/>). LocalHome names the local copy's
|
||||
/// archive; LocalProjects and ServerProjects are every workspace project name of each home (empty when it has none).
|
||||
/// ServerName is the name shown for Server (the key itself when no name is known); PcName is this PC's, which a project
|
||||
/// copied across to the server is suffixed with on a clash.
|
||||
/// </summary>
|
||||
public sealed record CopyTwin(Guid CopyId, Guid LocalId, string LocalHome, string? LocalProject, string Server, Guid RemoteId, string? ServerProject,
|
||||
string ServerName);
|
||||
public sealed record CopyTwin(Guid CopyId, Guid LocalId, string LocalHome, IReadOnlyList<string> LocalProjects, string Server, Guid RemoteId,
|
||||
IReadOnlyList<string> ServerProjects, string ServerName, string PcName)
|
||||
{
|
||||
/// <summary>
|
||||
/// The project of the other home that is the sibling of <paramref name="name"/> (a project at the server home when
|
||||
/// <paramref name="atServerHome"/>): the same name, or the name Copy across gives it on a clash ("Vertical (STUDIO-PC)",
|
||||
/// "Vertical (Studio NAS)"), either way round, ignoring case. Null when the other home has none.
|
||||
/// <paramref name="serverName"/>: another name the server is shown by (the signed-in server's own).
|
||||
/// </summary>
|
||||
public string? CounterpartOf(string name, bool atServerHome, string? serverName = null)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(name);
|
||||
var suffixes = new[] { PcName, ServerName, serverName }.Where(s => !string.IsNullOrWhiteSpace(s)).Select(s => $" ({s!.Trim()})").ToList();
|
||||
var others = atServerHome ? LocalProjects : ServerProjects;
|
||||
return others.FirstOrDefault(o => Same(o, name))
|
||||
?? others.FirstOrDefault(o => suffixes.Any(s => Same(o, name + s) || Same(name, o + s)));
|
||||
|
||||
static bool Same(string a, string b) => string.Equals(a, b, StringComparison.OrdinalIgnoreCase);
|
||||
}
|
||||
}
|
||||
@@ -44,11 +44,18 @@ public interface ICopyEngine
|
||||
|
||||
Task UnlinkAsync(Guid copyId, ISyncRemote? remote, CancellationToken ct);
|
||||
|
||||
/// <summary>The dry run of moving photos of the local copy (by photo key) to its archive trash, with the last copies among them.</summary>
|
||||
Task<TrashHerePlan> PlanTrashHereAsync(Guid copyId, IReadOnlyCollection<string> photoKeys, CancellationToken ct);
|
||||
/// <summary>
|
||||
/// The dry run of moving photos (by photo key) of <paramref name="fromSequence"/> to its archive trash, with the last copies
|
||||
/// among them: the pair's local copy, or for two copies of this PC either one (a merge trashes from the kept one); the
|
||||
/// other side is the pair's other sequence.
|
||||
/// </summary>
|
||||
Task<TrashHerePlan> PlanTrashHereAsync(Guid copyId, Guid fromSequence, IReadOnlyCollection<string> photoKeys, CancellationToken ct);
|
||||
|
||||
/// <summary>Applies <paramref name="plan"/>, refusing photos no longer deleted on the other side; returns the photos moved.</summary>
|
||||
Task<int> TrashHereAsync(Guid copyId, FrameDeletePlan plan, ISyncRemote? remote, CancellationToken ct);
|
||||
/// <summary>
|
||||
/// Applies <paramref name="plan"/>, refusing photos no longer deleted on the other side (or held there again) and a plan
|
||||
/// whose photos became last copies it did not list; returns the photos moved.
|
||||
/// </summary>
|
||||
Task<int> TrashHereAsync(Guid copyId, TrashHerePlan plan, ISyncRemote? remote, CancellationToken ct);
|
||||
|
||||
/// <summary>The server's dry run of moving photos of the server copy (by photo key) to the server's trash.</summary>
|
||||
Task<TrashTherePlan> PlanTrashThereAsync(Guid copyId, ISyncRemote remote, IReadOnlyCollection<string> photoKeys, CancellationToken ct);
|
||||
|
||||
@@ -227,8 +227,14 @@ internal sealed class IntegrateJobHandler(SyncService sync, IntegratePlanner pla
|
||||
{
|
||||
case IntegrateStage.Link: await LinkAsync().ConfigureAwait(false); break;
|
||||
case IntegrateStage.Photos: await PhotosAsync().ConfigureAwait(false); break;
|
||||
case IntegrateStage.Trash: await TrashAsync().ConfigureAwait(false); break;
|
||||
case IntegrateStage.Details: await DetailsAsync().ConfigureAwait(false); break;
|
||||
case IntegrateStage.Trash:
|
||||
await EnsureStillOursAsync().ConfigureAwait(false);
|
||||
await TrashAsync().ConfigureAwait(false);
|
||||
break;
|
||||
case IntegrateStage.Details:
|
||||
await EnsureStillOursAsync().ConfigureAwait(false);
|
||||
await DetailsAsync().ConfigureAwait(false);
|
||||
break;
|
||||
case IntegrateStage.Projects: await ProjectsAsync().ConfigureAwait(false); break;
|
||||
}
|
||||
journal.Stage++;
|
||||
@@ -244,10 +250,37 @@ internal sealed class IntegrateJobHandler(SyncService sync, IntegratePlanner pla
|
||||
{
|
||||
var link = await owner.Sync.Links.GetAsync(journal.Server, journal.RemoteId, _ct).ConfigureAwait(false);
|
||||
if (link?.LocalId == journal.LocalId) return;
|
||||
// The user gave either side another link since the journal was written: that newer link is never undone; the
|
||||
// journal goes and a retry plans again (and shows the link taken).
|
||||
var mine = await owner.Sync.LinkOfAsync(journal.Server, journal.LocalId, _ct).ConfigureAwait(false);
|
||||
if (link?.LocalId is not null || (mine is not null && mine.RemoteId != journal.RemoteId)) Stale();
|
||||
var local = await _db.Sequences.GetAsync(journal.LocalId, _ct).ConfigureAwait(false) ?? throw new StaleCopyPlanException();
|
||||
await owner.Sync.LinkAsync(journal.Server, journal.RemoteId, local, _ct).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
/// <summary>The journal no longer holds: it goes, and <see cref="StaleCopyPlanException"/> is thrown.</summary>
|
||||
[System.Diagnostics.CodeAnalysis.DoesNotReturn]
|
||||
private void Stale()
|
||||
{
|
||||
try
|
||||
{
|
||||
IntegrateJournal.Delete(paths, journal.JobId);
|
||||
}
|
||||
catch (Exception ex) when (ex is IOException or UnauthorizedAccessException)
|
||||
{
|
||||
Log.Warning("sync", $"The stale journal of Integrate {journal.JobId} was not removed", ex);
|
||||
}
|
||||
throw new StaleCopyPlanException();
|
||||
}
|
||||
|
||||
/// <summary>Before a stage that trashes or writes: the pair is still this job's and the link still joins its two sides.</summary>
|
||||
private async Task EnsureStillOursAsync()
|
||||
{
|
||||
var copy = await owner.Copies.GetAsync(journal.CopyId, _ct).ConfigureAwait(false);
|
||||
var link = await owner.Sync.Links.GetAsync(journal.Server, journal.RemoteId, _ct).ConfigureAwait(false);
|
||||
if (copy is not { State: CopyState.Integrating } || copy.JobId != journal.JobId || link?.LocalId != journal.LocalId) Stale();
|
||||
}
|
||||
|
||||
// ---- photos ----
|
||||
|
||||
private async Task PhotosAsync()
|
||||
|
||||
@@ -186,7 +186,7 @@ public sealed class SyncService
|
||||
var sweep = gone.Count(l => l.LocalId is not null) >= SweepLinks && found == 0;
|
||||
if (sweep) Log.Warning(LogCategory, $"Every linked sequence of {remote.Server} answered 404 at once ({gone.Count}): none is marked deleted on the server");
|
||||
foreach (var link in gone) await ForgetAsync(link, sweep ? null : refreshId, cancellationToken).ConfigureAwait(false);
|
||||
await AskGoneAgainAsync(remote, listing, refreshId, cancellationToken).ConfigureAwait(false);
|
||||
await AskGoneAgainAsync(remote, listing, refreshId, confirm: !sweep, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
finally
|
||||
{
|
||||
@@ -250,20 +250,24 @@ public sealed class SyncService
|
||||
/// <summary>
|
||||
/// Unlinks a server sequence from its local copy (owner review 6, #73): the link stays as an observation of the server's
|
||||
/// sequence, the local copy reads as this PC's only, and the pair is kept apart (asked again only by a large later change).
|
||||
/// Nothing happens when the server sequence has no local copy.
|
||||
/// Nothing happens when the server sequence is not linked to <paramref name="localId"/> (no local copy, or another one:
|
||||
/// that pair's link and state are not this one's to change). A pair being integrated is refused.
|
||||
/// </summary>
|
||||
public async Task UnlinkAsync(string server, Guid remoteId, CancellationToken cancellationToken = default)
|
||||
public async Task UnlinkAsync(string server, Guid remoteId, Guid localId, CancellationToken cancellationToken = default)
|
||||
{
|
||||
await _gate.WaitAsync(cancellationToken).ConfigureAwait(false);
|
||||
try
|
||||
{
|
||||
if (await _links.GetAsync(server, remoteId, cancellationToken).ConfigureAwait(false) is not { LocalId: { } localId } link) return;
|
||||
if (await _links.GetAsync(server, remoteId, cancellationToken).ConfigureAwait(false) is not { LocalId: { } linked } link || linked != localId) return;
|
||||
var row = await Copies.FindRemoteAsync(localId, server, remoteId, cancellationToken).ConfigureAwait(false);
|
||||
if (row is { State: CopyState.Integrating }) throw new InvalidOperationException(Loc.L("Errors.Copies.Busy"));
|
||||
await _links.UpsertAsync(Unlinked(link), cancellationToken).ConfigureAwait(false);
|
||||
await _links.SetLocalStateAsync(localId, SyncState.LocalOnly, cancellationToken).ConfigureAwait(false);
|
||||
var row = await Copies.FindRemoteAsync(localId, server, remoteId, cancellationToken).ConfigureAwait(false)
|
||||
?? await Copies.EnsureLinkedAsync(server, remoteId, localId, cancellationToken).ConfigureAwait(false);
|
||||
await Copies.SetStateAsync(row.Id, null, CopyState.KeptApart, new CopyAnswer(row.Fingerprint, row.Score.Shared, null, false, DateTimeOffset.UtcNow),
|
||||
cancellationToken).ConfigureAwait(false);
|
||||
row ??= await Copies.EnsureLinkedAsync(server, remoteId, localId, cancellationToken).ConfigureAwait(false);
|
||||
// From the state read: a pair that entered an integration since is left to it.
|
||||
if (!await Copies.SetStateAsync(row.Id, row.State, CopyState.KeptApart,
|
||||
new CopyAnswer(row.Fingerprint, row.Score.Shared, null, false, DateTimeOffset.UtcNow), cancellationToken).ConfigureAwait(false))
|
||||
Log.Warning(LogCategory, $"{link.Title} unlinked; its pair changed meanwhile and keeps its state");
|
||||
Log.Info(LogCategory, $"{link.Title} unlinked from its copy on this PC");
|
||||
}
|
||||
finally
|
||||
@@ -794,7 +798,7 @@ public sealed class SyncService
|
||||
/// pair read "deleted on server". A refresh's first 404 forgot the link (the pair is asked about again); a job's 404
|
||||
/// kept it (the pair stays Linked or Integrated).
|
||||
/// </summary>
|
||||
private async Task AskGoneAgainAsync(ISyncRemote remote, IReadOnlyList<SequenceDto> listing, Guid refreshId, CancellationToken cancellationToken)
|
||||
private async Task AskGoneAgainAsync(ISyncRemote remote, IReadOnlyList<SequenceDto> listing, Guid refreshId, bool confirm, CancellationToken cancellationToken)
|
||||
{
|
||||
var listed = listing.Select(d => d.Id).ToHashSet();
|
||||
var now = DateTimeOffset.UtcNow;
|
||||
@@ -806,7 +810,8 @@ public sealed class SyncService
|
||||
await BackAsync(pair, remoteId).ConfigureAwait(false);
|
||||
continue;
|
||||
}
|
||||
if (pair.RemoteGoneAt is { } at && now - at < GoneRecheck) continue;
|
||||
// A sweep of 404s (the server serves something else now) confirms no earlier hit either.
|
||||
if (!confirm || (pair.RemoteGoneAt is { } at && now - at < GoneRecheck)) continue;
|
||||
try
|
||||
{
|
||||
await remote.GetSequenceAsync(remoteId, cancellationToken).ConfigureAwait(false);
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
using System.Windows;
|
||||
using System.Windows.Automation;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Media;
|
||||
using Chronos.App.DesignTime;
|
||||
using Chronos.App.Infrastructure;
|
||||
using Chronos.App.Library;
|
||||
using Chronos.App.Sections;
|
||||
@@ -176,6 +180,9 @@ public sealed class CopyScreenSmokeTests
|
||||
var detail = merge.Details[0];
|
||||
Assert.Equal(detail.Line.There ?? Loc.L("Server.Sync.None"), detail.HereToolTip);
|
||||
Assert.Equal(detail.Line.Here ?? Loc.L("Server.Sync.None"), detail.ThereToolTip);
|
||||
// The segments say what choosing them does, with the worded value each takes, not the raw value.
|
||||
Assert.Equal(Loc.L("Tooltips.Server.Copies.Detail.UseKept", detail.HereText), detail.HereChoiceToolTip);
|
||||
Assert.Equal(Loc.L("Tooltips.Server.Copies.Detail.UseOther", detail.ThereText), detail.ThereChoiceToolTip);
|
||||
detail.ChoiceIndex = 0;
|
||||
await merge.PlanNowAsync();
|
||||
|
||||
@@ -215,6 +222,16 @@ public sealed class CopyScreenSmokeTests
|
||||
var scroll = Assert.Contains(app.FindAll<ScrollViewer>(), s => s.IsVisible && s.ScrollableHeight > 0
|
||||
&& s.Content is Grid grid && grid.Children.OfType<ItemsControl>().Count() == 2);
|
||||
Assert.True(scroll.ViewportHeight > 0);
|
||||
// Each heading shares its list's column, so the scroll bar never moves a list off its heading.
|
||||
var lists = ((Grid)scroll.Content).Children.OfType<ItemsControl>().ToList();
|
||||
var headings = ((Grid)scroll.Content).Children.OfType<TextBlock>().ToList();
|
||||
Assert.Count(2, headings);
|
||||
for (var i = 0; i < 2; i++)
|
||||
{
|
||||
var window = Window.GetWindow(scroll);
|
||||
Assert.Approximately(lists[i].TranslatePoint(new Point(0, 0), window).X, headings[i].TranslatePoint(new Point(0, 0), window).X, 0.5,
|
||||
$"heading {i} starts where its list does");
|
||||
}
|
||||
// The sample pair has its own projects back for the other scenes.
|
||||
var lighthouse = shell.Server.Sync.Copies.Pairs.Single(p => p.Here.Title == CopyScenes.Lighthouse);
|
||||
Assert.Equal(2, (await shell.Services.Sync.Copies!.CompareAsync(lighthouse.Copy.Id, null, CancellationToken.None)).Projects.Here.Count);
|
||||
@@ -370,6 +387,217 @@ public sealed class CopyScreenSmokeTests
|
||||
CopyScenes.Reset(shell);
|
||||
});
|
||||
|
||||
[Test]
|
||||
public Task ASwappedMergeOffersToTrashOnDeletedInOtherFromTheKeptSequenceOnly() => ScreenHost.RunAsync(async () =>
|
||||
{
|
||||
await using var app = await StartAsync();
|
||||
var shell = app.Shell;
|
||||
var engine = (SampleCopyEngine)shell.Services.Sync.Copies!;
|
||||
var list = shell.Server.Sync.Copies;
|
||||
await CopyScenes.ShowAsync(shell, "server-copies");
|
||||
var alps = list.Pairs.Single(p => p.Here.Title == CopyScenes.Alps);
|
||||
var start = new DateTime(2025, 7, 14, 5, 30, 0);
|
||||
// The pair's first deleted 3 photos its other still holds (Deleted here), and the other deleted 2 the first holds.
|
||||
var restore = engine.With(alps.Copy.Id, p => p with
|
||||
{
|
||||
Photos = [.. p.Photos, .. SampleCopies.Photos(PhotoClass.DeletedHere, 3, start, 950, here: false, there: true),
|
||||
.. SampleCopies.Photos(PhotoClass.DeletedThere, 2, start, 960, here: true, there: false)],
|
||||
});
|
||||
try
|
||||
{
|
||||
var dialog = Assert.NotNull(list.Open(alps, CopyDialogPart.Photos, PhotoClass.DeletedHere));
|
||||
await dialog.LoadAsync();
|
||||
Assert.Equal(alps.Copy.OtherId, dialog.KeepOptions.Single(o => o.IsChecked).SequenceId);
|
||||
|
||||
// Kept: the pair's other. Its "Deleted in other" (the first deleted them) offers To trash…, from the kept one.
|
||||
var deletedInOther = dialog.Classes.Single(c => c.Class == PhotoClass.DeletedHere);
|
||||
Assert.Equal(CopyText.Class(PhotoClass.DeletedThere, merge: true), deletedInOther.Text);
|
||||
dialog.SelectedClass = deletedInOther;
|
||||
Assert.True(dialog.CanTrashHere);
|
||||
var plan = await dialog.PlanTrashHereAsync([dialog.Photos[0].Key]);
|
||||
Assert.Equal(alps.Copy.OtherId, plan.Plan.Sequence.Id);
|
||||
|
||||
// "Deleted in kept": its frames are the dropped sequence's, which go with the merge; no To trash….
|
||||
var deletedInKept = dialog.Classes.Single(c => c.Class == PhotoClass.DeletedThere);
|
||||
Assert.Equal(CopyText.Class(PhotoClass.DeletedHere, merge: true), deletedInKept.Text);
|
||||
dialog.SelectedClass = deletedInKept;
|
||||
Assert.False(dialog.CanTrashHere);
|
||||
|
||||
// Kept: the pair's first. Now Deleted there reads "Deleted in other" and trashes from the first.
|
||||
dialog.KeepOptions.Single(o => o.SequenceId == alps.Copy.LocalId).IsChecked = true;
|
||||
dialog.SelectedClass = dialog.Classes.Single(c => c.Class == PhotoClass.DeletedThere);
|
||||
Assert.True(dialog.CanTrashHere);
|
||||
Assert.Equal(alps.Copy.LocalId, (await dialog.PlanTrashHereAsync([dialog.Photos[0].Key])).Plan.Sequence.Id);
|
||||
dialog.SelectedClass = dialog.Classes.Single(c => c.Class == PhotoClass.DeletedHere);
|
||||
Assert.False(dialog.CanTrashHere);
|
||||
}
|
||||
finally
|
||||
{
|
||||
restore();
|
||||
CopyScenes.Reset(shell);
|
||||
}
|
||||
});
|
||||
|
||||
[Test]
|
||||
public Task InMainMarksTheVersionTheKeptSequencesMainUses() => ScreenHost.RunAsync(async () =>
|
||||
{
|
||||
await using var app = await StartAsync();
|
||||
var shell = app.Shell;
|
||||
var dialog = Assert.NotNull(await CopyScenes.ShowAsync(shell, "server-copies-versions"));
|
||||
var alps = shell.Server.Sync.Copies.Pairs.Single(p => p.Here.Title == CopyScenes.Alps);
|
||||
var review = await shell.Services.Sync.Copies!.CompareAsync(alps.Copy.Id, null, CancellationToken.None);
|
||||
Assert.Equal(alps.Copy.OtherId, dialog.KeepOptions.Single(o => o.IsChecked).SequenceId);
|
||||
// The two Mains use different versions: the kept sequence's (the pair's other) is marked.
|
||||
Assert.Count(1, dialog.Photos.Where(p => p.InMain));
|
||||
foreach (var marked in dialog.Photos.Where(x => x.InMain)) Assert.DoesNotContain(marked.Key, review.ExcludedThere);
|
||||
await app.ExpectAsync<ServerView>("server-copies-versions");
|
||||
|
||||
// Both sides hold both versions: the side reads whole beside "In Main", and Drop… keeps its gap.
|
||||
var view = app.FindAll<ServerView>().First(v => v.IsVisible);
|
||||
foreach (var row in app.FindAll<ListBoxItem>().Where(i => i is { DataContext: CopyPhotoRow, IsVisible: true }))
|
||||
{
|
||||
var photo = (CopyPhotoRow)row.DataContext;
|
||||
var side = Descendants<TextBlock>(row).Single(t => t.Text == photo.SideText);
|
||||
// Layout rounding may take under a pixel; a trimmed text loses a whole character to the ellipsis.
|
||||
Assert.True(Needed(side, side.Text) <= side.ActualWidth + 1.0, $"'{side.Text}' needs {Needed(side, side.Text):0.0} px, has {side.ActualWidth:0.0}");
|
||||
var drop = Descendants<Button>(row).Single(b => b.IsVisible);
|
||||
Assert.True(drop.Margin.Left >= 10, "Drop… keeps a gap from the side cell");
|
||||
}
|
||||
Assert.NotNull(view);
|
||||
|
||||
// Kept: the pair's first. The marker follows its Main.
|
||||
dialog.KeepOptions.Single(o => o.SequenceId == alps.Copy.LocalId).IsChecked = true;
|
||||
Assert.Count(1, dialog.Photos.Where(p => p.InMain));
|
||||
foreach (var marked in dialog.Photos.Where(x => x.InMain)) Assert.DoesNotContain(marked.Key, review.ExcludedHere);
|
||||
CopyScenes.Reset(shell);
|
||||
});
|
||||
|
||||
[Test]
|
||||
public Task ATwinNeedsItsSiblingAtTheOtherHome() => ScreenHost.RunAsync(async () =>
|
||||
{
|
||||
await using var app = await StartAsync();
|
||||
var shell = app.Shell;
|
||||
var engine = (SampleCopyEngine)shell.Services.Sync.Copies!;
|
||||
// The integrated pair: Main and Vertical on this PC, only Main on the server.
|
||||
var bridge = engine.Pairs.Single(p => p.Copy is { Kind: CopyKind.LocalServer, State: CopyState.Integrated });
|
||||
Assert.SequenceEqual(["Main", "Vertical"], bridge.Projects.Here.Select(p => p.Name));
|
||||
Assert.SequenceEqual(["Main"], bridge.Projects.There.Select(p => p.Name));
|
||||
await CopyScenes.ShowAsync(shell, "edit-picker-twins");
|
||||
var picker = shell.Sequence.Picker;
|
||||
var home = Chronos.App.Workspace.WorkspaceHost.ArchiveHome(bridge.Copy.LocalId);
|
||||
IReadOnlyList<Chronos.App.Workspace.WorkspaceEntry> entries =
|
||||
[
|
||||
new(Guid.CreateVersion7(), bridge.Copy.LocalId, "Main", true, home, bridge.Here.Title, HasMedia: true, SampleData.Now),
|
||||
new(Guid.CreateVersion7(), bridge.Copy.LocalId, "Vertical", false, home, bridge.Here.Title, HasMedia: true, SampleData.Now),
|
||||
];
|
||||
await picker.ShowSampleWorkspaceAsync(entries, new Chronos.Data.Workspaces.WorkspaceStatus(Chronos.Data.Workspaces.WorkspaceState.InSync, false, 0, 0,
|
||||
false, false, false, null, null, null));
|
||||
|
||||
var main = picker.WorkspaceItems.Single(i => i.Entry.Name == "Main");
|
||||
var vertical = picker.WorkspaceItems.Single(i => i.Entry.Name == "Vertical");
|
||||
Assert.True(main.HasTwin, "Main has its sibling on the server");
|
||||
Assert.Contains(main.Name, main.TwinToolTip!);
|
||||
Assert.False(vertical.HasTwin, "Vertical is only on this PC");
|
||||
CopyScenes.Reset(shell);
|
||||
});
|
||||
|
||||
[Test]
|
||||
public Task TheDialogsPolicyAndVersionChoicesFitTheirBoxesInEveryLanguage() => ScreenHost.RunAsync(async () =>
|
||||
{
|
||||
await using var app = await StartAsync();
|
||||
var shell = app.Shell;
|
||||
var dialog = Assert.NotNull(await CopyScenes.ShowAsync(shell, "server-copies-choose"));
|
||||
await app.ExpectAsync<ServerView>("server-copies-choose");
|
||||
var policy = app.FindAll<ComboBox>().Single(c => c.IsVisible && AutomationProperties.GetName(c) == Loc.L("Server.Copies.Policy.Label"));
|
||||
var version = app.FindAll<ComboBox>().First(c => c.IsVisible && c.DataContext is CopyPhotoRow);
|
||||
List<string> misses = [];
|
||||
try
|
||||
{
|
||||
foreach (var language in Languages.Shipped)
|
||||
{
|
||||
UiLanguage.Apply(language);
|
||||
app.Window.UpdateLayout();
|
||||
await app.Window.Dispatcher.InvokeAsync(() => { }, System.Windows.Threading.DispatcherPriority.ApplicationIdle);
|
||||
foreach (var merge in new[] { false, true })
|
||||
{
|
||||
Fits(misses, language, policy, CopyDialogViewModel.PolicyOptions(merge).Select(o => o.Label));
|
||||
Fits(misses, language, version, CopyDialogViewModel.VersionChoices(merge).Select(o => o.Label));
|
||||
}
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
UiLanguage.Apply("en");
|
||||
}
|
||||
Assert.True(misses.Count == 0, string.Join(Environment.NewLine, misses));
|
||||
Assert.NotNull(dialog);
|
||||
CopyScenes.Reset(shell);
|
||||
});
|
||||
|
||||
[Test]
|
||||
public Task TheMatchesSettingsFitTheirBoxesInEveryLanguage() => ScreenHost.RunAsync(async () =>
|
||||
{
|
||||
await using var app = await StartAsync();
|
||||
var shell = app.Shell;
|
||||
var settings = shell.Settings;
|
||||
shell.Navigate(SectionKey.Settings);
|
||||
settings.Page = SettingsPage.Server;
|
||||
await app.ExpectAsync<Chronos.App.Sections.SettingsView>("settings-server");
|
||||
string[] names = ["Settings.Server.CopyLinking", "Settings.Server.CopyPhotos", "Settings.Server.CopyProjects"];
|
||||
List<string> misses = [];
|
||||
try
|
||||
{
|
||||
foreach (var language in Languages.Shipped)
|
||||
{
|
||||
UiLanguage.Apply(language);
|
||||
settings.CopyRows.Refresh();
|
||||
app.Window.UpdateLayout();
|
||||
await app.Window.Dispatcher.InvokeAsync(() => { }, System.Windows.Threading.DispatcherPriority.ApplicationIdle);
|
||||
foreach (var name in names)
|
||||
{
|
||||
var box = app.FindAll<ComboBox>().Single(c => c.IsVisible && AutomationProperties.GetName(c) == Loc.L(name));
|
||||
var labels = box.ItemsSource.Cast<object>().Select(o => (string)o.GetType().GetProperty("Label")!.GetValue(o)!);
|
||||
Fits(misses, language, box, labels);
|
||||
}
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
UiLanguage.Apply("en");
|
||||
settings.CopyRows.Refresh();
|
||||
}
|
||||
Assert.True(misses.Count == 0, string.Join(Environment.NewLine, misses));
|
||||
});
|
||||
|
||||
/// <summary>
|
||||
/// Adds to <paramref name="misses"/> each label that does not show whole in <paramref name="box"/>'s selection box (its
|
||||
/// content site, inside the margins).
|
||||
/// </summary>
|
||||
private static void Fits(List<string> misses, string language, ComboBox box, IEnumerable<string> labels)
|
||||
{
|
||||
box.ApplyTemplate();
|
||||
var site = (FrameworkElement)box.Template.FindName("ContentSite", box);
|
||||
var room = box.ActualWidth - site.Margin.Left - site.Margin.Right - box.BorderThickness.Left - box.BorderThickness.Right;
|
||||
var probe = new TextBlock { FontFamily = box.FontFamily, FontSize = box.FontSize, FontWeight = box.FontWeight, FlowDirection = box.FlowDirection };
|
||||
foreach (var label in labels.Where(l => Needed(probe, l) > room + 0.5))
|
||||
misses.Add($"{language}: '{label}' needs {Needed(probe, label):0.0} px, its box has {room:0.0}");
|
||||
}
|
||||
|
||||
/// <summary>The width <paramref name="text"/> takes in <paramref name="cell"/>'s font.</summary>
|
||||
private static double Needed(TextBlock cell, string text) => new FormattedText(text, System.Globalization.CultureInfo.CurrentUICulture, cell.FlowDirection,
|
||||
new Typeface(cell.FontFamily, cell.FontStyle, cell.FontWeight, cell.FontStretch), cell.FontSize, Brushes.Black, 1.0).WidthIncludingTrailingWhitespace;
|
||||
|
||||
private static IEnumerable<T> Descendants<T>(DependencyObject node)
|
||||
where T : DependencyObject
|
||||
{
|
||||
for (var i = 0; i < VisualTreeHelper.GetChildrenCount(node); i++)
|
||||
{
|
||||
var child = VisualTreeHelper.GetChild(node, i);
|
||||
if (child is T match) yield return match;
|
||||
foreach (var inner in Descendants<T>(child)) yield return inner;
|
||||
}
|
||||
}
|
||||
|
||||
private static async Task<Toast> ToastAsync(List<Toast> raised, string title)
|
||||
{
|
||||
for (var i = 0; i < 250 && !raised.Any(t => t.Title == title); i++) await Task.Delay(20);
|
||||
|
||||
@@ -46,8 +46,13 @@ public sealed class CopyTextTests
|
||||
Assert.SequenceEqual([CopyAction.Compare, CopyAction.Merge, CopyAction.KeepApart], CopyText.Actions(Copy(CopyState.Candidate, CopyKind.LocalLocal)));
|
||||
Assert.SequenceEqual([CopyAction.Compare, CopyAction.AskAgain], CopyText.Actions(Copy(CopyState.KeptApart)));
|
||||
Assert.SequenceEqual([CopyAction.Compare, CopyAction.Integrate, CopyAction.Unlink], CopyText.Actions(Copy(CopyState.Linked)));
|
||||
Assert.SequenceEqual([CopyAction.Compare, CopyAction.Integrate, CopyAction.Unlink, CopyAction.Review],
|
||||
CopyText.Actions(Copy(CopyState.Linked, deletedThere: 3)));
|
||||
// Three buttons at most: a linked pair with photos deleted there reaches Integrate through Compare… or Review.
|
||||
Assert.SequenceEqual([CopyAction.Compare, CopyAction.Unlink, CopyAction.Review], CopyText.Actions(Copy(CopyState.Linked, deletedThere: 3)));
|
||||
foreach (var state in Enum.GetValues<CopyState>())
|
||||
{
|
||||
foreach (var copy in new[] { Copy(state), Copy(state, deletedThere: 3), Copy(state, gone: true), Copy(state, CopyKind.LocalLocal, deletedThere: 3) })
|
||||
Assert.LessOrEqual(CopyText.Actions(copy).Count, 3, $"{state}: at most three row buttons");
|
||||
}
|
||||
Assert.SequenceEqual([CopyAction.Compare, CopyAction.Unlink], CopyText.Actions(Copy(CopyState.Integrated)));
|
||||
Assert.SequenceEqual([CopyAction.Compare, CopyAction.Unlink, CopyAction.Review], CopyText.Actions(Copy(CopyState.Integrated, deletedThere: 3)));
|
||||
Assert.SequenceEqual([CopyAction.Pause], CopyText.Actions(Copy(CopyState.Integrating), JobState.Running));
|
||||
|
||||
@@ -687,6 +687,47 @@ public abstract class SequenceMergerTests(TestContext context) : DatabaseTest(co
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
public async Task AFrameRemovedFromTheOtherAfterAStoppedTrashMakesTheNextRetryPlanAgain()
|
||||
{
|
||||
var fx = await FixtureAsync();
|
||||
var merger = Merger(fx);
|
||||
var workspace = new FakeWorkspace();
|
||||
var (engine, handler) = Engine(fx, merger, new FakeProjects(), workspace);
|
||||
await engine.StartAsync(Ct);
|
||||
var keep = await SequenceAsync(fx, "keep", [(1, 0, "IMG_0001.JPG")]);
|
||||
var drop = await SequenceAsync(fx, "drop", [(1, 0, "IMG_0001.JPG"), (2, 10_000, "IMG_0002.JPG"), (3, 20_000, "IMG_0003.JPG")]);
|
||||
var copy = await PairAsync(fx, keep.Id, drop.Id);
|
||||
handler.BeforeStage = stage =>
|
||||
{
|
||||
if (stage == MergeStage.Trash) workspace.Unsent.Add(drop.Id);
|
||||
return Task.CompletedTask;
|
||||
};
|
||||
var plan = await merger.PlanAsync(copy.Id, keep.Id, drop.Id, await ChoicesAsync(fx, keep.Id, drop.Id, CopyPhotoPolicy.Union), NoContext, Ct);
|
||||
var job = await merger.EnqueueAsync(engine, new FoundCopyStore(fx.Db), plan, keep.DisplayTitle, Ct);
|
||||
await fx.WaitForAsync(job.Id, JobState.Failed);
|
||||
Assert.True(File.Exists(MergeJournal.PathFor(fx.Paths, job.Id)), "an unsent workspace keeps the journal");
|
||||
|
||||
// A frame of the other goes to the trash while the merge waits: its frames version never goes back.
|
||||
var gone = (await fx.Db.Frames.ListBySequenceAsync(drop.Id)).First(f => f.Sha256 == Sha(3, 20_000));
|
||||
var trash = await fx.Service.FrameTrash.PlanDeleteAsync(drop.Id, [gone.Id], null, fx.Ct, job.Id);
|
||||
await fx.Service.FrameTrash.DeleteAsync(trash, null, null, fx.Ct, job.Id);
|
||||
handler.BeforeStage = null;
|
||||
workspace.Unsent.Clear();
|
||||
await engine.ResumeAsync(job.Id, Ct);
|
||||
var failed = await fx.WaitForAsync(job.Id, JobState.Failed);
|
||||
|
||||
Assert.Equal(Chronos.Core.Localization.Loc.L("Errors.Copies.Changed", drop.DisplayTitle), failed.Error);
|
||||
Assert.NotNull(await fx.Db.Sequences.GetAsync(drop.Id));
|
||||
Assert.False(File.Exists(MergeJournal.PathFor(fx.Paths, job.Id)), "the next run plans again");
|
||||
|
||||
// The next Retry plans again and asks for a new comparison instead of the same error.
|
||||
await engine.ResumeAsync(job.Id, Ct);
|
||||
failed = await fx.WaitForAsync(job.Id, JobState.Failed);
|
||||
Assert.Equal(Chronos.Core.Localization.Loc.L("Errors.Copies.StalePlan"), failed.Error);
|
||||
Assert.NotNull(await fx.Db.Sequences.GetAsync(drop.Id));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public async Task APhotoSettledThroughAThirdSequenceThatIsGoneByTheTrashKeepsTheOther()
|
||||
{
|
||||
|
||||
@@ -50,6 +50,21 @@ public sealed class CopyEngineTests(TestContext context)
|
||||
Fingerprint = "f",
|
||||
}, f.Ct);
|
||||
|
||||
/// <summary>A paused Integrate job of <paramref name="localId"/>: a pair naming it reads Integrating.</summary>
|
||||
private static async Task<Guid> PausedIntegrateAsync(SyncFixture f, Guid localId)
|
||||
{
|
||||
var id = Guid.CreateVersion7();
|
||||
await f.Db.Jobs.EnqueueAsync(new Job
|
||||
{
|
||||
Id = id,
|
||||
Kind = JobKind.Integrate,
|
||||
TargetIds = [localId],
|
||||
State = JobState.Paused,
|
||||
Created = DateTimeOffset.UtcNow,
|
||||
}, f.Ct);
|
||||
return id;
|
||||
}
|
||||
|
||||
private static async Task<CopyState> StateAsync(SyncFixture f, Guid copyId) => (await f.Sync.Copies.GetAsync(copyId, f.Ct))!.State;
|
||||
|
||||
[Test]
|
||||
@@ -119,6 +134,36 @@ public sealed class CopyEngineTests(TestContext context)
|
||||
Assert.False(kept.IsListed && kept.State == CopyState.Candidate);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public async Task UnlinkOfAPairThatNoLongerHoldsTheLinkLeavesTheOtherPairsLinkAndIntegration()
|
||||
{
|
||||
await using var f = await FixtureAsync(context);
|
||||
var photos = f.NewPhotos(2);
|
||||
var first = await f.LocalAsync("Comet", photos);
|
||||
var second = await f.LocalAsync("Comet copy", photos);
|
||||
var remote = f.Remote.Add("Comet NAS", photos);
|
||||
// (second, R) was unlinked earlier; then (first, R) was linked and its Integrate began.
|
||||
var old = await PairAsync(f, second.Id, remote.Id);
|
||||
await f.Sync.Copies.SetStateAsync(old.Id, null, CopyState.KeptApart, null, f.Ct);
|
||||
await f.Sync.LinkAsync(f.Server, remote.Id, first.Id, f.Ct);
|
||||
var linked = await f.Sync.Copies.EnsureLinkedAsync(f.Server, remote.Id, first.Id, f.Ct);
|
||||
var job = await PausedIntegrateAsync(f, first.Id);
|
||||
Assert.True(await f.Sync.Copies.SetStateAsync(linked.Id, null, CopyState.Integrating, new CopyAnswer(null, null, job, null, DateTimeOffset.UtcNow), f.Ct));
|
||||
using var engine = Engine(f);
|
||||
|
||||
// The stale row still offers Unlink.
|
||||
await engine.UnlinkAsync(old.Id, f.Remote, f.Ct);
|
||||
|
||||
Assert.Equal(CopyState.KeptApart, await StateAsync(f, old.Id));
|
||||
Assert.Equal(first.Id, (await f.Sync.Links.GetAsync(f.Server, remote.Id, f.Ct))!.LocalId);
|
||||
var integrating = (await f.Sync.Copies.GetAsync(linked.Id, f.Ct))!;
|
||||
Assert.Equal((CopyState.Integrating, (Guid?)job), (integrating.State, integrating.JobId));
|
||||
// The pair being integrated refuses an Unlink of its own.
|
||||
await Assert.ThrowsAsync<InvalidOperationException>(() => engine.UnlinkAsync(linked.Id, f.Remote, f.Ct));
|
||||
await Assert.ThrowsAsync<InvalidOperationException>(() => f.Sync.UnlinkAsync(f.Server, remote.Id, first.Id, f.Ct));
|
||||
Assert.Equal(first.Id, (await f.Sync.Links.GetAsync(f.Server, remote.Id, f.Ct))!.LocalId);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public async Task KeepApartOfALinkedPairUnlinksIt()
|
||||
{
|
||||
@@ -169,16 +214,17 @@ public sealed class CopyEngineTests(TestContext context)
|
||||
var (gone, restored) = (remote.Frames[1], remote.Frames[2]);
|
||||
await f.Remote.DeleteFramesAsync(remote.Id, new FrameDeleteRequest([gone.Id, restored.Id], null, false), f.Ct);
|
||||
|
||||
var (plan, lasts) = await engine.PlanTrashHereAsync(pair.Id, [Sha(photos[1]), Sha(photos[2])], f.Ct);
|
||||
var trash = await engine.PlanTrashHereAsync(pair.Id, local.Id, [Sha(photos[1]), Sha(photos[2])], f.Ct);
|
||||
var (plan, lasts) = trash;
|
||||
Assert.Equal(2, plan.Frames.Count);
|
||||
// No other sequence of this PC holds them: the trash takes their last copies, and the confirmation says so.
|
||||
Assert.SequenceEqual(new[] { Sha(photos[1]), Sha(photos[2]) }.Order(StringComparer.Ordinal), lasts.Select(l => l.Key).Order(StringComparer.Ordinal));
|
||||
// Restored on the server after the dry run: nothing moves, all or nothing.
|
||||
remote.AddFrame(photos[2], restored.FileName);
|
||||
await Assert.ThrowsAsync<StaleCopyPlanException>(() => engine.TrashHereAsync(pair.Id, plan, f.Remote, f.Ct));
|
||||
await Assert.ThrowsAsync<StaleCopyPlanException>(() => engine.TrashHereAsync(pair.Id, trash, f.Remote, f.Ct));
|
||||
Assert.Count(3, await f.Db.Frames.ListBySequenceAsync(local.Id, cancellationToken: f.Ct));
|
||||
|
||||
var again = (await engine.PlanTrashHereAsync(pair.Id, [Sha(photos[1])], f.Ct)).Plan;
|
||||
var again = await engine.PlanTrashHereAsync(pair.Id, local.Id, [Sha(photos[1])], f.Ct);
|
||||
Assert.Equal(1, await engine.TrashHereAsync(pair.Id, again, f.Remote, f.Ct));
|
||||
var left = await f.Db.Frames.ListBySequenceAsync(local.Id, cancellationToken: f.Ct);
|
||||
Assert.SequenceEqual(new[] { Sha(photos[0]), Sha(photos[2]) }.Order(StringComparer.Ordinal), left.Select(fr => fr.Sha256!).Order(StringComparer.Ordinal));
|
||||
@@ -217,17 +263,52 @@ public sealed class CopyEngineTests(TestContext context)
|
||||
public async Task TrashHereNamesNoLastCopyForAPhotoAnotherSequenceHolds()
|
||||
{
|
||||
await using var f = await FixtureAsync(context);
|
||||
var photos = f.NewPhotos(2);
|
||||
var local = await f.LocalAsync("Comet", photos);
|
||||
await f.LocalAsync("Comet backup", [photos[1]]);
|
||||
var remote = f.Remote.Add("Comet NAS", photos);
|
||||
var photos = f.NewPhotos(3);
|
||||
var local = await f.LocalAsync("Comet", photos[..2]);
|
||||
// The backup holds photo 1 and one of its own (a sequence keeps at least one frame).
|
||||
var backup = await f.LocalAsync("Comet backup", [photos[1], photos[2]]);
|
||||
var remote = f.Remote.Add("Comet NAS", photos[..2]);
|
||||
var pair = await PairAsync(f, local.Id, remote.Id);
|
||||
using var engine = Engine(f);
|
||||
await f.Remote.DeleteFramesAsync(remote.Id, new FrameDeleteRequest([remote.Frames[1].Id], null, false), f.Ct);
|
||||
|
||||
var plan = await engine.PlanTrashHereAsync(pair.Id, [Sha(photos[1])], f.Ct);
|
||||
var plan = await engine.PlanTrashHereAsync(pair.Id, local.Id, [Sha(photos[1])], f.Ct);
|
||||
|
||||
Assert.Equal((1, 0), (plan.Plan.Frames.Count, plan.LastCopies.Count));
|
||||
|
||||
// The other sequence goes to the trash while the confirmation is open: the photo is a last copy now, never moved unnamed.
|
||||
var held = (await f.Db.Frames.ListBySequenceAsync(backup.Id, cancellationToken: f.Ct)).Single(r => r.Sha256 == Sha(photos[1]));
|
||||
var other = await f.Archive.Service.FrameTrash.PlanDeleteAsync(backup.Id, [held.Id], (await f.Db.Sequences.GetAsync(backup.Id, f.Ct))!.FramesVersion, f.Ct);
|
||||
await f.Archive.Service.FrameTrash.DeleteAsync(other, "test", null, f.Ct);
|
||||
await Assert.ThrowsAsync<StaleCopyPlanException>(() => engine.TrashHereAsync(pair.Id, plan, f.Remote, f.Ct));
|
||||
Assert.Count(2, await f.Db.Frames.ListBySequenceAsync(local.Id, cancellationToken: f.Ct));
|
||||
Assert.Count(1, (await engine.PlanTrashHereAsync(pair.Id, local.Id, [Sha(photos[1])], f.Ct)).LastCopies);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public async Task TrashHereOfTwoLocalCopiesTrashesFromTheSequenceAsked()
|
||||
{
|
||||
await using var f = await FixtureAsync(context);
|
||||
var photos = f.NewPhotos(3);
|
||||
var first = await f.LocalAsync("Comet", photos);
|
||||
var second = await f.LocalAsync("Comet copy", photos);
|
||||
using var engine = Engine(f);
|
||||
var pair = (await engine.FindAsync(null, f.Ct)).New.Single();
|
||||
// The pair's first deletes a photo the second still holds (a merge keeping the second reads it "Deleted in other").
|
||||
var (deleter, keeper) = pair.LocalId == first.Id ? (first, second) : (second, first);
|
||||
var gone = (await f.Db.Frames.ListBySequenceAsync(deleter.Id, cancellationToken: f.Ct)).Single(fr => fr.Sha256 == Sha(photos[1]));
|
||||
var deletion = await f.Archive.Service.FrameTrash.PlanDeleteAsync(deleter.Id, [gone.Id], (await f.Db.Sequences.GetAsync(deleter.Id, f.Ct))!.FramesVersion, f.Ct);
|
||||
await f.Archive.Service.FrameTrash.DeleteAsync(deletion, "test", null, f.Ct);
|
||||
|
||||
var plan = await engine.PlanTrashHereAsync(pair.Id, keeper.Id, [Sha(photos[1])], f.Ct);
|
||||
Assert.Equal(keeper.Id, plan.Plan.Sequence.Id);
|
||||
Assert.Equal(1, await engine.TrashHereAsync(pair.Id, plan, null, f.Ct));
|
||||
|
||||
Assert.DoesNotContain(Sha(photos[1]), (await f.Db.Frames.ListBySequenceAsync(keeper.Id, cancellationToken: f.Ct)).Select(fr => fr.Sha256));
|
||||
Assert.Count(2, await f.Db.Frames.ListBySequenceAsync(deleter.Id, cancellationToken: f.Ct));
|
||||
// The sequence that deleted it holds nothing to trash: its own photos are refused.
|
||||
await Assert.ThrowsAsync<InvalidOperationException>(() => engine.PlanTrashHereAsync(pair.Id, deleter.Id, [Sha(photos[1])], f.Ct));
|
||||
await Assert.ThrowsAsync<ArgumentException>(() => engine.PlanTrashHereAsync(pair.Id, Guid.NewGuid(), [Sha(photos[1])], f.Ct));
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -460,7 +541,10 @@ public sealed class CopyEngineTests(TestContext context)
|
||||
IReadOnlyList<(Chronos.Core.Project.BundleHome Home, string Name)> projects =
|
||||
[
|
||||
(new(Chronos.Core.Project.BundleHome.ArchiveKind, linked.Id), "Grade"),
|
||||
(new(Chronos.Core.Project.BundleHome.ServerKind, linkedRemote.Id, Server: ServerIdentity.IdKey(serverId)), "Grade NAS"),
|
||||
(new(Chronos.Core.Project.BundleHome.ArchiveKind, linked.Id), "Vertical"),
|
||||
(new(Chronos.Core.Project.BundleHome.ArchiveKind, linked.Id), "Slow pan"),
|
||||
(new(Chronos.Core.Project.BundleHome.ServerKind, linkedRemote.Id, Server: ServerIdentity.IdKey(serverId)), "Grade"),
|
||||
(new(Chronos.Core.Project.BundleHome.ServerKind, linkedRemote.Id, Server: ServerIdentity.IdKey(serverId)), "Slow pan (STUDIO-PC)"),
|
||||
(new(Chronos.Core.Project.BundleHome.ArchiveKind, apart.Id), "Unpaired"),
|
||||
];
|
||||
using var engine = new CopyEngine(f.Sync, f.Archive.Service, new IntegratePlanner(f.Sync, sides, f.Archive.Service.Projects),
|
||||
@@ -469,7 +553,14 @@ public sealed class CopyEngineTests(TestContext context)
|
||||
|
||||
var twin = (await engine.TwinsAsync(f.Ct)).Single();
|
||||
|
||||
Assert.Equal((pair.Id, linked.Id, "Grade", linkedRemote.Id, "Grade NAS"), (twin.CopyId, twin.LocalId, twin.LocalProject, twin.RemoteId, twin.ServerProject));
|
||||
Assert.Equal((pair.Id, linked.Id, linkedRemote.Id), (twin.CopyId, twin.LocalId, twin.RemoteId));
|
||||
Assert.SequenceEqual(["Grade", "Vertical", "Slow pan"], twin.LocalProjects);
|
||||
Assert.SequenceEqual(["Grade", "Slow pan (STUDIO-PC)"], twin.ServerProjects);
|
||||
// A project is a twin only with its sibling: the same name, or the name Copy across gave it at the other home.
|
||||
Assert.Equal("Grade", twin.CounterpartOf("Grade", atServerHome: false));
|
||||
Assert.Null(twin.CounterpartOf("Vertical", atServerHome: false));
|
||||
Assert.Equal("Slow pan (STUDIO-PC)", twin.CounterpartOf("Slow pan", atServerHome: false));
|
||||
Assert.Equal("Slow pan", twin.CounterpartOf("Slow pan (STUDIO-PC)", atServerHome: true));
|
||||
Assert.Equal(f.Server, twin.Server);
|
||||
// The Edit picker shows the server by its name, never by its key.
|
||||
Assert.Equal("Studio NAS", twin.ServerName);
|
||||
|
||||
@@ -730,6 +730,36 @@ public sealed class IntegrateTests(TestContext context)
|
||||
Assert.False(File.Exists(IntegrateJournal.PathFor(f.Archive.Paths, job.Id)));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public async Task ALinkTheUserGaveTheServerSequenceAfterTheJournalIsNeverUndoneOnResume()
|
||||
{
|
||||
await using var f = await FixtureAsync(context);
|
||||
var (engine, handler) = Engine(f);
|
||||
await using var _ = engine;
|
||||
await engine.StartAsync(f.Ct);
|
||||
var (local, remote, pair) = await ScenarioAsync(f);
|
||||
var other = await LocalAsync(f, "Comet copy", [(1, 0, "IMG_0001.JPG")]);
|
||||
handler.BeforeStage = stage => stage == IntegrateStage.Link ? throw new IOException("crash before Link") : Task.CompletedTask;
|
||||
var plan = await Planner(f).PlanAsync(f.Remote, pair, await ChoicesAsync(f, local.Id, remote.Id, CopyPhotoPolicy.Union), PlanContext(), f.Ct);
|
||||
var job = await CopyJobs.EnqueueIntegrateAsync(engine, f.Sync.Copies, plan, local.DisplayTitle, f.Ct);
|
||||
await f.Archive.WaitForAsync(job.Id, JobState.Failed);
|
||||
Assert.True(File.Exists(IntegrateJournal.PathFor(f.Archive.Paths, job.Id)));
|
||||
|
||||
// Meanwhile the user links the server sequence to another copy of this PC.
|
||||
await f.Sync.LinkAsync(f.Server, remote.Id, other.Id, f.Ct);
|
||||
handler.BeforeStage = null;
|
||||
var uploads = f.Remote.IntoUploads;
|
||||
await engine.ResumeAsync(job.Id, f.Ct);
|
||||
var failed = await f.Archive.WaitForAsync(job.Id, JobState.Failed);
|
||||
|
||||
Assert.Equal(Loc.L("Errors.Copies.StalePlan"), failed.Error);
|
||||
Assert.Equal(other.Id, (await f.Sync.Links.GetAsync(f.Server, remote.Id, f.Ct))!.LocalId);
|
||||
Assert.Null(await f.Sync.LinkOfAsync(f.Server, local.Id, f.Ct));
|
||||
Assert.Equal(uploads, f.Remote.IntoUploads);
|
||||
Assert.False(File.Exists(IntegrateJournal.PathFor(f.Archive.Paths, job.Id)));
|
||||
Assert.NotEqual(CopyState.Integrating, (await f.Sync.Copies.GetAsync(pair.Id, f.Ct))!.State);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public async Task ARetryAfterAFailureBeforeTheJournalRunsTheIntegrate()
|
||||
{
|
||||
|
||||
@@ -127,7 +127,7 @@ public sealed class SyncServiceCopyTests(TestContext context)
|
||||
await f.RefreshAsync();
|
||||
Assert.Equal(SyncStatus.InSync, (await f.EntryAsync("Comet")).Status);
|
||||
|
||||
await f.Sync.UnlinkAsync(f.Server, remote.Id, f.Ct);
|
||||
await f.Sync.UnlinkAsync(f.Server, remote.Id, local.Id, f.Ct);
|
||||
|
||||
var link = await f.Sync.Links.GetAsync(f.Server, remote.Id, f.Ct);
|
||||
Assert.NotNull(link);
|
||||
@@ -244,6 +244,43 @@ public sealed class SyncServiceCopyTests(TestContext context)
|
||||
Assert.True((await f.Sync.Copies.ListByServerAsync(nas.Server, f.Ct)).All(p => p.RemoteGoneHits == 0));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public async Task ASweepOf404sConfirmsNoEarlierHitEither()
|
||||
{
|
||||
await using var f = await SyncFixture.CreateAsync(context);
|
||||
var nas = new FakeSyncRemote { Server = HomeFolders.IdKey(Guid.NewGuid()) };
|
||||
// One pair with a 404 counted more than ten minutes ago (its link already forgotten).
|
||||
var first = f.NewPhotos(2);
|
||||
var gone = await f.LocalAsync("Comet", first);
|
||||
var goneRemote = nas.Add("Comet", first);
|
||||
await f.Sync.LinkAsync(nas.Server, goneRemote.Id, gone.Id, f.Ct);
|
||||
await f.Sync.RefreshAsync(nas, new SyncPolicy(), f.Ct);
|
||||
nas.Sequences.Remove(goneRemote.Id);
|
||||
await f.Sync.RefreshAsync(nas, new SyncPolicy(), f.Ct);
|
||||
var pair = (await f.Sync.Copies.ListByServerAsync(nas.Server, f.Ct)).Single(p => p.LocalId == gone.Id);
|
||||
Assert.Equal(1, pair.RemoteGoneHits);
|
||||
await using (var session = await f.Db.Database.OpenAsync(f.Ct))
|
||||
await session.ExecuteAsync("UPDATE found_copies SET remote_gone_at = $1 WHERE id = $2", [DateTimeOffset.UtcNow.AddMinutes(-11), pair.Id], f.Ct);
|
||||
|
||||
// Then the server serves something else: every linked sequence answers 404 at once.
|
||||
var remotes = new List<FakeSequence>();
|
||||
for (var i = 0; i < 5; i++)
|
||||
{
|
||||
var photos = f.NewPhotos(1);
|
||||
var local = await f.LocalAsync($"Card {i}", photos);
|
||||
var remote = nas.Add($"Card {i}", photos);
|
||||
await f.Sync.LinkAsync(nas.Server, remote.Id, local.Id, f.Ct);
|
||||
remotes.Add(remote);
|
||||
}
|
||||
foreach (var remote in remotes) nas.Sequences.Remove(remote.Id);
|
||||
|
||||
await f.Sync.RefreshAsync(nas, new SyncPolicy(), f.Ct);
|
||||
|
||||
pair = (await f.Sync.Copies.GetAsync(pair.Id, f.Ct))!;
|
||||
Assert.Equal(1, pair.RemoteGoneHits);
|
||||
Assert.False(pair.RemoteGone);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public async Task AServerKnownOnlyByItsAddressMarksNothing()
|
||||
{
|
||||
|
||||
|
Before Width: | Height: | Size: 78 KiB After Width: | Height: | Size: 78 KiB |
|
Before Width: | Height: | Size: 78 KiB After Width: | Height: | Size: 78 KiB |
|
Before Width: | Height: | Size: 91 KiB After Width: | Height: | Size: 91 KiB |
|
Before Width: | Height: | Size: 89 KiB After Width: | Height: | Size: 90 KiB |
|
Before Width: | Height: | Size: 76 KiB After Width: | Height: | Size: 76 KiB |
|
Before Width: | Height: | Size: 77 KiB After Width: | Height: | Size: 75 KiB |
|
Before Width: | Height: | Size: 89 KiB After Width: | Height: | Size: 90 KiB |
|
Before Width: | Height: | Size: 87 KiB After Width: | Height: | Size: 87 KiB |
|
Before Width: | Height: | Size: 78 KiB After Width: | Height: | Size: 78 KiB |
|
Before Width: | Height: | Size: 77 KiB After Width: | Height: | Size: 77 KiB |
|
Before Width: | Height: | Size: 77 KiB After Width: | Height: | Size: 78 KiB |
|
Before Width: | Height: | Size: 77 KiB After Width: | Height: | Size: 77 KiB |
|
Before Width: | Height: | Size: 67 KiB After Width: | Height: | Size: 67 KiB |
|
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 60 KiB |