| OLD | NEW |
| 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import posixpath | 5 import posixpath |
| 6 import traceback | 6 import traceback |
| 7 import xml.dom.minidom as xml | 7 import xml.dom.minidom as xml |
| 8 from xml.parsers.expat import ExpatError | 8 from xml.parsers.expat import ExpatError |
| 9 | 9 |
| 10 from appengine_url_fetcher import AppEngineUrlFetcher | 10 from appengine_url_fetcher import AppEngineUrlFetcher |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 raise FileSystemError('Failed to find version of dir %s' % directory) | 194 raise FileSystemError('Failed to find version of dir %s' % directory) |
| 195 if path == '' or path.endswith('/'): | 195 if path == '' or path.endswith('/'): |
| 196 return stat_info | 196 return stat_info |
| 197 if filename not in stat_info.child_versions: | 197 if filename not in stat_info.child_versions: |
| 198 raise FileNotFoundError( | 198 raise FileNotFoundError( |
| 199 '%s from %s was not in child versions for Stat' % (filename, path)) | 199 '%s from %s was not in child versions for Stat' % (filename, path)) |
| 200 return StatInfo(stat_info.child_versions[filename]) | 200 return StatInfo(stat_info.child_versions[filename]) |
| 201 | 201 |
| 202 return Future(callback=resolve) | 202 return Future(callback=resolve) |
| 203 | 203 |
| 204 def GetIdentity(self): | 204 def GetStableIdentity(self): |
| 205 # NOTE: no revision here, since it would mess up the caching of reads. It | 205 # NOTE: no revision here, since it would mess up the caching of reads. It |
| 206 # probably doesn't matter since all the caching classes will use the result | 206 # probably doesn't matter since all the caching classes will use the result |
| 207 # of Stat to decide whether to re-read - and Stat has a ceiling of the | 207 # of Stat to decide whether to re-read - and Stat has a ceiling of the |
| 208 # revision - so when the revision changes, so might Stat. That is enough. | 208 # revision - so when the revision changes, so might Stat. That is enough. |
| 209 return '@'.join((self.__class__.__name__, StringIdentity(self._svn_path))) | 209 return '@'.join((self.__class__.__name__, StringIdentity(self._svn_path))) |
| OLD | NEW |