Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
osc-plugins
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
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mpcdf
obs
osc-plugins
Commits
f6d2d016
Commit
f6d2d016
authored
6 years ago
by
Lorenz Huedepohl
Browse files
Options
Downloads
Patches
Plain Diff
Make mpcdf_push work also when no sources have been changed
parent
69200527
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
mpcdf_push.py
+20
-9
20 additions, 9 deletions
mpcdf_push.py
with
20 additions
and
9 deletions
mpcdf_push.py
+
20
−
9
View file @
f6d2d016
...
...
@@ -88,16 +88,27 @@ def do_mpcdf_push(self, subcmd, opts, *args):
"
Configure the enabled repositories first, with `osc mpcdf_enable_repositories`
"
,
file
=
sys
.
stderr
)
raise
SystemExit
(
1
)
req_id
=
osc
.
core
.
create_submit_request
(
api_url
,
from_project
,
package
,
dst_project
=
to_project
,
message
=
"
Update {0} from {1}
"
.
format
(
package
,
from_project
)
if
not
opts
.
message
else
opts
.
message
)
print
(
"
Submitted package {0} to {1} in request {2}
"
.
format
(
package
,
to_project
,
req_id
))
if
not
opts
.
batch
:
print
(
"
\n
PLEASE review the request by
'
osc request show {0} --diff
'
, or in the web interface
\n
"
.
format
(
req_id
))
print
(
"
Press Ctrl-C to abort, any key to continue
"
,
end
=
""
)
input
()
result
=
osc
.
core
.
change_request_state
(
api_url
,
req_id
,
'
accepted
'
,
"
Accepted on the command line via
'
osc mpcdf_push
'"
)
print
(
"
Accepting request {0}:
"
.
format
(
req_id
),
result
)
req_id
=
None
try
:
req_id
=
osc
.
core
.
create_submit_request
(
api_url
,
from_project
,
package
,
dst_project
=
to_project
,
message
=
"
Update {0} from {1}
"
.
format
(
package
,
from_project
)
if
not
opts
.
message
else
opts
.
message
)
except
osc
.
core
.
HTTPError
as
e
:
if
e
.
code
==
400
:
if
"
The request contains no actions
"
in
e
.
read
():
print
(
"
No source changes found, submit request not necessary
"
)
else
:
raise
e
if
req_id
:
print
(
"
Submitted package {0} to {1} in request {2}
"
.
format
(
package
,
to_project
,
req_id
))
if
not
opts
.
batch
:
print
(
"
\n
PLEASE review the request by
'
osc request show {0} --diff
'
, or in the web interface
\n
"
.
format
(
req_id
))
print
(
"
Press Ctrl-C to abort, any key to continue
"
,
end
=
""
)
input
()
result
=
osc
.
core
.
change_request_state
(
api_url
,
req_id
,
'
accepted
'
,
"
Accepted on the command line via
'
osc mpcdf_push
'"
)
print
(
"
Accepting request {0}:
"
.
format
(
req_id
),
result
)
if
not
opts
.
batch
:
user
=
osc
.
conf
.
get_apiurl_usr
(
api_url
)
if
user
not
in
existing_maintainers
:
print
(
"
Adding you to the list of maintainers for this package
"
)
...
...
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