def get_revision(self, location=None):
if not location:<EOL><INDENT>location = self.url<EOL><DEDENT>if os.path.exists(location) and not os.path.isdir(location):<EOL><INDENT>return self.get_revision_file(location)<EOL><DEDENT>revision = <NUM_LIT:0><EOL>for base, dirs, files in os.walk(location):<EOL><INDENT>if '<STR_LIT>' not in dirs:<EOL><INDENT>dirs[:] = []<EOL>continue  <EOL><DEDENT>dirs.remove('<STR_LIT>')<EOL>entries_fn = os.path.join(base, '<STR_LIT>', '<STR_LIT>')<EOL>if not os.path.exists(entries_fn):<EOL><INDENT>continue<EOL><DEDENT>dirurl, localrev = self._get_svn_url_rev(base)<EOL>if base == location:<EOL><INDENT>base_url = dirurl + '<STR_LIT:/>'  <EOL><DEDENT>elif not dirurl or not dirurl.startswith(base_url):<EOL><INDENT>dirs[:] = []<EOL>continue  <EOL><DEDENT>revision = max(revision, localrev)<EOL><DEDENT>return revision<EOL>
Return the maximum revision for all files under a given location