Kaydet (Commit) d5a5f5d3 authored tarafından Collin Winter's avatar Collin Winter

Patch #1774414: make it possible to use SVK to develop Python.

üst 4d9620a6
...@@ -934,15 +934,17 @@ svnversion_init(void) ...@@ -934,15 +934,17 @@ svnversion_init(void)
{ {
const char *python, *br_start, *br_end, *br_end2, *svnversion; const char *python, *br_start, *br_end, *br_end2, *svnversion;
Py_ssize_t len; Py_ssize_t len;
int istag; int istag = 0;
if (svn_initialized) if (svn_initialized)
return; return;
python = strstr(headurl, "/python/"); python = strstr(headurl, "/python/");
if (!python) if (!python) {
Py_FatalError("subversion keywords missing"); strcpy(branch, "unknown branch");
strcpy(shortbranch, "unknown");
}
else {
br_start = python + 8; br_start = python + 8;
br_end = strchr(br_start, '/'); br_end = strchr(br_start, '/');
assert(br_end); assert(br_end);
...@@ -955,7 +957,6 @@ svnversion_init(void) ...@@ -955,7 +957,6 @@ svnversion_init(void)
if (strncmp(br_start, "trunk", 5) == 0) { if (strncmp(br_start, "trunk", 5) == 0) {
strcpy(branch, "trunk"); strcpy(branch, "trunk");
strcpy(shortbranch, "trunk"); strcpy(shortbranch, "trunk");
} }
else if (istag || strncmp(br_start, "branches", 8) == 0) { else if (istag || strncmp(br_start, "branches", 8) == 0) {
len = br_end2 - br_start; len = br_end2 - br_start;
...@@ -970,6 +971,7 @@ svnversion_init(void) ...@@ -970,6 +971,7 @@ svnversion_init(void)
Py_FatalError("bad HeadURL"); Py_FatalError("bad HeadURL");
return; return;
} }
}
svnversion = _Py_svnversion(); svnversion = _Py_svnversion();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment