Commit 321080be authored by Xavier Guimard's avatar Xavier Guimard

salsa: push_repo: allow to push even if project still exists

parent 468636ef
......@@ -11,6 +11,7 @@ devscripts (2.18.12) UNRELEASED; urgency=medium
+ Fix mr bug when colors are activated. MR: !92
+ Fix bad warning on unexistent project and downgrade messages to debug
level.
+ push_repo: allow to push even if project still exists
* uscan:
+ Fix warning when grouped package is up to date.
* French translation update.
......
......@@ -33,9 +33,9 @@ sub create_repo {
. ". Continue (Y/n) "
) =~ refuse
);
my $repo = $self->api->create_project($opts);
unless ($repo) {
ds_warn "Project not created";
my $repo = eval { $self->api->create_project($opts) };
if ($@ or !$repo) {
ds_warn "Project not created: $@";
return 1;
}
ds_warn "Project $repo->{web_url} created";
......
......@@ -48,7 +48,14 @@ sub push_repo {
wait_child => 1,
);
my $res = $self->create_repo($reponame);
return $res if $res;
if ($res) {
return 1
unless (
ds_prompt(
"Project still exists, do you want to try to push local repo ? (y/N) "
) =~ accept
);
}
spawn(
exec =>
['git', 'push', '--all', '--verbose', '--set-upstream', 'origin'],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment