Edgewall Software
Modify

Opened 19 years ago

Closed 19 years ago

#1275 closed defect (fixed)

Error accessing a branch-creation changeset

Reported by: Juanma Barranquero Owned by: anonymous
Priority: high Milestone: 0.9
Component: version control/changeset view Version: devel
Severity: major Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

On my installation, accessing http://localhost/trac/changeset/691 produces an error:

 Trac detected an internal error:

   'ClaSent/branches/desarrollo-tests/ClaSent.pl'

Changeset 691 has nothing extraordinary per se. It was just:

  svn cp http://localhost/svn/work/ClaSent/trunk http://localhost/svn/work/ClaSent/branches/desarrollo-tests -m "Testing branch."

and it worked flawlessly. But now every time I try to get to it from Trac I get this stack trace:

Traceback (most recent call last):
  File "C:\bin\python\lib\site-packages\trac\web\modpython_frontend.py", line 179, in handler
    dispatch_request(mpr.path_info, mpr, env)
  File "C:\bin\python\lib\site-packages\trac\web\main.py", line 319, in dispatch_request
    module.run(req)
  File "C:\bin\python\lib\site-packages\trac\Module.py", line 52, in run
    disp(req)
  File "C:\bin\python\lib\site-packages\trac\Changeset.py", line 494, in display
    self.render_diffs(req)
  File "C:\bin\python\lib\site-packages\trac\Changeset.py", line 490, in render_diffs
    0, 1, 0, 1, self.pool)
  File "C:\bin\python\lib\site-packages\trac\Changeset.py", line 188, in change_file_prop
    self._change_prop(file_baton, name, value, file_pool)
  File "C:\bin\python\lib\site-packages\trac\Changeset.py", line 195, in _change_prop
    old_root = self._old_root(new_path, pool)
  File "C:\bin\python\lib\site-packages\trac\Changeset.py", line 128, in _old_root
    old_rev = self.path_info[new_path][2]
KeyError: 'ClaSent/branches/desarrollo-tests/ClaSent.pl'

Attachments (0)

Change History (8)

comment:1 by cboos@…, 19 years ago

Could you give me some more informations, please?

  • the version of the SVN command line svn --version
  • the version of the SVN bindings Trac is using
  • the output of svn plist -v -r 691 http://localhost/svn/work/ClaSent/branches/desarrollo-tests/ClaSent.pl
  • the output of svn plist -v -r 690 http://localhost/svn/work/ClaSent/trunk/ClaSent.pl

As I'm certainly the author of the bug, I'll try to fix it :)

comment:2 by anonymous, 19 years ago

  • the version of the SVN command line svn —version
    svn, version 1.1.3 (r12730)
       compiled Jan 20 2005, 05:51:34
    
  • the version of the SVN bindings Trac is using
    The version of the Python bindings, you mean? The same as for the command line client: 1.1.3 (from the Subversion Win32 download page's svn-win32-1.1.3_py.zip).
  • the output of
    svn plist -v -r 691 http://localhost/svn/work/ClaSent/branches/desarrollo-tests/ClaSent.pl
    Properties on 'http://localhost/svn/work/ClaSent/branches/desarrollo-tests/ClaSent.pl':
      svn:executable : 
      svn:eol-style : native
    
  • the output of
    svn plist -v -r 690 http://localhost/svn/work/ClaSent/trunk/ClaSent.pl
    Properties on 'http://localhost/svn/work/ClaSent/trunk/ClaSent.pl':
      svn:executable : 
      svn:eol-style : native
    

comment:3 by cboos@…, 19 years ago

I got it!

The following lines, removed in [1314], are needed:

  • trac/Changeset.py

     
    138139
    139140    def apply_textdelta(self, file_baton, base_checksum):
    140141        old_path, new_path, pool = file_baton
    141         if not old_path or not new_path:
     142        if not self.prefix or not (old_path and new_path):
    142143            return
    143144        old_root = self._old_root(new_path, pool)
    144145        if not old_root:
     
    188189        self._change_prop(file_baton, name, value, file_pool)
    189190
    190191    def _change_prop(self, baton, name, value, pool):
     192        if not self.prefix:
     193            return
    191194        old_path, new_path, pool = baton
    192195
    193196        prefix = '%s.props.%s' % (self.prefix, name)

Specifically, your problem was related to the second diff, but I'm pretty sure that the first diff is also necessary in some situations (can't remember which right now).

comment:4 by anonymous, 19 years ago

Milestone: 0.9
Owner: changed from Jonas Borgström to anonymous
Priority: lowhigh
Severity: minormajor
Status: newassigned

Oh, I wasn't aware that self.prefix might not be set. Sorry for the breakage, will check in the fix.

comment:5 by Juanma Barranquero, 19 years ago

Milestone: 0.9
Priority: highlow
Severity: majorminor

Yeah, it works now. Thanks.

comment:6 by Juanma Barranquero, 19 years ago

Milestone: 0.9
Priority: lowhigh
Severity: minormajor

It seems I updated the ticket at the wrong time and I've reset priority, severity and milestone

comment:7 by Christopher Lenz, 19 years ago

Yeah, the ticket form needs transaction tokens of some kind. There's a ticket about there somewhere, but I can't find it right now.

comment:8 by Christopher Lenz, 19 years ago

Resolution: fixed
Status: assignedclosed

Fixed in [1341].

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain anonymous.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from anonymous 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.