Temporary workaround for trac 0.11. default tip
authorShun-ichi GOTO <shunichi.goto@gmail.com>
Thu Sep 13 22:35:43 2007 +0900 (2007-09-13)
changeset 423fefbe9a3b1c
parent 41 e55c921930eb
Temporary workaround for trac 0.11.
Trac treats URL in `repository_dir` as relative path and passes incorrect
URL prepending environment path. So find URL from `dir` arg and use it.
This change is dirty but applied to play on 0.11.
tracremotesvn/svn_ra.py
     1.1 --- a/tracremotesvn/svn_ra.py	Wed Jan 17 16:47:07 2007 +0900
     1.2 +++ b/tracremotesvn/svn_ra.py	Thu Sep 13 22:35:43 2007 +0900
     1.3 @@ -461,6 +461,12 @@
     1.4          The repository is generally wrapped in a `CachedRepository`,
     1.5          unless `direct-svn-fs` is the specified type.
     1.6          """
     1.7 +        # NOTE: trac 0.11 pass URL specified in 'repository_dir'
     1.8 +        #       with prepending environment directory. 
     1.9 +        #       So extract URL part from dir for workaround
    1.10 +        m = re.search('(https?|file|svn|svn+ssh):', dir)
    1.11 +        if m:
    1.12 +            dir = dir[m.start(1):]
    1.13          repos = SvnRaRepository(dir, None, self.log)
    1.14          crepos = CachedRepository(self.env.get_db_cnx(), repos, None, self.log)
    1.15          if authname: