Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openbis
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sispub
openbis
Commits
608ca8a2
Commit
608ca8a2
authored
17 years ago
by
brinn
Browse files
Options
Downloads
Patches
Plain Diff
improvement: ensure that dependent projects are visited only once (performance)
SVN: 648
parent
053987c7
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ant_tasks/source/java/ch/systemsx/cisd/ant/task/subversion/SVNDependentProjectsCollector.java
+15
-1
15 additions, 1 deletion
...sd/ant/task/subversion/SVNDependentProjectsCollector.java
with
15 additions
and
1 deletion
ant_tasks/source/java/ch/systemsx/cisd/ant/task/subversion/SVNDependentProjectsCollector.java
+
15
−
1
View file @
608ca8a2
...
@@ -16,6 +16,7 @@
...
@@ -16,6 +16,7 @@
package
ch.systemsx.cisd.ant.task.subversion
;
package
ch.systemsx.cisd.ant.task.subversion
;
import
java.util.HashSet
;
import
java.util.LinkedHashSet
;
import
java.util.LinkedHashSet
;
import
java.util.Set
;
import
java.util.Set
;
...
@@ -71,17 +72,30 @@ class SVNDependentProjectsCollector
...
@@ -71,17 +72,30 @@ class SVNDependentProjectsCollector
private
final
Set
<
String
>
projects
;
private
final
Set
<
String
>
projects
;
private
final
String
projectPath
;
private
final
String
projectPath
;
private
final
Set
<
String
>
locationsAlreadyVisited
;
ProjectHandler
(
Set
<
String
>
projects
,
String
projectPath
)
ProjectHandler
(
Set
<
String
>
projects
,
String
projectPath
)
{
this
(
projects
,
projectPath
,
new
HashSet
<
String
>());
}
ProjectHandler
(
Set
<
String
>
projects
,
String
projectPath
,
Set
<
String
>
locationsAlreadyVisited
)
{
{
this
.
projects
=
projects
;
this
.
projects
=
projects
;
this
.
projectPath
=
projectPath
;
this
.
projectPath
=
projectPath
;
this
.
locationsAlreadyVisited
=
locationsAlreadyVisited
;
}
}
@Override
@Override
public
IEclipseClasspathLocation
createLocation
()
public
IEclipseClasspathLocation
createLocation
()
{
{
final
String
displayableLocation
=
projectPath
+
"/"
+
EclipseClasspathReader
.
CLASSPATH_FILE
;
final
String
displayableLocation
=
projectPath
+
"/"
+
EclipseClasspathReader
.
CLASSPATH_FILE
;
if
(
locationsAlreadyVisited
.
contains
(
displayableLocation
))
{
return
null
;
}
locationsAlreadyVisited
.
add
(
displayableLocation
);
try
try
{
{
final
String
eclipseClasspath
=
actions
.
cat
(
displayableLocation
);
final
String
eclipseClasspath
=
actions
.
cat
(
displayableLocation
);
...
@@ -111,7 +125,7 @@ class SVNDependentProjectsCollector
...
@@ -111,7 +125,7 @@ class SVNDependentProjectsCollector
public
IProjectHandler
createHandler
(
EclipseClasspathEntry
entry
)
public
IProjectHandler
createHandler
(
EclipseClasspathEntry
entry
)
{
{
final
String
projectName
=
SVNUtilities
.
getTopLevelDirectory
(
entry
.
getPath
());
final
String
projectName
=
SVNUtilities
.
getTopLevelDirectory
(
entry
.
getPath
());
return
new
ProjectHandler
(
projects
,
pathProvider
.
getPath
(
projectName
));
return
new
ProjectHandler
(
projects
,
pathProvider
.
getPath
(
projectName
)
,
locationsAlreadyVisited
);
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment