summaryrefslogtreecommitdiffstats
path: root/Tools
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2008-06-14 01:50:46 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2008-06-14 01:50:46 (GMT)
commit49ac5aa2efc7bf2798057df0298f3ea8400dc01f (patch)
tree60e112687e5c2093e4227d50e145ca9f6df780bf /Tools
parent3a4414855c5802a8b0b483f20fa81a1a910fd3f8 (diff)
downloadcpython-49ac5aa2efc7bf2798057df0298f3ea8400dc01f.zip
cpython-49ac5aa2efc7bf2798057df0298f3ea8400dc01f.tar.gz
cpython-49ac5aa2efc7bf2798057df0298f3ea8400dc01f.tar.bz2
Support subversion repositories of version 8.
Diffstat (limited to 'Tools')
-rw-r--r--Tools/scripts/svneol.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/Tools/scripts/svneol.py b/Tools/scripts/svneol.py
index a5e562c..5864cdc 100644
--- a/Tools/scripts/svneol.py
+++ b/Tools/scripts/svneol.py
@@ -33,9 +33,21 @@ and for a file with a binary mime-type property:
import re
import os
+def propfile(root, fn):
+ default = os.path.join(root, ".svn", "props", fn+".svn-work")
+ try:
+ format = int(open(os.path.join(root, ".svn", "format")).read().strip())
+ except IOError:
+ return default
+ # XXX I don't know what version uses what format;
+ # this condition is just anecdotal
+ if format >= 8:
+ return os.path.join(root, ".svn", "prop-base", fn+".svn-base")
+ return default
+
def proplist(root, fn):
"Return a list of property names for file fn in directory root"
- path = os.path.join(root, ".svn", "props", fn+".svn-work")
+ path = propfile(root, fn)
try:
f = open(path)
except IOError: