diff options
author | Jenkins <jenkins@review.openstack.org> | 2015-01-26 20:03:49 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2015-01-26 20:03:50 +0000 |
commit | ffd91e2111435268fef7f45af689357925ac453f (patch) | |
tree | cd98a09da2e9f9224acd61c0ec56f93040aa8ae0 | |
parent | 3efd9acb1a7f51290ba1a4d9c08ebc72c8f4f03c (diff) | |
parent | c473cda72f2ea6e3af6b16f61fd73234ba42cd8b (diff) | |
download | tempest-lib-ffd91e2111435268fef7f45af689357925ac453f.tar.gz |
Merge "Fix migrate_from_tempest script to work with multiple files"
-rwxr-xr-x | tools/migrate_from_tempest.sh | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/tools/migrate_from_tempest.sh b/tools/migrate_from_tempest.sh index 4751d0b..7719362 100755 --- a/tools/migrate_from_tempest.sh +++ b/tools/migrate_from_tempest.sh @@ -46,11 +46,14 @@ function count_commits { git clone $TEMPEST_GIT_URL $tmpdir cd $tmpdir -# get only commits that touch our files -commits="$(git log --format=format:%h --no-merges --follow -- $files)" -# then their merge commits - which works fina since we merge commits -# individually. -merge_commits="$(git log --format=format:%h --merges --first-parent -- $files)" +for file in $files; do + # get only commits that touch our files + commits="$commits $(git log --format=format:%h --no-merges --follow -- $file)" + # then their merge commits - which works fina since we merge commits + # individually. + merge_commits="$merge_commits $(git log --format=format:%h --merges --first-parent -- $file)" +done + pattern="\n$(echo $commits $merge_commits | sed -e 's/ /\\|/g')" # order them by filtering each one in the order it appears on rev-list |