2 import distutils.version
4 from wizard import app, command, deploy, shell, util
7 options, args = parse_args(argv, baton)
9 # grab all the supported versions
10 application = app.getApplication(appname)
11 tags = set(shell.eval("git", "--git-dir=" + application.repository(options.srv_path), "tag").strip().split())
13 for d in deploy.parse_install_lines(appname, options.versions_path):
15 version = d.detectVersion()
18 if "wordpress-%s" % version not in tags:
20 unsupported.add(str(version))
22 for v in sorted(distutils.version.LooseVersion(x) for x in list(unsupported)):
25 def parse_args(argv, baton):
26 usage = """usage: %prog summary unsupported [ARGS] APP
28 Determines what application versions are unsupported in our
29 repository but are extant in migrated/unmigrated installs.
30 We have to calculate the real version using our heuristic,
31 since Git may lie if the user manually upgraded their install."""
32 parser = command.WizardOptionParser(usage)
33 baton.push(parser, "versions_path")
34 baton.push(parser, "srv_path")
35 options, args = parser.parse_all(argv)
37 parser.error("too many arguments")
39 parser.error("must specify application")