summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/tags.cc
diff options
context:
space:
mode:
authorSteven Noonan <steven@uplinklabs.net>2009-10-18 07:58:32 -0700
committerSteven Noonan <steven@uplinklabs.net>2009-10-18 07:59:54 -0700
commit2f656a0430f31656ebf81b6ee0690bc6ad04268f (patch)
tree3559bd9779bbbdb9dad67d315e1ade4c5008e805 /crawl-ref/source/tags.cc
parent4a5e72289713324ce6ff6000276bd81681b18666 (diff)
downloadcrawl-ref-2f656a0430f31656ebf81b6ee0690bc6ad04268f.tar.gz
crawl-ref-2f656a0430f31656ebf81b6ee0690bc6ad04268f.zip
versioning: remove SVN-specific revision data, add Git versioning
Signed-off-by: Steven Noonan <steven@uplinklabs.net>
Diffstat (limited to 'crawl-ref/source/tags.cc')
-rw-r--r--crawl-ref/source/tags.cc19
1 files changed, 11 insertions, 8 deletions
diff --git a/crawl-ref/source/tags.cc b/crawl-ref/source/tags.cc
index da5980878b..ac283fc6b5 100644
--- a/crawl-ref/source/tags.cc
+++ b/crawl-ref/source/tags.cc
@@ -58,7 +58,6 @@
#endif
#include "AppHdr.h"
-REVISION("$Rev$");
#include "artefact.h"
#include "branch.h"
@@ -1017,15 +1016,12 @@ static void tag_construct_you(writer &th)
if (!dlua.callfn("dgn_save_data", "u", &th))
mprf(MSGCH_ERROR, "Failed to save Lua data: %s", dlua.error.c_str());
- // minorVersion TAG_MINOR_SVNREV starts here
+ // minorVersion TAG_MINOR_GITREV starts here
// Write a human-readable string out on the off chance that
// we fail to be able to read this file back in using some later version.
- std::string revision = "SVN:";
- revision += number_to_string(svn_revision());
- revision += ":";
- revision += VERSION_DETAIL;
+ std::string revision = "Git:";
+ revision += Version::Long();
marshallString(th, revision);
- marshallLong(th, svn_revision());
}
static void tag_construct_you_items(writer &th)
@@ -1460,7 +1456,8 @@ static void tag_read_you(reader &th, char minorVersion)
dlua.error.c_str());
}
- if (minorVersion >= TAG_MINOR_SVNREV)
+ if (minorVersion >= TAG_MINOR_SVNREV &&
+ minorVersion < TAG_MINOR_GITREV)
{
std::string rev_str = unmarshallString(th);
int rev_int = unmarshallLong(th);
@@ -1468,6 +1465,12 @@ static void tag_read_you(reader &th, char minorVersion)
UNUSED(rev_str);
UNUSED(rev_int);
}
+
+ if (minorVersion >= TAG_MINOR_GITREV)
+ {
+ std::string rev_str = unmarshallString(th);
+ UNUSED(rev_str);
+ }
}
static void tag_read_you_items(reader &th, char minorVersion)