Skip to content
This repository has been archived by the owner on Nov 7, 2024. It is now read-only.

Commit

Permalink
Merge pull request #311 from eclipse-che4z/development
Browse files Browse the repository at this point in the history
Release 1.4.3
  • Loading branch information
roman-kupriyanov authored Mar 22, 2023
2 parents c4cfe24 + 121cee5 commit ad4dae4
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 14 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

You can find all notable changes to Explorer for Endevor in this document.

## [1.4.3] – 2023-03-22

### Fixed

- Fixed an issue with retrieval of the remote elements for conflict resolution.

## [1.4.2] – 2023-02-14

### Fixed
Expand Down
37 changes: 28 additions & 9 deletions packages/endevor/endevor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1509,15 +1509,18 @@ export const retrieveElementWithFingerprint =
(logger: Logger) =>
(progressReporter: ProgressReporter) =>
(service: Service) =>
({
configuration,
environment,
stageNumber,
system,
subSystem,
type,
name,
}: ElementMapPath): retrieveElementWithFingerprint =>
(
{
configuration,
environment,
stageNumber,
system,
subSystem,
type,
name,
}: ElementMapPath,
searchUpTheMap?: boolean
): retrieveElementWithFingerprint =>
async (
signoutChangeControlValue?: ActionChangeControlValue,
overrideSignOut?: OverrideSignOut
Expand All @@ -1533,6 +1536,7 @@ export const retrieveElementWithFingerprint =
signout: isDefined(signoutChangeControlValue),
ccid: signoutChangeControlValue?.ccid,
comment: signoutChangeControlValue?.comment,
search: searchUpTheMap,
};
const session = toSecuredEndevorSession(logger)(service);
progressReporter.report({ increment: 30 });
Expand Down Expand Up @@ -1626,6 +1630,21 @@ export const retrieveElementWithoutSignout =
return elementContent.content;
};

export const retrieveElementWithFingerprintFirstFound =
(logger: Logger) =>
(progress: ProgressReporter) =>
(service: Service) =>
async (element: ElementMapPath): Promise<ElementWithFingerprint | Error> => {
const elementContent = await retrieveElementWithFingerprint(logger)(
progress
)(service)(element, true)();
if (isError(elementContent)) {
const error = elementContent;
return error;
}
return elementContent;
};

export const retrieveElementWithSignout =
(logger: Logger) =>
(progress: ProgressReporter) =>
Expand Down
2 changes: 1 addition & 1 deletion packages/explorer-for-endevor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"displayName": "Explorer for Endevor",
"description": "Extension that modernizes the way you interact with Endevor inventory locations and elements",
"author": "Broadcom",
"version": "1.4.2",
"version": "1.4.3",
"publisher": "BroadcomMFD",
"homepage": "https://github.com/eclipse/che-che4z-explorer-for-endevor",
"repository": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import {
import { saveFileIntoWorkspaceFolder } from '@local/vscode-wrapper/workspace';
import * as path from 'path';
import { Uri } from 'vscode';
import { retrieveElementWithFingerprint } from '../endevor';
import { retrieveElementWithFingerprintFirstFound } from '../endevor';
import { reporter } from '../globals';
import { toComparedElementUri } from '../uri/comparedElementUri';
import { isError } from '../utils';
Expand Down Expand Up @@ -135,9 +135,9 @@ const retrieveRemoteVersionIntoFolder =
const remoteElementVersion = await withNotificationProgress(
`Retrieving a remote version of the element ${element.name}...`
)((progressReporter) => {
return retrieveElementWithFingerprint(progressReporter)(service)(
element
)();
return retrieveElementWithFingerprintFirstFound(progressReporter)(
service
)(element);
});
if (isError(remoteElementVersion)) {
const error = remoteElementVersion;
Expand Down
2 changes: 2 additions & 0 deletions packages/explorer-for-endevor/src/endevor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ export const retrieveElementWithDependenciesWithSignout =
endevor.retrieveElementWithDependenciesWithSignout(logger);
export const retrieveElementWithFingerprint =
endevor.retrieveElementWithFingerprint(logger);
export const retrieveElementWithFingerprintFirstFound =
endevor.retrieveElementWithFingerprintFirstFound(logger);
export const printElement = endevor.printElement(logger);
export const printListing = endevor.printListing(logger);
export const updateElement = endevor.updateElement(logger);
Expand Down

0 comments on commit ad4dae4

Please sign in to comment.