From ad33d03aff255293c38395faf3873c3d11d9012a Mon Sep 17 00:00:00 2001 From: brain Date: Mon, 27 Feb 2006 17:24:42 +0000 Subject: [PATCH] And now the final result of all this tweaking comes to light. Whenever i commit the post-commit hook writes a .sh script to my dir, within the insp checkout dir, containing the current revision id - 1. Therefore, the system can stay up to date with revision id's simply with ./configure -update :) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3376 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/inspircd.cpp | 20 +++----------------- src/svn-rev.sh | 2 +- 2 files changed, 4 insertions(+), 18 deletions(-) diff --git a/src/inspircd.cpp b/src/inspircd.cpp index 61c3b1004..c52444deb 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -127,21 +127,7 @@ bool FindServerName(std::string servername) std::string InspIRCd::GetRevision() { - /* w00t got me to replace a bunch of strtok_r - * with something nicer, so i did this. Its the - * same thing really, only in C++. It places the - * text into a std::stringstream which is a readable - * and writeable buffer stream, and then pops two - * words off it, space delimited. Because it reads - * into the same variable twice, the first word - * is discarded, and the second one returned. - */ - - /* XXX - this revision ID is NOT bumping automatically -- w00t */ - std::stringstream Revision(REVISION); - std::string single; - Revision >> single >> single; - return single; + return REVISION; } void InspIRCd::MakeLowerMap() @@ -251,11 +237,11 @@ std::string InspIRCd::GetVersionString() #endif if (*Config->CustomVersion) { - snprintf(versiondata,MAXBUF,"%s Rev. %s %s :%s",VERSION,GetRevision().c_str(),Config->ServerName,Config->CustomVersion); + snprintf(versiondata,MAXBUF,"%s %s :%s",VERSION,Config->ServerName,Config->CustomVersion); } else { - snprintf(versiondata,MAXBUF,"%s Rev. %s %s :%s [FLAGS=%lu,%s,%s]",VERSION,GetRevision().c_str(),Config->ServerName,SYSTEM,(unsigned long)OPTIMISATION,SE->GetName().c_str(),dnsengine); + snprintf(versiondata,MAXBUF,"%s %s :%s [FLAGS=%lu,%s,%s]",VERSION,Config->ServerName,SYSTEM,(unsigned long)OPTIMISATION,SE->GetName().c_str(),dnsengine); } return versiondata; } diff --git a/src/svn-rev.sh b/src/svn-rev.sh index f35c48ca6..5ad1ff158 100755 --- a/src/svn-rev.sh +++ b/src/svn-rev.sh @@ -1 +1 @@ -3373 +echo 3375 -- 2.39.2