summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2011-03-25 21:57:30 (GMT)
committerBenjamin Peterson <benjamin@python.org>2011-03-25 21:57:30 (GMT)
commit7859d4098c941ddaf85fccd6850ae3004c47674e (patch)
tree06b99f040cb20382cd7eaa276b3829198eb1d641 /Python
parent4664563f3401c3d8644ea66c8e4fe71deddcbb80 (diff)
downloadcpython-7859d4098c941ddaf85fccd6850ae3004c47674e.zip
cpython-7859d4098c941ddaf85fccd6850ae3004c47674e.tar.gz
cpython-7859d4098c941ddaf85fccd6850ae3004c47674e.tar.bz2
remove this dead subversion code
Diffstat (limited to 'Python')
-rw-r--r--Python/sysmodule.c67
1 files changed, 5 insertions, 62 deletions
diff --git a/Python/sysmodule.c b/Python/sysmodule.c
index eeb18f3..00b3aa4 100644
--- a/Python/sysmodule.c
+++ b/Python/sysmodule.c
@@ -1143,8 +1143,6 @@ _check_and_flush (FILE *stream)
}
/* Subversion branch and revision management */
-static const char _patchlevel_revision[] = PY_PATCHLEVEL_REVISION;
-static const char headurl[] = "$HeadURL$";
static int svn_initialized;
static char patchlevel_revision[50]; /* Just the number */
static char branch[50];
@@ -1154,69 +1152,14 @@ static const char *svn_revision;
static void
svnversion_init(void)
{
- const char *python, *br_start, *br_end, *br_end2, *svnversion;
- Py_ssize_t len;
- int istag;
-
if (svn_initialized)
return;
-
- python = strstr(headurl, "/python/");
- if (!python) {
- /* XXX quick hack to get bzr working */
- *patchlevel_revision = '\0';
- strcpy(branch, "");
- strcpy(shortbranch, "unknown");
- svn_revision = "";
- return;
- /* Py_FatalError("subversion keywords missing"); */
- }
-
- br_start = python + 8;
- br_end = strchr(br_start, '/');
- assert(br_end);
-
- /* Works even for trunk,
- as we are in trunk/Python/sysmodule.c */
- br_end2 = strchr(br_end+1, '/');
-
- istag = strncmp(br_start, "tags", 4) == 0;
- if (strncmp(br_start, "trunk", 5) == 0) {
- strcpy(branch, "trunk");
- strcpy(shortbranch, "trunk");
-
- }
- else if (istag || strncmp(br_start, "branches", 8) == 0) {
- len = br_end2 - br_start;
- strncpy(branch, br_start, len);
- branch[len] = '\0';
-
- len = br_end2 - (br_end + 1);
- strncpy(shortbranch, br_end + 1, len);
- shortbranch[len] = '\0';
- }
- else {
- Py_FatalError("bad HeadURL");
- return;
- }
-
-
- svnversion = _Py_svnversion();
- if (strcmp(svnversion, "Unversioned directory") != 0 && strcmp(svnversion, "exported") != 0)
- svn_revision = svnversion;
- else if (istag) {
- len = strlen(_patchlevel_revision);
- assert(len >= 13);
- assert(len < (sizeof(patchlevel_revision) + 13));
- strncpy(patchlevel_revision, _patchlevel_revision + 11,
- len - 13);
- patchlevel_revision[len - 13] = '\0';
- svn_revision = patchlevel_revision;
- }
- else
- svn_revision = "";
-
svn_initialized = 1;
+ *patchlevel_revision = '\0';
+ strcpy(branch, "");
+ strcpy(shortbranch, "unknown");
+ svn_revision = "";
+ return;
}
/* Return svnversion output if available.