Kiln History API call - Kiln Knowledge Exchange most recent 30 from http://kiln.stackexchange.com 2013-05-21T18:32:53Z http://kiln.stackexchange.com/feeds/question/4030 http://www.creativecommons.org/licenses/by-nc/2.5/rdf http://kiln.stackexchange.com/questions/4030/kiln-history-api-call Kiln History API call jeff 2011-08-02T13:54:30Z 2011-08-02T15:43:27Z <p>I’m writing a webhook which pulls all of a repository’s changesets and reconstructs the files in a different location (it’s not source code in the repository, it’s text files with SQL queries). I envision reaching the 100 changeset limit on the “Api/{version}/Repo/{ixRepo}/History” api call, so I tried the “revOldest” parameter. It looks like when using the revOldest parameter, it pulls that changeset plus newer ones (up to the nChangesetLimit parameter). So if the API pulls changesets NEWER than the one specified, it makes sense that you need to know the rev of the FIRST changeset in order to pull all of the changesets.</p> <p>Is there a way to figure out what the FIRST changeset id of a repo is? Or is there some other way of pulling all the changesets for a repo (if there are more than 100)?</p> http://kiln.stackexchange.com/questions/4030/kiln-history-api-call/4032#4032 Answer by Anton Moiseev for Kiln History API call Anton Moiseev 2011-08-02T15:27:18Z 2011-08-02T15:27:18Z <ol> <li><p>You can use integer <a href="http://mercurial.selenic.com/wiki/RevisionNumber" rel="nofollow">revision numbers</a> for <code>revOldest</code>. So, to get first changeset of a repository you need to specify <code>0</code> as <code>revOldest</code>.</p></li> <li><p>There is no way to get all the changesets of a repository in one step (if repository contains more than 100 changesets), you need to iterate through <code>Api/{version}/Repo/{ixRepo}/History</code> to get all history. I've implemented it <a href="https://moiseev.kilnhg.com/Repo/Kiln-NET/Group/devel/File/src/Kiln.Net/Kiln.Calls.cs?rev=tip#360-382" rel="nofollow">here</a> for Kiln.NET.</p></li> </ol> <p>Related question: <a href="http://kiln.stackexchange.com/questions/3409/how-do-you-get-all-list-of-all-changesets-in-a-repository" rel="nofollow">How do you get all list of all changesets in a repository?</a></p>