Skip to content

Commit dfa62d7

Browse files
author
Ferdinando Villa
committed
Add geometry handling for cohorts and fix spatial layer removal logic. Update domain color scheme.
1 parent f637565 commit dfa62d7

2 files changed

Lines changed: 8 additions & 13 deletions

File tree

klab.core.api/src/main/java/org/integratedmodelling/klab/api/data/RepositoryState.java

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -67,31 +67,27 @@ public enum Operation {
6767
* Fetch any remote changes, if no conflicts merge them, then commit the current changes and
6868
* pull
6969
*/
70-
FETCH_COMMIT_AND_PUSH,
70+
SYNC_AND_PUBLISH,
7171
/** Fetch remote changes and merge them if no conflicts arise */
72-
FETCH_AND_MERGE,
72+
GET_LATEST,
7373
/** Commit current local changes without contacting the remote repository */
7474
SAVE_CHANGES,
7575
/** Push committed local changes to the remote repository */
7676
PUBLISH_CHANGES,
7777
/** Switch to another branch (possibly new) after locally committing any pending changes */
7878
COMMIT_AND_SWITCH,
7979
/** Hard reset head deleting all uncommitted changes */
80-
HARD_RESET,
81-
/** Friendlier alias for HARD_RESET */
8280
DISCARD_LOCAL_CHANGES,
8381

8482
MERGE_CHANGES_FROM;
8583

8684
public String description() {
8785
return switch (this) {
88-
case FETCH_COMMIT_AND_PUSH ->
89-
"Fetch remote changes, merge if no conflicts, commit and push";
90-
case FETCH_AND_MERGE -> "Fetch remote changes, merge if no conflicts";
91-
case SAVE_CHANGES -> "Save current local changes";
92-
case PUBLISH_CHANGES -> "Publish committed changes";
86+
case SYNC_AND_PUBLISH -> "Fetch remote changes, merge if no conflicts, commit and push";
87+
case GET_LATEST -> "Fetch remote changes, merge if no conflicts";
88+
case SAVE_CHANGES -> "Accept all changes to local repository without publishing";
89+
case PUBLISH_CHANGES -> "Publish locally committed changes";
9390
case COMMIT_AND_SWITCH -> "Commit changes and switch to another branch";
94-
case HARD_RESET -> "Hard reset, deleting all uncommitted changes";
9591
case DISCARD_LOCAL_CHANGES -> "Discard local uncommitted changes";
9692
case MERGE_CHANGES_FROM -> "Merge changes from another branch";
9793
};

klab.services.resources/src/main/java/org/integratedmodelling/klab/services/resources/storage/WorkspaceManager.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -309,14 +309,14 @@ public List<ResourceSet> manageRepository(
309309

310310
var mods =
311311
switch (operation) {
312-
case FETCH_COMMIT_AND_PUSH ->
312+
case SYNC_AND_PUBLISH ->
313313
Utils.Git.fetchCommitAndPush(
314314
fileProjectStorage.getRootFolder(),
315315
arguments == null || arguments.length == 0
316316
? "Committed by k.LAB resources " + "service"
317317
: arguments[0],
318318
scope);
319-
case FETCH_AND_MERGE ->
319+
case GET_LATEST ->
320320
Utils.Git.fetchAndMerge(fileProjectStorage.getRootFolder(), scope);
321321
case SAVE_CHANGES ->
322322
Utils.Git.commitChanges(
@@ -328,7 +328,6 @@ public List<ResourceSet> manageRepository(
328328
case PUBLISH_CHANGES -> Utils.Git.pushChanges(fileProjectStorage.getRootFolder(), scope);
329329
case COMMIT_AND_SWITCH ->
330330
Utils.Git.commitAndSwitch(fileProjectStorage.getRootFolder(), arguments[0], scope);
331-
case HARD_RESET -> Utils.Git.hardReset(fileProjectStorage.getRootFolder());
332331
case DISCARD_LOCAL_CHANGES -> Utils.Git.hardReset(fileProjectStorage.getRootFolder());
333332
case MERGE_CHANGES_FROM ->
334333
Utils.Git.mergeChangesFrom(fileProjectStorage.getRootFolder(), arguments[0]);

0 commit comments

Comments
 (0)