import itertools
import random
-from wizard import command, deploy, shell, util
+from wizard import app, command, deploy, shell, util
def main(argv, baton):
options, show = parse_args(argv, baton)
- sh = shell.Shell()
+ appname = show[0]
+ application = app.applications()[appname]
deploys = deploy.parse_install_lines(show, options.versions_path)
stats = {}
iffy = 0
d.verifyConfigured()
with util.ChangeDirectory(d.location):
results = []
- out = sh.safeCall('git', 'diff', '--numstat', d.app_version.scripts_tag, strip=True)
+ out = shell.safeCall('git', 'diff', '--numstat', d.app_version.scripts_tag, strip=True)
total += 1
for line in out.split("\n"):
added, deleted, filename = line.split(None, 3)
if deleted == '-': continue
added = int(added)
deleted = int(deleted)
- # hook
- if filename == "LocalSettings.php":
- if added == deleted == 10:
- continue
- elif added == deleted == 9:
- continue
- elif filename == "AdminSettings.php":
- if added == 0 and deleted == 20:
- continue
- elif filename == "config/index.php" or filename == "config/index.php5":
- if added == 0:
- continue
- if not added and not deleted:
+ if not added and not deleted or application.researchFilter(filename, added, deleted):
continue
results.append((added,deleted,filename))
if len(results) > options.filter:
for added,deleted,filename in results:
stats.setdefault(filename, 0)
stats[filename] += 1
- # hook
- if filename == "LocalSettings.php" and not options.verbose:
+ if application.researchVerbose(filename) and not options.verbose:
continue
print "%-7d %-7d %s/%s" % (added,deleted,d.location,filename)
except (deploy.NotConfiguredError, deploy.NotMigratedError):