Edgewall Software

Changeset 1583

Show
Ignore:
Timestamp:
05/04/05 23:58:57 (4 years ago)
Author:
cmlenz
Message:

0.8-stable: Fixing compatibility with Subversion 1.2, which removes the svn.util module.

Location:
branches/0.8-stable
Files:
8 modified

Legend:

Unmodified
Added
Removed
  • branches/0.8-stable/scripts/trac-admin

    r1146 r1583  
    485485            repository_dir = arg[1] 
    486486            templates_dir = arg[2] 
    487         from svn import util, repos, core 
     487        from svn import core, repos 
    488488        core.apr_initialize() 
    489489        pool = core.svn_pool_create(None) 
  • branches/0.8-stable/trac/Browser.py

    r1203 r1583  
    7575            created_rev = svn.fs.node_created_rev(root, fullpath, self.pool) 
    7676            date = svn.fs.revision_prop(self.fs_ptr, created_rev, 
    77                                     svn.util.SVN_PROP_REVISION_DATE, 
     77                                    svn.core.SVN_PROP_REVISION_DATE, 
    7878                                    self.pool) 
    7979            if date: 
    80                 date_seconds = svn.util.svn_time_from_cstring(date, 
    81                                                           self.pool) / 1000000 
     80                date_seconds = svn.core.svn_time_from_cstring(date, 
     81                                                              self.pool) / 1000000 
    8282                date = time.strftime('%x %X', time.localtime(date_seconds)) 
    8383            else: 
     
    8585                date = '' 
    8686            author = svn.fs.revision_prop(self.fs_ptr, created_rev, 
    87                                       svn.util.SVN_PROP_REVISION_AUTHOR, 
    88                                       self.pool) 
     87                                          svn.core.SVN_PROP_REVISION_AUTHOR, 
     88                                          self.pool) 
    8989            change = svn.fs.revision_prop(self.fs_ptr, created_rev, 
    90                                              svn.util.SVN_PROP_REVISION_LOG, 
    91                                              self.pool) 
     90                                          svn.core.SVN_PROP_REVISION_LOG, 
     91                                          self.pool) 
    9292            item = { 
    9393                'name'         : name, 
  • branches/0.8-stable/trac/Changeset.py

    r1270 r1583  
    6060        # and the new version uses the same charset, not always the case 
    6161        # but that's all we can do... 
    62         mime_type = svn.fs.node_prop (self.new_root, new_path, 
    63                                       svn.util.SVN_PROP_MIME_TYPE, 
    64                                       pool) 
     62        mime_type = svn.fs.node_prop(self.new_root, new_path, 
     63                                     svn.core.SVN_PROP_MIME_TYPE, 
     64                                     pool) 
    6565        # We don't have to guess if the charset is specified in the 
    6666        # svn:mime-type property 
  • branches/0.8-stable/trac/core.py

    r1260 r1583  
    448448 
    449449def open_svn_repos(repos_dir): 
    450     from svn import util, repos, core 
     450    from svn import core, repos 
    451451 
    452452    core.apr_initialize() 
  • branches/0.8-stable/trac/File.py

    r1479 r1583  
    305305 
    306306        # Try to do an educated guess about the mime-type 
    307         self.mime_type = svn.fs.node_prop (root, self.path, 
    308                                            svn.util.SVN_PROP_MIME_TYPE, 
    309                                            self.pool) 
     307        self.mime_type = svn.fs.node_prop(root, self.path, 
     308                                          svn.core.SVN_PROP_MIME_TYPE, 
     309                                          self.pool) 
    310310        if not self.mime_type: 
    311311            self.mime_type = self.env.mimeview.get_mimetype(filename=self.path) or \ 
     
    322322        self.length = svn.fs.file_length(root, self.path, self.pool) 
    323323        date = svn.fs.revision_prop(self.fs_ptr, self.rev, 
    324                                 svn.util.SVN_PROP_REVISION_DATE, self.pool) 
    325         date_seconds = svn.util.svn_time_from_cstring(date, self.pool) / 1000000 
     324                                    svn.core.SVN_PROP_REVISION_DATE, self.pool) 
     325        date_seconds = svn.core.svn_time_from_cstring(date, self.pool) / 1000000 
    326326        self.last_modified = time.strftime("%a, %d %b %Y %H:%M:%S GMT", 
    327                                       time.gmtime(date_seconds)) 
     327                                           time.gmtime(date_seconds)) 
    328328        fd = svn.fs.file_contents(root, self.path, self.pool) 
    329         self.read_func = lambda x, f=fd: svn.util.svn_stream_read(f, x) 
     329        self.read_func = lambda x, f=fd: svn.core.svn_stream_read(f, x) 
  • branches/0.8-stable/trac/Log.py

    r1244 r1583  
    4444 
    4545        shortlog = util.shorten_line(util.wiki_escape_newline(log)) 
    46         t = svn.util.svn_time_from_cstring(date, pool) / 1000000 
     46        t = svn.core.svn_time_from_cstring(date, pool) / 1000000 
    4747        gmt = time.gmtime(t) 
    4848        item = { 
  • branches/0.8-stable/trac/sync.py

    r806 r1583  
    2020# Author: Jonas Borgstr�jonas@edgewall.com> 
    2121 
    22 from svn import fs, util, delta, repos, core 
     22from svn import core, fs, delta, repos 
    2323 
    2424def sync(db, repos, fs_ptr, pool): 
     
    2828    """ 
    2929 
    30     if util.SVN_VER_MAJOR < 1: 
     30    if core.SVN_VER_MAJOR < 1: 
    3131        raise EnvironmentError, \ 
    3232              "Subversion >= 1.0 required: Found %d.%d.%d" % \ 
    33               (util.SVN_VER_MAJOR, util.SVN_VER_MINOR, util.SVN_VER_MICRO) 
     33              (core.SVN_VER_MAJOR, core.SVN_VER_MINOR, core.SVN_VER_MICRO) 
    3434 
    3535    cursor = db.cursor() 
     
    4343    for rev in range(num): 
    4444        message = fs.revision_prop(fs_ptr, rev + offset, 
    45                                    util.SVN_PROP_REVISION_LOG, subpool) 
     45                                   core.SVN_PROP_REVISION_LOG, subpool) 
    4646        author = fs.revision_prop(fs_ptr, rev + offset, 
    47                                   util.SVN_PROP_REVISION_AUTHOR, subpool) 
     47                                  core.SVN_PROP_REVISION_AUTHOR, subpool) 
    4848        date = fs.revision_prop(fs_ptr, rev + offset, 
    49                                 util.SVN_PROP_REVISION_DATE, subpool) 
     49                                core.SVN_PROP_REVISION_DATE, subpool) 
    5050 
    51         date = util.svn_time_from_cstring(date, subpool) / 1000000 
     51        date = core.svn_time_from_cstring(date, subpool) / 1000000 
    5252         
    5353        cursor.execute ('INSERT INTO revision (rev, time, author, message) ' 
  • branches/0.8-stable/trac/util.py

    r1138 r1583  
    3333 
    3434def svn_date_to_string(date, pool): 
    35     from svn import util 
    36     date_seconds = util.svn_time_from_cstring(date, 
     35    from svn import core 
     36    date_seconds = core.svn_time_from_cstring(date, 
    3737                                              pool) / 1000000 
    3838    return time.strftime('%x %X', time.localtime(date_seconds))