Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
installsystems
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Seblu
installsystems
Commits
400a8138
Commit
400a8138
authored
13 years ago
by
Seblu
Browse files
Options
Downloads
Patches
Plain Diff
better del asking implementation
parent
35d88f3c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bin/is
+8
-10
8 additions, 10 deletions
bin/is
with
8 additions
and
10 deletions
bin/is
+
8
−
10
View file @
400a8138
...
...
@@ -140,15 +140,14 @@ def c_del(parser, args):
img
,
repo
=
select_image
(
image
,
repoman
)
if
repo
is
None
:
raise
Exception
(
"
You cannot delete an image outside a repository
"
)
if
args
.
force
:
repo
.
delete
(
img
.
name
,
img
.
version
)
else
:
if
not
args
.
force
:
warn
(
"
The following opereation cannot be reversed!
"
)
out
(
"
You will delete %s v%s in repository %s
"
%
(
img
.
name
,
img
.
version
,
repo
.
config
.
name
))
if
raw_input
(
"
Are you sure (yes)
"
)
==
"
yes
"
:
repo
.
delete
(
img
.
name
,
img
.
version
)
if
raw_input
(
"
Are you sure (yes)
"
)
!=
"
yes
"
:
raise
Exception
(
"
Abort
"
)
repo
.
delete
(
img
.
name
,
img
.
version
)
def
c_get
(
parser
,
args
):
'''
...
...
@@ -251,7 +250,6 @@ def c_move(parser, args):
'''
Move an image from a repository to another one
'''
# load repositories
repoman
=
load_repositories
(
args
)
dstrepo
=
repoman
[
args
.
repository
]
for
image
in
args
.
image
:
...
...
@@ -263,10 +261,10 @@ def c_move(parser, args):
dstrepo
.
config
.
name
))
if
raw_input
(
"
Are you sure (yes)
"
)
!=
"
yes
"
:
raise
Exception
(
"
Abort
"
)
arrow
(
"
Moving %s v%s from %s to %s
"
%
(
srcimg
.
name
,
srcimg
.
version
,
srcrepo
.
config
.
name
,
dstrepo
.
config
.
name
))
arrow
(
"
Moving %s v%s from
repository
%s to %s
"
%
(
srcimg
.
name
,
srcimg
.
version
,
srcrepo
.
config
.
name
,
dstrepo
.
config
.
name
))
arrowlevel
(
1
)
dstrepo
.
add
(
srcimg
)
srcrepo
.
delete
(
srcimg
.
name
,
srcimg
.
version
)
...
...
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