Modify

Opened 18 years ago

Closed 18 years ago

#817 closed defect (fixed)

Problem with using "codetags" hack with perforce

Reported by: anonymous Owned by: Lewis Baker
Priority: normal Component: PerforcePlugin
Severity: normal Keywords:
Cc: Trac Release: 0.10

Description

When trying to use codetags with perforce, I get the following traceback:

Traceback (most recent call last):
  File "/opt/python/current/lib/python2.4/site-packages/trac/web/main.py", line 356, in dispatch_request
    dispatcher.dispatch(req)
  File "/opt/python/current/lib/python2.4/site-packages/trac/web/main.py", line 224, in dispatch
    resp = chosen_handler.process_request(req)
  File "build/bdist.linux-i686/egg/codetags/__init__.py", line 38, in process_request
  File "build/bdist.linux-i686/egg/codetags/indexer.py", line 152, in get_taglist
  File "build/bdist.linux-i686/egg/codetags/indexer.py", line 131, in get_new_tags
  File "build/bdist.linux-i686/egg/codetags/indexer.py", line 99, in get_changed_files
  File "build/bdist.linux-i686/egg/codetags/indexer.py", line 51, in do_walk
  File "build/bdist.linux-i686/egg/p4trac/api.py", line 719, in get_entries
  File "build/bdist.linux-i686/egg/p4trac/repos.py", line 801, in _get_subDirectories
  File "build/bdist.linux-i686/egg/p4trac/repos.py", line 1200, in _getDirInfo

It seems that there is a problem with the fact that "" does not have any revisions.

I'm not sure what should be done about it.

Attachments (0)

Change History (4)

comment:1 Changed 18 years ago by anonymous

Trac Release: 0.90.10

Fixing release.

comment:2 Changed 18 years ago by Lewis Baker

See how this patch works for you:

@@ -512,14 +512,14 @@
   def _get_isDirectory(self):
       """Boolean flag indicating whether the L{Node} is a directory.
 
       @type: C{boolean}
       """
 
-      # The root path is always a directory
-      if self._nodePath.isRoot:
-          return True
-
       # Use the latest revision if no revision specified
       if self._nodePath.rev is None:
           latestChange = self._repo.getLatestChange()
           self._nodePath = NodePath(self._nodePath.path, latestChange)
+
+      # The root path is always a directory
+      if self._nodePath.isRoot:
+          return True

comment:3 Changed 18 years ago by anonymous

It seems to be getting further than it did before! It's taking a lot time so I don't know if it was completely successful, but it didn't fail in the same place.

comment:4 Changed 18 years ago by Lewis Baker

Resolution: fixed
Status: newclosed

(In [2226]) Fixed an assertion error that occured when querying the subDirectories of the root directory node with None as the revision specifier. Fixes #817.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Lewis Baker.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.