mirror of
https://github.com/python/cpython.git
synced 2026-02-05 09:25:35 +00:00
Support subversion repositories of version 8.
This commit is contained in:
parent
3a4414855c
commit
49ac5aa2ef
1 changed files with 13 additions and 1 deletions
|
|
@ -33,9 +33,21 @@
|
|||
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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue