package com.redhat.jenkins.plugins.buildrequester.scm;

import org.tmatesoft.svn.core.SVNException;
import org.tmatesoft.svn.core.wc.SVNClientManager;
import org.tmatesoft.svn.core.wc.SVNStatus;

import java.io.File;
import java.util.ArrayList;
import java.util.List;

/**
 * @author vdedik@redhat.com
 */
public class SubversionRepository implements Repository {
    private SVNStatus status;

    public SubversionRepository(File repoDir) {
        try {
            status = SVNClientManager.newInstance().getStatusClient().doStatus(repoDir, false);
        } catch (SVNException e) {
            status = null;
        }
    }

    @Override
    public String getUrl() {
        if (status == null) {
            return "";
        }

        return status.getURL().toString();
    }

    @Override
    public String getHeadCommitId() {
        return String.valueOf(status.getRevision().getNumber());
    }

    @Override
    public List<String> getTagsByCommitId(String commitId) {
        return new ArrayList<String>();
    }
}

@@ -898,32 +898,159 @@
 mber());%0A    %7D%0A%0A
+    /**%0A     * There is no easy way to get the list of tags from a subversion repository, so return empty list for now%0A     */%0A
     @Override%0A  

Add comment to SubversionRepository#getTagsByCommitId