Implement git support in gensvnrevision tool and related changes in code.

gvnrevision still support svn version generation and have addition options now (see sources).
gensvnrevision/svn_revision.h and other svn reference will fixed later.
Now version strings include commit date/time that can be used in git case for fast find git commit without using git hash most time.
In chat ".server info" output git hash can be copied by shift-click in chat and then copied to cliboard if need.
This commit is contained in:
VladimirMangos 2008-10-25 14:29:06 +04:00
parent a0ab11bb17
commit 0874856e34
6 changed files with 248 additions and 52 deletions

View file

@ -29,6 +29,7 @@
#include "Language.h"
#include "AccountMgr.h"
#include "SystemConfig.h"
#include "svn_revision.h"
#include "Util.h"
bool ChatHandler::HandleHelpCommand(const char* args)
@ -92,7 +93,13 @@ bool ChatHandler::HandleInfoCommand(const char* /*args*/)
uint32 maxQueuedClientsNum = sWorld.GetMaxQueuedSessionCount();
std::string str = secsToTimeString(sWorld.GetUptime());
PSendSysMessage(_FULLVERSION);
char const* full;
if(m_session)
full = _FULLVERSION(SVN_DATE,SVN_TIME,"|cffffffff|Hurl:" SVN_REVISION "|h" SVN_REVISION "|h|r");
else
full = _FULLVERSION(SVN_DATE,SVN_TIME,SVN_REVISION);
PSendSysMessage(full);
PSendSysMessage(LANG_CONNECTED_USERS, activeClientsNum, maxActiveClientsNum, queuedClientsNum, maxQueuedClientsNum);
PSendSysMessage(LANG_UPTIME, str.c_str());