Permalink
Browse files

[svn r2349] don't cause an error when there is a directory with no ve…

…rsion information (an uncommitted directory)

--HG--
branch : trunk
  • Loading branch information...
1 parent 83af8d4 commit 9db72c8abb36af17bfa668c38907fddad3978873 ianb committed May 29, 2007
Showing with 3 additions and 1 deletion.
  1. +3 −1 versioninfo.py
View
@@ -38,7 +38,9 @@ def svn_version():
elif data.startswith('<?xml'):
# SVN <= 1.3
dirurl = urlre.search(data).group(1) # get repository URL
- localrev = max([int(m.group(1)) for m in revre.finditer(data)])
+ revs = [int(m.group(1)) for m in revre.finditer(data)]
+ if revs:
+ localrev = max(revs)
else:
from warnings import warn
warn("unrecognized .svn/entries format; skipping "+base)

0 comments on commit 9db72c8

Please sign in to comment.