Changeset 2841
- Timestamp:
- 11/30/07 15:43:00 (1 year ago)
- Files:
-
- revtreeplugin/0.11/revtree/api.py (modified) (1 diff)
- revtreeplugin/0.11/revtree/web_ui.py (modified) (5 diffs)
- revtreeplugin/0.11/setup.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
revtreeplugin/0.11/revtree/api.py
r2299 r2841 67 67 68 68 def get_revtree(self, repos, req): 69 # ideally, the repository type should be requested from the repos 70 # instance; however it is usually hidden behind the repository cache 71 # that does not report the actual repository backend 72 if self.config.get('trac', 'repository_type') != 'svn': 73 raise TracError, "Revtree only supports Subversion repositories" 69 74 self.env.log.debug("Enhancers: %s" % self.enhancers) 70 75 from revtree.svgview import SvgRevtree revtreeplugin/0.11/revtree/web_ui.py
r2832 r2841 183 183 def __init__(self): 184 184 """Reads the configuration and run sanity checks""" 185 if self.config.get('trac', 'repository_type') != 'svn':186 raise TracError, "Revtree only supports Subversion repositories"187 185 bre = self.config.get('revtree', 'branch_re', 188 186 r'^(?P<branch>trunk|(?:branches|tags)/[^/]+)' … … 192 190 'trunk').split(' ') 193 191 self.scale = float(self.env.config.get('revtree', 'scale', '1')) 194 tracrepos = self.env.get_repository() 195 self.oldest = int(self.env.config.get('revtree', 'revbase', 196 tracrepos.get_oldest_rev())) 197 youngest = int(tracrepos.get_youngest_rev()) 192 self.oldest = int(self.env.config.get('revtree', 'revbase', '1')) 198 193 self.abstime = self.config.getbool('revtree', 'abstime', True) 199 194 self.style = self.config.get('revtree', 'style', 'compact') 200 195 if self.style not in [ 'compact', 'timeline']: 201 raise TracError, "Unsupported style: %s" % self.style 196 self.env.log.warning("Unsupported style: %s" % self.style) 197 self.style = 'compact' 202 198 self.rt = RevtreeSystem(self.env) 203 199 … … 226 222 tracrepos = self.env.get_repository() 227 223 youngest = int(tracrepos.get_youngest_rev()) 224 oldest = max(self.oldest, int(tracrepos.get_oldest_rev())) 228 225 if self.abstime: 229 226 timebase = int(time.time()) … … 231 228 timebase = to_timestamp(tracrepos.get_changeset(youngest).date) 232 229 revstore = RevtreeStore(self.env, req.authname, \ 233 ( self.oldest, youngest),230 (oldest, youngest), 234 231 timebase, self.style) 235 232 if req.args.has_key('reset') and req.args['reset']: … … 285 282 # restore default parameters 286 283 repos = Repository(self.env, req.authname) 287 repos.build(self.bcre, revrange=( self.oldest, youngest))284 repos.build(self.bcre, revrange=(oldest, youngest)) 288 285 branches = repos.branches().keys() 289 286 authors = repos.authors() 290 287 291 288 revrange = repos.revision_range() 292 revisions = self._get_ui_revisions(( self.oldest, youngest), revrange)289 revisions = self._get_ui_revisions((oldest, youngest), revrange) 293 290 branches.sort() 294 291 # prepend the trunks to the selected branches revtreeplugin/0.11/setup.py
r2832 r2841 16 16 17 17 PACKAGE = 'TracRevtreePlugin' 18 VERSION = '0.5.1 1'18 VERSION = '0.5.12' 19 19 20 20 setup (
