Getting tag names

View: New views
2 Messages — Rating Filter:   Alert me  

Getting tag names

by marathiboy :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

I need to tag a directory. However my tag name depends on how many tags are present (of some pattern). So I need to get all tags, match the pattern etc. The problem is, getting all the tags is an expensive operation, as tags contain large binary files. Also there can be 100s tags and checking out all tags is taking forever.

Is there a way to just get tag names (folder names under tags folder) with out actually folder contents?

Thanks

Shailesh

Re: Getting tag names

by Alexander Kitaev-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

> Is there a way to just get tag names (folder names under tags folder) with
> out actually folder contents?
Yes, it is very simple task.
For instance, getting tags of SVNKit using SVNLogClient:

DAVRepositoryFactory.setup();
SVNLogClient logClient = SVNClientManager.newInstance().getLogClient();


SVNURL url =
   SVNURL.parseURIEncoded("http://svn.svnkit.com/repos/svnkit/tags");

logClient.doList(url, SVNRevision.HEAD, SVNRevision.HEAD,
                 false,
                 SVNDepth.IMMEDIATES,
                 SVNDirEntry.DIRENT_ALL,
 new ISVNDirEntryHandler() {
  public void handleDirEntry(SVNDirEntry dirEntry) throws SVNException {
         System.out.println("tag: " +
                             dirEntry.dirEntry.getRelativePath());
  }
});

SVNDirEntry for the directory at url also reported to the handler with
empty string as relative path.

Alexander Kitaev,
TMate Software,
http://svnkit.com/ - Java [Sub]Versioning Library!
http://sqljet.com/ - Java SQLite Library!

marathiboy wrote:

> Hello,
>
> I need to tag a directory. However my tag name depends on how many tags are
> present (of some pattern). So I need to get all tags, match the pattern etc.
> The problem is, getting all the tags is an expensive operation, as tags
> contain large binary files. Also there can be 100s tags and checking out all
> tags is taking forever.
>
> Is there a way to just get tag names (folder names under tags folder) with
> out actually folder contents?
>
> Thanks
>
> Shailesh

---------------------------------------------------------------------
To unsubscribe, e-mail: svnkit-users-unsubscribe@...
For additional commands, e-mail: svnkit-users-help@...