Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
scp_meta
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
702
Provoz
scp_meta
Commits
5ec70cea
Commit
5ec70cea
authored
2 years ago
by
Michal Svamberg
Browse files
Options
Downloads
Patches
Plain Diff
ladeni pred prezentaci
parent
31e903af
No related branches found
No related tags found
No related merge requests found
Pipeline
#3650
passed
2 years ago
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/method.dart
+2
-3
2 additions, 3 deletions
lib/method.dart
test/optimize_test.dart
+1
-1
1 addition, 1 deletion
test/optimize_test.dart
with
3 additions
and
4 deletions
lib/method.dart
+
2
−
3
View file @
5ec70cea
...
@@ -13,18 +13,17 @@ class Method {
...
@@ -13,18 +13,17 @@ class Method {
String
selectCommand
(
bool
cond
,
String
command
,
String
last
)
{
String
selectCommand
(
bool
cond
,
String
command
,
String
last
)
{
if
(
cond
==
true
)
{
if
(
cond
==
true
)
{
print
(
'+
$command
'
);
// DEBUG
//
print('+ $command'); // DEBUG
return
(
last
.
isEmpty
)
?
command
:
last
;
return
(
last
.
isEmpty
)
?
command
:
last
;
}
}
else
{
else
{
print
(
'-
$command
'
);
// DEBUG
//
print('- $command'); // DEBUG
return
last
;
return
last
;
}
}
}
}
String
getCommand
()
{
String
getCommand
()
{
String
best
=
''
;
String
best
=
''
;
print
(
"SRC:
${src.getFqdn()}
-> DST:
${dst.getFqdn()}
"
);
best
=
selectCommand
(
best
=
selectCommand
(
src
.
getFqdn
()
==
dst
.
getFqdn
()
&&
src
.
isScpRemote
(),
src
.
getFqdn
()
==
dst
.
getFqdn
()
&&
src
.
isScpRemote
(),
"ssh
${src.getAsSsh()}
'cp
${opt.getAsCp()}
${src.getScpPath()}
${dst.getScpPath()}
'"
,
"ssh
${src.getAsSsh()}
'cp
${opt.getAsCp()}
${src.getScpPath()}
${dst.getScpPath()}
'"
,
...
...
This diff is collapsed.
Click to expand it.
test/optimize_test.dart
+
1
−
1
View file @
5ec70cea
...
@@ -57,7 +57,7 @@ void main() {
...
@@ -57,7 +57,7 @@ void main() {
test
(
'green example'
,
()
{
test
(
'green example'
,
()
{
expect
(
Optimize
(
Options
(
expect
(
Optimize
(
Options
(
[
"/storage/brno2/home/userB/data"
,
"/storage/brno2/project/X"
],
reparse:
true
)),
[
"/storage/brno2/home/userB/data"
,
"/storage/brno2/project/X"
],
reparse:
true
)),
"ssh storage-brno
6
.metacentrum.cz 'cp /home/userB/data /project/X'"
);
"ssh storage-brno
2
.metacentrum.cz 'cp /home/userB/data /project/X'"
);
});
});
...
...
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