Using Web Diff Urls

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

Moderator: SourceGear

Post Reply
honman
Posts: 1
Joined: Thu Sep 10, 2009 4:58 pm

Using Web Diff Urls

Post by honman » Thu Sep 10, 2009 8:45 pm

Hi,

We currently have a home built web based code review tool that manages a fairly complex workflow. We integrate into Vault via the API which is called through an ASP.Net webapp. This webapp can produce a review page containing a diff of the two versions under review. Obviously the diff is a reasonably part of the app and we'd prefer not be doing this web based diff ourselves. So my eyes lit up when I saw the new Web Diff in Vault. However, when I looked closely at the URLs it uses I saw "Object". For example:-

http://myserver/VaultService/VaultWeb/V ... aseline=29

At review time our code review system has the Vault server name, the repository name, the folders, the file name and the versions. But I can see no way to easily obtain this Object value. Is there a way to call up a web diff without knowing this? It seems the paths etc should be enough information to generate a diff. If there is no way around needing the Object value is there any easily via the web interface? Or as a worst case via the API?

Thanks,

Adam

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

Re: Using Web Diff Urls

Post by jeremy_sg » Fri Sep 11, 2009 8:18 am

Unfortunately, you will need the API for this. You will need to get the Repository ID (which is the number prepended to the file's path) and the ObjID. You can get the repository id from ServerOperations.client.ClientInstance.ActiveRepositoryID

For Objid, you'll need to get a VaultClientTreeObject from RepositoryUtil.FindVaultTreeObjectAtReposOrLocalPath

Let me know if you need more help.
Subscribe to the Fortress/Vault blog

Post Reply