Changeset 2111

Show
Ignore:
Timestamp:
03/19/07 18:54:01 (1 year ago)
Author:
eblot
Message:

RevtreePlugin:

Should fix up #1354: changesets containing modifications on several branches are simply declared as part of the 'empty' branch (appear as on the svn root)

Fixes up another Javascript nasty issue with Safari/Webkit based browsers: when the back button was used to return back from a changeset view to the revtree view, the Jquery tooltip was not cleared out.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • revtreeplugin/0.11/revtree/api.py

    r1908 r2111  
    1717 
    1818__all__ = ['IRevtreeEnhancer', 'IRevtreeOptimizer',  
    19            'EmptyRangeError', 'RevtreeSystem'] 
     19           'EmptyRangeError', 'BranchPathError', 'RevtreeSystem'] 
     20 
    2021 
    2122class IRevtreeEnhancer(Interface): 
     
    4849        TracError.__init__(self, "%sNo changeset" \ 
    4950                           % (msg and '%s: ' % msg or '')) 
     51 
    5052                            
     53class BranchPathError(TracError): 
     54    """Defines a RevTree error (incoherent paths in a branch)""" 
     55    def __init__(self, msg=None): 
     56        TracError.__init__(self, "Incoherent path %s" % (msg or '')) 
     57 
    5158 
    5259class RevtreeSystem(Component): 
  • revtreeplugin/0.11/revtree/htdocs/js/svgtip.js

    r1911 r2111  
    1414 
    1515function JT_hide(object) { 
    16   $('#JT').remove() 
     16   var jt = $('#JT'); 
     17   if ( jt ) { jt.remove(); } 
    1718} 
    1819 
  • revtreeplugin/0.11/revtree/model.py

    r2109 r2111  
    1717from datetime import datetime 
    1818 
    19 from revtree import EmptyRangeError, IRevtreeOptimizer 
     19from revtree import EmptyRangeError, BranchPathError, IRevtreeOptimizer 
    2020from trac.core import * 
    2121from trac.util.datefmt import utc 
     
    2929 
    3030    def __init__(self, repos, changeset): 
    31         # Repository 
     31        # repository 
    3232        self.repos = repos 
    33         # Trac changeset 
     33        # environment 
     34        self.env = repos.env 
     35        # trac changeset 
    3436        self.changeset = changeset 
    35         ## revision number 
     37        # revision number 
    3638        self.rev = self.changeset.rev 
    3739        # branch name 
     
    4951             
    5052    def build(self, bcre): 
    51         """Loads a changeset from a SVN repository""" 
    52         """ 
    53         cre should define two named groups 'branch' and 'path' 
     53        """Loads a changeset from a SVN repository 
     54        bcre should define two named groups 'branch' and 'path' 
    5455        """ 
    5556        try: 
    5657            if not self._find_simple_branch(bcre): 
    5758                self._find_plain_branch(bcre) 
    58         except AssertionError, e: 
    59             raise AssertionError, "%s rev: %d" % (e, self.rev or 0) 
     59        except BranchPathError, e: 
     60            self.env.log.warn("%s @ rev %s" % (e, self.rev or 0)) 
     61            self.branchname = None  
    6062         
    6163    def _load_properties(self): 
     
    125127                branch = br 
    126128            elif branch != br: 
    127                 raise AssertionError, 'Incoherent path [%s] != [%s]' \ 
    128                                       % (br, branch) 
     129                raise BranchPathError, "'%s' != '%s'" % (br, branch) 
    129130        self.branchname = branch 
    130131        return True 
  • revtreeplugin/0.11/revtree/templates/revtree.html

    r1916 r2111  
    2525          }); 
    2626       JT_init(); 
    27        updateLimits();  
     27       updateLimits(); 
     28     // the following function is required for Safari to operate properly 
     29     $(window).unload(function(){JT_hide()}); 
    2830    }); 
    2931    </script>     
  • revtreeplugin/0.11/setup.py

    r2109 r2111  
    1616 
    1717PACKAGE = 'TracRevtreePlugin' 
    18 VERSION = '0.5.0.2
     18VERSION = '0.5.1
    1919 
    2020setup (