1. Olemis Lang
  2. trac-repositoryhooksystem

Commits

k0s  committed 3d170a2

[svn r5317] fix import of NoSuchChangeset

  • Participants
  • Parent commits 3a6041b
  • Branches repositoryhooksystemplugin

Comments (0)

Files changed (1)

File 0.11/repository_hook_system/svnhooksystem.py

View file
 from trac.config import ListOption
 from trac.core import *
 from trac.util.text import CRLF
+from trac.versioncontrol import NoSuchChangeset
 from utils import iswritable
 
 class SVNHookSystem(FileSystemHooks):
                 chgset = repo.get_changeset(revision)
             except NoSuchChangeset:
                 # XXX should probably throw an exception (same one?)
-                return # out of scope changesets are not cached
+                raise # out of scope changesets are not cached
             return chgset
         else:
             transaction = commit_id
             # get the attributes
             author = svnlook('author').strip()
             date = parse(svnlook('date').split('(')[0].strip())
+            # XXX FIXME
+#             from datetime import datetime
+#             date = datetime.now()
 
             
             message = svnlook('log').strip()
             rev = transaction
 
-            # XXX FIXME
-#             from datetime import datetime
-#             date = datetime.now()
-
             attributes = dict(author=author,
                               date=date,
                               message=message,