Get old folder?

This forum is now locked, since Gold Support is no longer offered.

Moderator: SourceGear

jobrien
Posts: 14
Joined: Wed Jun 06, 2007 3:04 pm

Get old folder?

Post by jobrien » Thu Jun 07, 2007 8:19 am

How can I get an old version of an entire project folder as of the date of a particular file?

I can get a folder if it's in the history (i.e., if there was a file added/deleted) but not as of any file change.

I can't see how I might use the history query tool to accomplish this.

The VSS client allows this, although I don't recall if SOS did.

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Post by Beth » Thu Jun 07, 2007 10:04 am

If you know the date you are looking for, then select the folder you want the information on and on the first page of the History Query, select 'View Folder History by Version'. It will have the dates that folder update was made. Since a file change affects the folder version, they should line up.

jobrien
Posts: 14
Joined: Wed Jun 06, 2007 3:04 pm

Post by jobrien » Thu Jun 07, 2007 10:19 am

Beth wrote:If you know the date you are looking for, then select the folder you want the information on and on the first page of the History Query, select 'View Folder History by Version'. It will have the dates that folder update was made. Since a file change affects the folder version, they should line up.
That didn't seem to be the case, which is why I asked. The only dates I see folder changes have "Added <some file>" or "Deleted <some file>"

This project was imported from VSS - I guess that's the issue, as I indeed can force a folder change by checking in a white-space change in Vault to a file in that folder.

So...the broader question - is there some way to work around this for my source tree? It represents several years of information and the ability to pull all files as of a date is there in VSS. It seems to me that a query that does
get the most recent version of everything in this folder on or before some date
is exactly what I need - you already supply
get ALL versions of everything in this folder on or before some date
Thanks! Jim.

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Post by Beth » Thu Jun 07, 2007 10:45 am

Can you post a screenshot of what you are seeing? If you imported your entire VSS database, then there should be more there than just Adds.

jobrien
Posts: 14
Joined: Wed Jun 06, 2007 3:04 pm

Post by jobrien » Thu Jun 07, 2007 10:51 am

Beth wrote:Can you post a screenshot of what you are seeing? If you imported your entire VSS database, then there should be more there than just Adds.
Sure...done. See that there re check-ins on 6/1/2007, but no version of the folder on that date?
Attachments
vault_history.jpg
vault_history.jpg (162.95 KiB) Viewed 16935 times

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Post by Beth » Thu Jun 07, 2007 1:09 pm

Is there any chance that file was moved? I just checked against a repository I have here that was an import from a VSS test repository and mine all line up.

Are there other files in another folder you can check on and compare? Is this consistent throughout your database?

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Post by Beth » Thu Jun 07, 2007 1:20 pm

I just looked at my history again and found that the dates of the folder version aren't in order. This was what was imported from VSS, so I'm not sure why that is. Can you check your Folder versions again for any that have the same date as that file?

jobrien
Posts: 14
Joined: Wed Jun 06, 2007 3:04 pm

Post by jobrien » Fri Jun 08, 2007 6:48 am

Beth wrote:I just looked at my history again and found that the dates of the folder version aren't in order. This was what was imported from VSS, so I'm not sure why that is. Can you check your Folder versions again for any that have the same date as that file?
I think I see a bit better how to get it now, but I'm not 100% there.

1) Right-click on the project folder in the main Vault tree, and select Show History... I get all of the changes by anyone to the folder, sorted by date descending.

2) In the History Explorer, select Query|Filter/Sort... and change to "View folder history by version" with recursive search checked, and on the Dates & Labels tab, select between 1/1/2004 and 1/31/2004. I get a "Folder versions" window with all versions of the folder in that range. I can then do a folder compare between any two versions of the folder including the current working one and (I assume) get that version of the folder tree, as I originally needed to do.

My confusion stemmed from the following:

a) The main History explorer only shows a folder when an add/delete happened; you have to go explicitly to the folder versions window to see folders changed for ANY reason.

b) I had too big a date range and the number of records was more than 1000, so the one I wanted was not retrieved.

Having said that, I noted the following:

