@@ -616,8 +616,10 @@ public VCSTag createTag(String branchName, String tagName, String tagMessage, St
616616 false , false , true , tagMessage , null );
617617
618618 SVNDirEntry entry = repository .info (TAGS_PATH + tagName , -1 );
619+
620+ SVNLogEntry copyFromEntry = revToSVNEntry (getBranchName (branchName ), Long .parseLong (revisionToTag ));
619621
620- VCSTag tag = new VCSTag (tagName , tagMessage , entry .getAuthor (), getHeadCommit ( branchName ));
622+ VCSTag tag = new VCSTag (tagName , tagMessage , entry .getAuthor (), svnLogEntryToVCSCommit ( copyFromEntry ));
621623 return tag ;
622624 } catch (SVNException e ) {
623625 if (e .getErrorMessage ().getErrorCode ().getCode () == SVN_ITEM_EXISTS_ERROR_CODE ) {
@@ -755,4 +757,25 @@ public Boolean isRevisionTagged(String revision) {
755757 throw new RuntimeException (e );
756758 }
757759 }
760+
761+ @ Override
762+ public VCSTag getTagByName (String tagName ) {
763+ try {
764+ SVNLogEntry entry = revToSVNEntry (TAGS_PATH + tagName , -1L );
765+
766+ Long copyFromRevision = -1L ;
767+ for (String s : entry .getChangedPaths ().keySet ()) {
768+ SVNLogEntryPath entryPath = entry .getChangedPaths ().get (s );
769+ copyFromRevision = entryPath .getCopyRevision ();
770+ }
771+
772+ SVNLogEntry copyFromEntry = revToSVNEntry ("" , copyFromRevision );
773+
774+ return new VCSTag (tagName , entry .getMessage (), entry .getAuthor (), svnLogEntryToVCSCommit (copyFromEntry ));
775+ } catch (SVNException e ) {
776+ throw new EVCSException (e );
777+ } catch (Exception e ) {
778+ throw new RuntimeException (e );
779+ }
780+ }
758781}
0 commit comments