If we run eol_branch.sh with --dry-run we get told it's an unknown
argument. This is because we're calling getopt with 'dry'. Let's give
getopt the right name.
Change-Id: I379ebdaa3c9d48218df974d01de2c76744d21c6f
The loop that was meant to abandon all open reviews for an EOL branch was
only getting the 1st one due to the way the ssh output was being read in.
Make this neater by creating an array of revisions from the query to
abandon before looping over them.
Additionally tighten the regex matching the change revision. The gerrit
query returns a lot of information, including the commit message, meaning
that any references to 'revision' in a commit message could be erroneously
matched.
Change-Id: I1dd3a94bec45aaeae9c37af1fd7b18905f0401ef
I've come across the case where .gitreview has had the incorrect remote
information for the repository (for example another projects .gitreview
has been blindly copied in). Add some basic checking to ensure the
remote looks correct or raise a warning if not.
Change-Id: I663b95656db8c5ddab08e2e4aa6514694b00a1ab
When a project is retired there is not .gitreview in their repository.
If we still need to EOL old branches we need to figure out the gerrit
remote. We could get this by checking out an older branch, but to keep
it simple we just assume/guess it's review.openstack.org/$project.git
Change-Id: I779783cc3f06af28f17ee36a1f0a84df29c4177d
The --warn-exit option was recently added except that the getopt
parsing wasn't appropriately updated and thus rejected the flags.
The flag also doesn't take a positional argument, so fix the argument
shifting.
Change-Id: I9671f79a969a7e5f9aaff9edaf235406d77b2da8
The script assumes you have all of openstack checked out. However
for new repos (or presumably all) we can easily clone it if we don't
have it. Clearly this is very inefficient, but it is simply how this
script works for now.
Change-Id: I0d0ab73da6d4e93172be94178652c5aa28d7dcdb