diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2008-06-14 01:51:58 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2008-06-14 01:51:58 (GMT) |
commit | a08702aca6905b14377e540fe84d159dcb816f80 (patch) | |
tree | 8a9dbca9d49642a49a530c17f6ee19fc6a3d8ce6 /Tools/scripts | |
parent | 169c01461d8be6ec26a27b36657d4f1d5de989ca (diff) | |
download | cpython-a08702aca6905b14377e540fe84d159dcb816f80.zip cpython-a08702aca6905b14377e540fe84d159dcb816f80.tar.gz cpython-a08702aca6905b14377e540fe84d159dcb816f80.tar.bz2 |
Merged revisions 64262 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r64262 | martin.v.loewis | 2008-06-14 03:50:46 +0200 (Sa, 14 Jun 2008) | 2 lines
Support subversion repositories of version 8.
........
Diffstat (limited to 'Tools/scripts')
-rw-r--r-- | Tools/scripts/svneol.py | 14 |
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: |