[MacPorts] #48758: Trac is not importing new Subversion revisions

MacPorts noreply at macports.org
Fri Dec 11 03:41:53 PST 2015


#48758: Trac is not importing new Subversion revisions
-----------------------------+---------------------
  Reporter:  ryandesign@…    |      Owner:  admin@…
      Type:  defect          |     Status:  closed
  Priority:  High            |  Milestone:
 Component:  server/hosting  |    Version:
Resolution:  fixed           |   Keywords:
      Port:                  |
-----------------------------+---------------------
Changes (by ryandesign@…):

 * status:  new => closed
 * resolution:   => fixed


Comment:

 Revisions are importing into Trac now and will update automatically in the
 future.

 There were multiple problems which are now fixed.

 First, the custom SELinux contexts of the Trac server were lost during an
 OS upgrade in October. I've restored the contexts of the sync'd copy of
 the svn repository on the Trac server to working order, in such a way that
 they will not be lost in the future. This allows the repository to be seen
 by Trac again (#49389) and allows its hook scripts to run again, which is
 where things get imported into Trac.

 Second, the import process was aborting with this error:

 {{{
 svnsync: post-revprop-change hook failed (exit code 2) with output:
 TypeError: %d format: a number is required, not unicode
 }}}

 There's both a post-commit hook (to import revisions after they're
 committed) and a post-revprop-change hook (to import changes to existing
 revisions, such as when someone changes a log message). Both hook scripts
 call `trac-admin` to import the relevant data. The problem is that when
 `svnsync` runs, it sets some revision properties of revision 0, before and
 after the sync, such as a lock that indicates when syncing is in progress
 and also the number of the last successfully synced revision. This causes
 the post-revprop-change hook to run, which runs `trac-admin`, telling it
 to update the data for revision 0. I think the error message we see is
 Trac's way of saying "Revision 0 doesn't exist in Trac", which is true,
 but I don't know how this ever worked before. It may be that 3 months ago,
 when this problem started, Subversion was upgraded to a newer version, and
 that older versions didn't call the post-revprop-change hook for revision
 0. Or it may be that Trac was upgraded to a newer version which has a bug
 when told to import revision 0 instead of ignore it.

 To work around this problem, I changed the post-revprop-change hook script
 to do nothing if the revision number is 0.

-- 
Ticket URL: <https://trac.macports.org/ticket/48758#comment:15>
MacPorts <https://www.macports.org/>
Ports system for OS X


More information about the macports-tickets mailing list