Modify

Opened 8 years ago

Closed 7 years ago

#817 closed defect (fixed)

Problem with using "codetags" hack with perforce

Reported by: anonymous Owned by: lewisbaker
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 8 years ago by anonymous

  • Trac Release changed from 0.9 to 0.10

Fixing release.

comment:2 Changed 8 years ago by lewisbaker

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 8 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 7 years ago by lewisbaker

  • Resolution set to fixed
  • Status changed from new to closed

(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.

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.