c) BUG? The columns in the Folder Versions window are not sortable (even if you have retrieved everything), so you have to go hunting for dates.

d) BUG? If you select a folder version in the Folder Versions window for a folder with date 1/3/2004, e.g., and click on View Tree, you see the correct collection of files in a Folder Tree window, but some of the file properties shown in the list on the Folder Tree window are those of the WORKING (or some more recent?) version, not those of the file as of the folder version we are browsing (there are file dates that are outside the range selected). A quick look suggests that the ones with the out-of-range dates are those that were not explicitly changed as of that version of the folder; I would have expected the list to show the most recent version prior to the date range. Also, when I do a GET of that old version, I end up with the recent version of the file, not the old one I'd expect (so the properties in the list are at least consistent) which means I have NOT pulled a snapshot of the folder as of the expected date. Or do I have to increase the query results from 1000 rows?

Thanks in advance for any additional insight. Jim.

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Post by Beth » Fri Jun 08, 2007 9:59 am

I'll log your findings and continue to check into this. Thanks for the feedback.

GregM
Posts: 485
Joined: Sat Mar 13, 2004 9:00 am

Post by GregM » Fri Jun 08, 2007 11:26 am

The lack of sorting is intentional. You can change the sort order through the Filter/Sort menu item. If I remember correctly, the reason this is an issue is both because of the row limit, and because the list is virtual. Changing the sort in the dialog instead of in the DB query can be a really expensive operation and can even change the contents of the list.

jobrien
Posts: 14
Joined: Wed Jun 06, 2007 3:04 pm

Post by jobrien » Fri Jun 08, 2007 11:46 am

GregM wrote:The lack of sorting is intentional. You can change the sort order through the Filter/Sort menu item. If I remember correctly, the reason this is an issue is both because of the row limit, and because the list is virtual. Changing the sort in the dialog instead of in the DB query can be a really expensive operation and can even change the contents of the list.
Understood. I'm not that worried about the sort order. I just want to learn the approved/correct way
a) to search history for a file on a given date, and then b) pull that file's entire containing project as it looked on that date.

Thanks. Jim.

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Post by Beth » Fri Jun 08, 2007 12:27 pm

Check out the various tabs you have when you do a view history. You can put a date limit and there is a sort tab for setting your sort options.
Attachments
history.JPG
history.JPG (36.71 KiB) Viewed 16862 times

jobrien
Posts: 14
Joined: Wed Jun 06, 2007 3:04 pm

Post by jobrien » Fri Jun 08, 2007 12:55 pm

Beth wrote:Check out the various tabs you have when you do a view history. You can put a date limit and there is a sort tab for setting your sort options.
I see, but maybe that's not the issue. If I ask for the history of a folder I get 1000 rows. Now, if I do a filter on that for a date range, I don't get any more data, right? For example what if one file I needed was in the database rowse beyond 1000 rows?

The problem I'm seeing is that, when I pull a folder version for a date range, I get some files that have dates outside those ranges. My guess is that, when pulling a folder, if the file of the right date is not there, that Vault is giving me some later version - perhaps the working version.

Maybe I'll just try increasing the 1000 limit and see what happens.

jobrien
Posts: 14
Joined: Wed Jun 06, 2007 3:04 pm

Post by jobrien » Fri Jun 08, 2007 1:13 pm

Just a follow-up. I changed the rows to 2000.

I picked a folder, did Show History, chose "by folder version" , the date range 2/1/2003 to 2/28/2003 and sort by date, to get the attached view.

I'm struggling with why the folder versions jump around as they do in the list when sorted by date.

So, let me ask more explicitly, can I please have the steps to GET a folder and its contents as it existed on a particular date?

Thanks in advance! Jim.
Attachments
vault_history_1.jpg
vault_history_1.jpg (76.77 KiB) Viewed 16856 times

GregM
Posts: 485
Joined: Sat Mar 13, 2004 9:00 am

Post by GregM » Fri Jun 08, 2007 2:12 pm

This has been discussed before as an issue with how the VSS import works:

http://support.sourcegear.com/viewtopic.php?t=1135

Locked