Commit 7d654673 authored by maruel@chromium.org's avatar maruel@chromium.org

Fix compatibility with svn 1.7.

svn info --xml will return
<entry (...) revision="Resource is not under version control."> for
new files, causing an exception in the parsing code.

R=dpranke@chromium.org
BUG=
TEST=


Review URL: http://codereview.chromium.org/9110010

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@116522 0039d316-1c4b-4281-b951-d872f2087c98
parent 183df1a6
# Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
......@@ -578,7 +578,11 @@ class SVN(object):
# Use .text when the item is not optional.
result['Path'] = entry.attrib['path']
result['Revision'] = int(entry.attrib['revision'])
rev = entry.attrib['revision']
try:
result['Revision'] = int(rev)
except ValueError:
result['Revision'] = None
result['Node Kind'] = entry.attrib['kind']
# Differs across versions.
if result['Node Kind'] == 'dir':
......
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