Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
qim3d
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
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
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
QIM
Tools
qim3d
Merge requests
!15
Directories check
Code
Review changes
Check out branch
Open in Workspace
Download
Patches
Plain diff
Expand sidebar
Merged
Directories check
directories_check
into
main
Overview
0
Commits
5
Pipelines
0
Changes
1
Merged
Directories check
fima
requested to merge
directories_check
into
main
Sep 25, 2023
Overview
0
Commits
5
Pipelines
0
Changes
1
Function for checking the difference between directories
0
0
Merge request reports
Viewing commit
8d5044a1
Prev
Next
Show latest version
1 file
+
5
−
3
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
8d5044a1
change in funtion name
· 8d5044a1
Felipe Delestro Matos
authored
Sep 20, 2023
qim3d/io/sync.py
+
5
−
3
View file @ 8d5044a1
Edit in single-file editor
Open in Web IDE
Show full file
@@ -23,8 +23,9 @@ class Sync:
return
False
def
compare_dirs
(
self
,
source
,
destination
,
checksum
=
False
):
"""
Compare if two directories are exactly the same
"""
def
check_destination_dir
(
self
,
source
,
destination
,
checksum
=
False
):
"""
Check if all files from
'
source
'
are in
'
destination
'"""
if
checksum
:
command
=
[
"
rsync
"
,
"
-n
"
,
"
-avrc
"
,
source
,
destination
]
@@ -37,6 +38,7 @@ class Sync:
check
=
True
,
)
diff_files
=
out
.
stdout
.
decode
().
splitlines
()[
2
:
-
3
]
diff_files
=
out
.
stdout
.
decode
().
splitlines
()[
1
:
-
3
]
return
diff_files
Loading