I created simple standalone test application which calls SVNKit directly
(without Hudson involved) and the result was the same as in Hudson. So I
reported this bug to SVNKit team and they adviced me to set "pegRevision" to
the same value as "revision" when creating SVNCopySource.
I tried it and it works.
When "pegRevision" is UNDEFINED (like in class hudson.scm.SubversionTagAction)
and "revision" is set for example to 1000 SVNKit tries to figure out what was
the name of source URL at revision 1000 assuming source URL exists in HEAD
(latest) revision and it can happen that this URL doesn't exist in HEAD
revision for example when it was renamed or deleted later.
So when tagging builds made in the past pegRevision should be set to the
particular revision in the past. At least this is my understanding now.
Could you please replace UNDEFINED revision on line 168 in
hudson.scm.SubversionTagAction with SVNRevision.create(e.getKey().revision)? Or
should I request access to hudson source repository and fix it?