git history import cleanups

ignore tags with - in them, since those are likely milestone tags

do not try to connect to launchpad, since we don't need to in this script

Change-Id: I33b733e5de1a5594e405dd3afed23812f5837ff2
This commit is contained in:
Doug Hellmann 2015-09-15 18:47:37 +00:00
parent a1fdfb4a51
commit 857d77e7e7

View File

@ -29,8 +29,6 @@ import os
import subprocess
import sys
from launchpadlib.launchpad import Launchpad
# From https://wiki.openstack.org/wiki/Releases
RELEASES = [
('austin', datetime.datetime(2010, 10, 21)),
@ -66,13 +64,6 @@ parser.add_argument('project', help='launchpad project name')
parser.add_argument('repo', help='repository directory')
args = parser.parse_args()
# Connect to LP
print("connecting to launchpad")
try:
launchpad = Launchpad.login_with('openstack-releasing', 'production')
except Exception, error:
abort(2, 'Could not connect to Launchpad: ' + str(error))
before = os.getcwd()
dev_null = open('/dev/null', 'w')
repo = args.repo
@ -88,6 +79,9 @@ repo_namespace = os.path.basename(os.path.dirname(repo))
repo_short_name = repo_namespace + '/' + os.path.basename(repo)
for tag in tags:
if '-' in tag:
print('ignoring %r' % tag)
continue
try:
show_output = subprocess.check_output([
'git', 'show', '--no-patch', '--pretty=%H %ct', tag,