Software /
code /
prosody
Changeset
6587:54306208f30b
prosodyctl: Expand plugin paths and attempt to identify prosody-modules checkouts
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 21 Jan 2015 02:55:27 +0100 |
parents | 6586:317ad7f1c2ba |
children | 6588:93423244dc5b 6602:61b6a4fc65f1 6604:478308ee29dd 6607:64e6b88b6b21 |
files | prosodyctl |
diffstat | 1 files changed, 14 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/prosodyctl Wed Jan 21 02:55:23 2015 +0100 +++ b/prosodyctl Wed Jan 21 02:55:27 2015 +0100 @@ -532,17 +532,30 @@ end local pwd = "."; + local lfs = require "lfs"; local array = require "util.array"; local keys = require "util.iterators".keys; + local hg = require"util.mercurial"; local relpath = config.resolve_relative_path; print("Prosody "..(prosody.version or "(unknown version)")); print(""); print("# Prosody directories"); print("Data directory: "..relpath(pwd, data_path)); - print("Plugin directory: "..relpath(pwd, CFG_PLUGINDIR or ".")); print("Config directory: "..relpath(pwd, CFG_CONFIGDIR or ".")); print("Source directory: "..relpath(pwd, CFG_SOURCEDIR or ".")); + print("Plugin directories:") + print(" "..(prosody.paths.plugins:gsub("([^;]+);?", function(path) + local opath = path; + path = config.resolve_relative_path(pwd, path); + local hgid, hgrepo = hg.check_id(path); + if not hgid and hgrepo then + return path.." - "..hgrepo .."!\n "; + end + hgrepo = hgrepo == "010452cfaf53" and "prosody-modules"; + return path..(hgid and " - "..(hgrepo or "HG").." rev: "..hgid or "") + .."\n "; + end))); print(""); print("# Lua environment"); print("Lua version: ", _G._VERSION);