Did I find the right examples for you? yes no

All Samples(3)  |  Call(3)  |  Derive(0)  |  Import(0)

        def parse_revnum(svnrepo, r):
    try:
        return int(r or 0)
    except ValueError:
        if isinstance(r, str) and r.lower() in ('head', 'tip'):
            return svnrepo.last_changed_rev
        else:
            raise error.RepoLookupError("unknown Subversion revision %r" % r)
        


src/h/g/hgsubversion-1.6/hgsubversion/wrappers.py   hgsubversion(Download)
        meta = repo.svnmeta(svn.uuid, svn.subdir)
 
        stopat_rev = util.parse_revnum(svn, checkout)
 
        layout = layouts.detect.layout_from_config(repo.ui, allow_auto=True)
        if start <= 0:
            # we are initializing a new repository
            start = util.parse_revnum(svn, repo.ui.config('hgsubversion',
                                                          'startrev', 0))
 
 
        skiprevs = repo.ui.configlist('hgsubversion', 'unsafeskip', '')
        skiprevs = set(util.parse_revnum(svn, r) for r in skiprevs)
 
        oldrevisions = len(meta.revmap)