You can fetch the "version-set" property on the resource to get the list of versions (VHRs or version history records) but the set is not always ordered from earliest to latest, etc. You may need to sort it to ensure the right order and so be able to choose what the previous version to the current.
In my case my application has a "doc version" object that I keep to represent each version so when a new version is created I fetch the "checked-in" property to get the VHR of my latest version then store the VHR in the doc version object. The VHR is the path to the history object for that version. When I roll back a version I delete the latest doc version in my application and fetch the previous and then update the version of the doc to be the previous VHR stored in that doc version object. So for WebDAV the UPDATE method changes the "working" version of a file kept under /files to reference the VHR that you choose. Eg. result = content.updateMethod("/slide/files/A", "http://machine/slide/history/1/A_1.3"); The <vhr> above needs to be a full URL (I think). At least that's the way that I'm using it right now and it works. But if the <vhr> you choose isn't the latest on the branch then the file effectively becomes read-only unless you enable version forking. If you enable version forking then the next time you checkout/in the file you will gate version 1.3.1 -- for the above example where A was at v1.3. Warwick > -----Original Message----- > From: haipeng du [mailto:[EMAIL PROTECTED] > Sent: Thursday, December 16, 2004 12:17 PM > To: [EMAIL PROTECTED] > Subject: how to recover file > > > How could I replace the file by using its old version? For > example, my current version is 2.1, and I want to replace it > with 2.0. After I delete the file from slide, how could I > recover that from history? Are there some API in web resouce > class that I can use to do that? Thanks a lot. > > > -- > Haipeng Du > Software Engineer > Comphealth, > Salt Lake City > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]