Skip to content

Commit

Permalink
debug tracing of steps
Browse files Browse the repository at this point in the history
Signed-off-by: Denis Zalevskiy <denis.zalevskiy@jolla.com>
  • Loading branch information
Denis Zalevskiy committed Oct 25, 2014
1 parent 5c85dcf commit 2e9d4ee
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tools/git-vault-rebase-generate.awk
Expand Up @@ -22,9 +22,14 @@ function push_command(cmd) {
push(commands, length(commands), cmd);
}

function push_echo(message) {
push_command("echo 'STEP: " message "'");
}

function prepare_commands() {
for (name in commits) {
split(commits[name], ids, SUBSEP);
push_echo("data " name);
if (length(ids) == 1) {
push_command("git cherry-pick " ids[1]);
} else {
Expand All @@ -42,13 +47,15 @@ function prepare_commands() {
id = $2
tag = $3
if (length(old_tags) != 0) {
push_echo("squash " tag " with " length(old_tags) " old tags");
for (i = 1; i <= length(old_tags); i++) {
push_command(old_tags[i]);
}
array_clear(old_tags);
push_command("git cherry-pick --no-commit " id);
push_command("git commit --no-edit --amend");
} else {
push_echo("tag " tag);
push_command("git cherry-pick " id);
}
tmp_tag = "migrate/" tag
Expand All @@ -67,6 +74,7 @@ $1 == "add" {
}

$1 == "old_tag" {
push_echo("old_tag " $3);
if (length(old_tags) == 0) {
push(old_tags, length(old_tags), "git cherry-pick " $2);
} else {
Expand All @@ -80,6 +88,7 @@ $1 == "tag" {
}

$1 == "copy" {
push_echo("copy " $2);
push_command("git cherry-pick " $2);
}

Expand Down

0 comments on commit 2e9d4ee

Please sign in to comment.