Get repositoryid from command line?

If you are having a problem using Vault, post a message here.

Moderator: SourceGear

Post Reply
JPrime
Posts: 18
Joined: Tue Dec 21, 2004 10:03 pm

Get repositoryid from command line?

Post by JPrime » Wed Jun 29, 2005 11:02 am

I'm trying to create a link to the web viewer for a particular item, and I see that the querystring takes the format ?File=<repositoryid><path/to/file> (or something close to that).

My problem is, it doesn't appear that the LISTREPOSITORIES command from the command line client returns the repository id. Is there a command I can use to get it? We're using 3.0.7.

jeremy_sg
Posts: 1821
Joined: Thu Dec 18, 2003 11:39 am
Location: Sourcegear
Contact:

Post by jeremy_sg » Wed Jun 29, 2005 12:44 pm

There's no preexisting way that I can think of to do what you need. You should be able to quickly modify the FindRepository method in the VaultClientTemplate example to print out r.RepID, which is the ID that you need.

http://weblogs.asp.net/jeremy_sheeley/a ... 02/18.aspx

JPrime
Posts: 18
Joined: Tue Dec 21, 2004 10:03 pm

Post by JPrime » Wed Jun 29, 2005 1:37 pm

Bummer...using the API isn't really an option for what we're implementing. Thanks anyway.

jeremy_sg
Posts: 1821
Joined: Thu Dec 18, 2003 11:39 am
Location: Sourcegear
Contact:

Post by jeremy_sg » Wed Jun 29, 2005 1:40 pm

You could write the API app to take in a repository name and print out a repositoryID, just like you wanted from the Command Line Client.

Post Reply