Changeset 2111
- Timestamp:
- 03/19/07 18:54:01 (1 year ago)
- Files:
-
- revtreeplugin/0.11/revtree/api.py (modified) (2 diffs)
- revtreeplugin/0.11/revtree/htdocs/js/svgtip.js (modified) (1 diff)
- revtreeplugin/0.11/revtree/model.py (modified) (4 diffs)
- revtreeplugin/0.11/revtree/templates/revtree.html (modified) (1 diff)
- revtreeplugin/0.11/setup.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
revtreeplugin/0.11/revtree/api.py
r1908 r2111 17 17 18 18 __all__ = ['IRevtreeEnhancer', 'IRevtreeOptimizer', 19 'EmptyRangeError', 'RevtreeSystem'] 19 'EmptyRangeError', 'BranchPathError', 'RevtreeSystem'] 20 20 21 21 22 class IRevtreeEnhancer(Interface): … … 48 49 TracError.__init__(self, "%sNo changeset" \ 49 50 % (msg and '%s: ' % msg or '')) 51 50 52 53 class 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 51 58 52 59 class RevtreeSystem(Component): revtreeplugin/0.11/revtree/htdocs/js/svgtip.js
r1911 r2111 14 14 15 15 function JT_hide(object) { 16 $('#JT').remove() 16 var jt = $('#JT'); 17 if ( jt ) { jt.remove(); } 17 18 } 18 19 revtreeplugin/0.11/revtree/model.py
r2109 r2111 17 17 from datetime import datetime 18 18 19 from revtree import EmptyRangeError, IRevtreeOptimizer19 from revtree import EmptyRangeError, BranchPathError, IRevtreeOptimizer 20 20 from trac.core import * 21 21 from trac.util.datefmt import utc … … 29 29 30 30 def __init__(self, repos, changeset): 31 # Repository31 # repository 32 32 self.repos = repos 33 # Trac changeset 33 # environment 34 self.env = repos.env 35 # trac changeset 34 36 self.changeset = changeset 35 # #revision number37 # revision number 36 38 self.rev = self.changeset.rev 37 39 # branch name … … 49 51 50 52 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' 54 55 """ 55 56 try: 56 57 if not self._find_simple_branch(bcre): 57 58 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 60 62 61 63 def _load_properties(self): … … 125 127 branch = br 126 128 elif branch != br: 127 raise AssertionError, 'Incoherent path [%s] != [%s]' \ 128 % (br, branch) 129 raise BranchPathError, "'%s' != '%s'" % (br, branch) 129 130 self.branchname = branch 130 131 return True revtreeplugin/0.11/revtree/templates/revtree.html
r1916 r2111 25 25 }); 26 26 JT_init(); 27 updateLimits(); 27 updateLimits(); 28 // the following function is required for Safari to operate properly 29 $(window).unload(function(){JT_hide()}); 28 30 }); 29 31 </script> revtreeplugin/0.11/setup.py
r2109 r2111 16 16 17 17 PACKAGE = 'TracRevtreePlugin' 18 VERSION = '0.5. 0.2'18 VERSION = '0.5.1' 19 19 20 20 setup (
