ProcessCommandHistory datesort option doesnt work right

Post your questions regarding using the Vault and Fortress API in your programs.

Moderator: SourceGear

Post Reply
itsckl
Posts: 7
Joined: Thu Feb 04, 2010 5:25 am

ProcessCommandHistory datesort option doesnt work right

Post by itsckl » Tue Apr 06, 2010 10:42 am

I am trying to retrieve a recursive history from a project that I have imported from VSS (not using hand-off but the vault port tool). I am using this call:

h = ServerOperations.ProcessCommandHistory(objectPath, recursive, DateSortOption.desc, null, null, null, null, beginLabel, endLabel, -1, -1, 10000);

What I get is the history, but it is not sorted by date (as suggested by the 3rd argument). When I mimic the same with the vault GUI client, the result is not sorted either. So I thought I could sort it myself using one of the properties of VaultHistoryItem. Unfortunately, there is no useful value available. The TxDate member is set correct, however, it is probably not what I am looking for. The LabelDate member is always July first, 1850. So it is probably not useful either.

Any suggestion how to get at a sorted history?

Thanks, Christoph

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

Re: ProcessCommandHistory datesort option doesnt work right

Post by jeremy_sg » Tue Apr 06, 2010 12:49 pm

What you're seeing is a limitation of our VSS import. The import must do the transactions out of order, since VSS has no concept of a "folder version". The history from VSS will always be out of order when viewed in Vault, but every checkin will have the correct date. Future commits in Vault will be ordered correctly. This limitation only applies to imported VSS data.

If you want to sort the history manually, the TxDate is the field to sort by.
Subscribe to the Fortress/Vault blog

itsckl
Posts: 7
Joined: Thu Feb 04, 2010 5:25 am

Re: ProcessCommandHistory datesort option doesnt work right

Post by itsckl » Wed Apr 07, 2010 7:30 am

thanks for the great support btw

:-) Christoph

Post Reply