Edgewall Software
Modify

Opened 14 years ago

Last modified 5 years ago

#10162 new defect

Add a REPOS kind of Node

Reported by: dmarti Owned by:
Priority: normal Milestone: next-major-releases
Component: version control Version: 0.12.1
Severity: normal Keywords: subrepository
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description (last modified by Remy Blank)

How to Reproduce

While doing a GET operation on /changeset/26e036576133f07b15eeb4363bf993b67bf9eacb/tp, Trac issued an internal error.

This only happens for a changeset that only updates git submodules, for which "get_content_length" returns None (because there is no associated git blob).

(The Python error is "unsupported operand type(s) for +")

This is similar to the old ticket #3287 here.

Request parameters:

{ new : u 26e036576133f07b15eeb4363bf993b67bf9eacb ,  new_path : u /tp }

User agent: Mozilla/5.0 X11; U; Linux x86_64; en-US; rv:1.9.2.17 Gecko/20110428 Fedora/3.6.17-1.fc14 Firefox/3.6.17

System Information

Trac 0.12.1
Docutils 0.7
Genshi 0.6
GIT 1.7.3.4
psycopg2 2.2.2
Pygments 1.3.1
Python 2.6.6 r266:84292, Mar 6 2011, 17:53:48 br GCC 4.3.4
pytz 2010o
setuptools 0.6
Subversion 1.6.16 r1073529
jQuery 1.4.2

Enabled Plugins

BatchModify 0.8.0-trac0.12
FilteredTicketQuery N/A
timingandestimationplugin 1.0.6
TracGit 0.12.0.6dev

Python Traceback

Traceback  most recent call last :
File  /usr/lib64/python2.6/site-packages/trac/web/main.py , line 511, in _dispatch_request
dispatcher.dispatch req
File  /usr/lib64/python2.6/site-packages/trac/web/main.py , line 237, in dispatch
resp   chosen_handler.process_request req
File  /usr/lib64/python2.6/site-packages/trac/versioncontrol/web_ui/changeset.py , line 352, in process_request
self._render_html req, repos, chgset, restricted, xhr, data
File  /usr/lib64/python2.6/site-packages/trac/versioncontrol/web_ui/changeset.py , line 586, in _render_html
diff_bytes   _estimate_changes old_node, new_node
File  /usr/lib64/python2.6/site-packages/trac/versioncontrol/web_ui/changeset.py , line 537, in _estimate_changes
return old_size new_size
TypeError: unsupported operand type s  for :  NoneType  and  NoneType

Attachments (1)

tracchangesetsubmodulebug.patch (1.4 KB ) - added by moritz.vifian@… 9 years ago.
Dirty Patch to at least show the other parts of the changeset

Download all attachments as: .zip

Change History (13)

comment:1 by Remy Blank, 14 years ago

Description: modified (diff)

comment:2 by anonymous, 14 years ago

We should think about having a new kind of node for representing sub-repositories.

comment:3 by Christian Boos, 13 years ago

Component: generalversion control
Keywords: subrepository added
Milestone: next-major-0.1X

Forgot to set the milestone…

(as for the bug in the GitPlugin itself, the easiest way to solve it is to return a type of "dir" for the subrepositories, for now)

comment:4 by Christian Boos, 13 years ago

Summary: TypeError: unsupported operand type s for : NoneType and NoneTypeAdd a REPOS kind of Node

This new kind of node (Node.REPOS) could also be complemented by a Node.GROUP for presenting repositories in a "pseudo-hierarchies".

For example, given those 3 repositories names:

  • dependencies/babel
  • dependencies/bitten
  • dependencies/genshi

We would see the following from the RepositoryIndex:

  • (GROUP) dependencies
    • (REPOS) babel
    • (REPOS) bitten
    • (REPOS) genshi

The difference between a GROUP and a DIRECTORY is that the former doesn't have any associated version control information, but the latter has.

Note that this GROUP type could provide a way to implement fast alternative display for the Mercurial or Git backends, where retrieving the latest change information for a folder can be very expensive.

comment:5 by Jun Omae, 12 years ago

#10732 was closed as duplicate.

comment:6 by anonymous, 12 years ago

Any news on this? Same err in 1.0

comment:7 by Peter Suter, 12 years ago

#10603 is related (concerned with adding proper git submodules support).

comment:8 by Ryan J Ollos, 9 years ago

#12235 was closed as a duplicate.

by moritz.vifian@…, 9 years ago

Dirty Patch to at least show the other parts of the changeset

in reply to:  6 comment:9 by moritz.vifian@…, 9 years ago

Replying to anonymous:

Any news on this? Same err in 1.0

I needed this to work for me, not to show the submodules but to at least show something other than an internal error. Therefore I added a quick fix patch.

comment:10 by s.skutnik@…, 5 years ago

Version: 0.12.11.2.2

bug still there in 1.2.2

this is very annoying. Will there be anything done about it?

comment:11 by anonymous, 5 years ago

Milestone: next-major-releasesnext-stable-1.2.x

comment:12 by Jun Omae, 5 years ago

Milestone: next-stable-1.2.xnext-major-releases
Version: 1.2.20.12.1

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The ticket will remain with no owner.
The ticket will be disowned.
as The resolution will be set. Next status will be 'closed'.
The owner will be changed from (none) to anonymous. Next status will be 'assigned'.

Add Comment


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