Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
alecs_myu
erp5
Commits
a51e3978
Commit
a51e3978
authored
Jul 10, 2014
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test: warn before removing static files
parent
2a61965a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
product/ERP5Type/tests/custom_zodb.py
product/ERP5Type/tests/custom_zodb.py
+7
-0
No files found.
product/ERP5Type/tests/custom_zodb.py
View file @
a51e3978
...
@@ -7,6 +7,7 @@ import socket
...
@@ -7,6 +7,7 @@ import socket
import
sys
import
sys
import
glob
import
glob
import
threading
import
threading
import
time
import
ZODB
import
ZODB
from
asyncore
import
socket_map
from
asyncore
import
socket_map
from
ZODB.DemoStorage
import
DemoStorage
from
ZODB.DemoStorage
import
DemoStorage
...
@@ -45,6 +46,10 @@ if save_mysql:
...
@@ -45,6 +46,10 @@ if save_mysql:
# The output of mysqldump needs to merge many lines at a time
# The output of mysqldump needs to merge many lines at a time
# for performance reasons (merging lines is at most 10 times
# for performance reasons (merging lines is at most 10 times
# faster, so this produce somewhat not nice to read sql
# faster, so this produce somewhat not nice to read sql
if
os
.
path
.
exists
(
dump_sql_path
):
_print
(
"About to overwrite mysqldump at %s (press Ctrl+C to abort)"
%
dump_sql_path
)
time
.
sleep
(
5
)
command
=
'mysqldump %s > %s'
%
(
getMySQLArguments
(),
dump_sql_path
,)
command
=
'mysqldump %s > %s'
%
(
getMySQLArguments
(),
dump_sql_path
,)
if
verbosity
:
if
verbosity
:
_print
(
'Dumping MySQL database with %s ...'
%
command
)
_print
(
'Dumping MySQL database with %s ...'
%
command
)
...
@@ -83,6 +88,8 @@ if load:
...
@@ -83,6 +88,8 @@ if load:
backup_path
=
os
.
path
.
basename
(
backup_path
)
backup_path
=
os
.
path
.
basename
(
backup_path
)
os
.
symlink
(
backup_path
,
full_path
)
os
.
symlink
(
backup_path
,
full_path
)
elif
save
and
not
(
neo_storage
or
zeo_client
)
and
os
.
path
.
exists
(
data_fs_path
):
elif
save
and
not
(
neo_storage
or
zeo_client
)
and
os
.
path
.
exists
(
data_fs_path
):
_print
(
"About to remove existing Data.fs %s (press Ctrl+C to abort)"
%
data_fs_path
)
time
.
sleep
(
5
)
os
.
remove
(
data_fs_path
)
os
.
remove
(
data_fs_path
)
for
static_dir
in
static_dir_list
:
for
static_dir
in
static_dir_list
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment