prosody: Prefix hg: to changeset ids in the version

Fri, 05 Jun 2009 01:58:40 +0100

author
Matthew Wild <mwild1@gmail.com>
date
Fri, 05 Jun 2009 01:58:40 +0100
changeset 1313
6c7347696caa
parent 1312
ad7d144b6796
child 1314
c18cf7ccc2de

prosody: Prefix hg: to changeset ids in the version

prosody file | annotate | diff | comparison | revisions
--- a/prosody	Fri Jun 05 01:27:41 2009 +0100
+++ b/prosody	Fri Jun 05 01:58:40 2009 +0100
@@ -92,6 +92,9 @@
 if version_file then
 	prosody.version = version_file:read("*a"):gsub("%s*$", "");
 	version_file:close();
+	if #prosody.version == 12 and prosody.version:match("^[a-f0-9]+$") then
+		prosody.version = "hg:"..prosody.version;
+	end
 else
 	prosody.version = "unknown";
 end

mercurial