Edgewall Software
Modify

Opened 9 years ago

Closed 9 years ago

Last modified 8 years ago

#12110 closed defect (fixed)

High CPU usage and hangup in repository browser due to svn:externals

Reported by: Jun Omae Owned by: Jun Omae
Priority: normal Milestone: 0.12.8
Component: version control Version: 0.12-stable
Severity: normal Keywords: svn:externals
Cc: Branch:
Release Notes:

Fix endless-loop while rendering svn:externals property with a protocol relative url.

API Changes:
Internal Changes:

Description

High CPU usage and hangup occurs when a directory is viewed in repository browser after path -r42 //hostname is set to svn:externals property of the directory.

The leading double slash characters in non-absolute url leads the issue.

  • trac/versioncontrol/svn_prop.py

    diff --git a/trac/versioncontrol/svn_prop.py b/trac/versioncontrol/svn_prop.py
    index 7b425d7..f0e8977 100644
    a b class SubversionPropertyRenderer(Component):  
    5151        elif name == 'svn:mergeinfo' or name.startswith('svnmerge-'):
    5252            return self._render_mergeinfo(name, mode, context, props)
    5353
     54    def _is_abs_url(self, url):
     55        return url and '://' in url
     56
    5457    def _render_externals(self, prop):
    5558        if not self._externals_map:
    5659            for dummykey, value in self.config.options('svn:externals'):
    class SubversionPropertyRenderer(Component):  
    7780                rev = elements[1]
    7881                rev = rev.replace('-r', '')
    7982            # retrieve a matching entry in the externals map
     83            if not self._is_abs_url(url):
     84                externals.append((external, None, None, None, None))
     85                continue
    8086            prefix = []
    8187            base_url = url
    8288            while base_url:

Attachments (0)

Change History (5)

comment:1 by Jun Omae, 9 years ago

Owner: set to Jun Omae
Status: newassigned

Proposed changes in [b8d03d4f1/jomae.git], adding unit tests for rendering svn:externals property.

comment:2 by Ryan J Ollos, 9 years ago

milestone:0.12.7 still hasn't been released, but I will try to take care of that by this weekend so that you can apply the change for milestone:0.12.8.

comment:3 by Jun Omae, 9 years ago

[f9289ed48/jomae.git] for 1.0-stable.

comment:4 by Ryan J Ollos, 9 years ago

I'll hold off generating 1.0.7 and 1.1.6 until this ticket is resolved.

comment:5 by Jun Omae, 9 years ago

Release Notes: modified (diff)
Resolution: fixed
Status: assignedclosed

Committed in [14161], merged to 1.0-stable in [14162], and merged to trunk in [14163].

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jun Omae.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Jun Omae to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.