Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen J. Molaro2021-01-26 20:05:50 +0000
committerDonald Dunne2021-01-28 16:30:30 +0000
commit1ec92efa795c6ef356ea862de803e153542072ae (patch)
treee5c0f5fca243a284f12c7e400a55ba7f6d731d3f
parent7c6dec8b8d239644683df996e76927732067791e (diff)
downloadorg.eclipse.osee-1ec92efa795c6ef356ea862de803e153542072ae.tar.gz
org.eclipse.osee-1ec92efa795c6ef356ea862de803e153542072ae.tar.xz
org.eclipse.osee-1ec92efa795c6ef356ea862de803e153542072ae.zip
bug[TW18681]: Resolve duplicated git repository paths
Change-Id: If839dc34da65af9f03d48263deedf52a08fd50c5 Signed-off-by: Stephen J. Molaro <stephen.j.molaro@boeing.com>
-rw-r--r--plugins/org.eclipse.osee.define.rest/src/org/eclipse/osee/define/rest/FullHistoryTolerant.java12
1 files changed, 7 insertions, 5 deletions
diff --git a/plugins/org.eclipse.osee.define.rest/src/org/eclipse/osee/define/rest/FullHistoryTolerant.java b/plugins/org.eclipse.osee.define.rest/src/org/eclipse/osee/define/rest/FullHistoryTolerant.java
index b82eb70e234..88d93a7382e 100644
--- a/plugins/org.eclipse.osee.define.rest/src/org/eclipse/osee/define/rest/FullHistoryTolerant.java
+++ b/plugins/org.eclipse.osee.define.rest/src/org/eclipse/osee/define/rest/FullHistoryTolerant.java
@@ -94,7 +94,7 @@ public class FullHistoryTolerant implements HistoryImportStrategy {
if (codeUnit.isValid()) {
if (Strings.isValid(newPath)) {
tx.setName(codeUnit, getCodeUnitName(newPath));
- tx.setSoleAttributeFromString(codeUnit, CoreAttributeTypes.FileSystemPath, newPath);
+ tx.setSoleAttributeValue(codeUnit, CoreAttributeTypes.FileSystemPath, newPath);
pathToCodeunitReferenceMap.remove(path);
pathToCodeunitMap.remove(path);
pathToCodeunitMap.put(newPath, codeUnit);
@@ -131,9 +131,10 @@ public class FullHistoryTolerant implements HistoryImportStrategy {
CoreRelationTypes.DefaultHierarchical_Child, repoArtifact).asArtifacts();
for (ArtifactReadable art : existingFolders) {
String wholePath = art.getName();
- while (!art.getParent().equals(repoArtifact) && art.isValid()) {
- art = art.getParent();
- wholePath = art.getName() + "/" + wholePath;
+ ArtifactReadable parentArt = art;
+ while (!parentArt.getParent().equals(repoArtifact) && parentArt.isValid()) {
+ parentArt = parentArt.getParent();
+ wholePath = parentArt.getName() + "/" + wholePath;
}
if (!existingCodeUnitPath.containsKey(wholePath)) {
existingCodeUnitPath.put(wholePath, art);
@@ -157,13 +158,14 @@ public class FullHistoryTolerant implements HistoryImportStrategy {
path.remove(path.size() - 1);
for (String newFolder : path) {
- wholePath += newFolder + "/";
+ wholePath += newFolder;
if (!existingCodeUnitPath.containsKey(wholePath)) {
folder = tx.createArtifact(folder, CoreArtifactTypes.Folder, newFolder);
existingCodeUnitPath.put(wholePath, folder);
} else {
folder = existingCodeUnitPath.get(wholePath);
}
+ wholePath += "/";
}
if (newCodeUnit) {
ArtifactId codeUnit = tx.createArtifact(folder, CoreArtifactTypes.CodeUnit, codeUnitName);

Back to the top