Fix REQ_CS rev boundary check

fixes #2096
This commit is contained in:
Marcel Klehr 2014-03-20 21:34:01 +01:00
parent ba38bc998e
commit f6f319960d

View file

@ -1372,7 +1372,7 @@ function getChangesetInfo(padId, startNum, endNum, granularity, callback)
while (compositeStart < endNum) while (compositeStart < endNum)
{ {
var compositeEnd = compositeStart + granularity; var compositeEnd = compositeStart + granularity;
if (compositeEnd > endNum || compositeEnd > head_revision) if (compositeEnd > endNum || compositeEnd > head_revision+1)
{ {
break; break;
} }
@ -1500,8 +1500,8 @@ function composePadChangesets(padId, startNum, endNum, callback)
var changesetsNeeded=[]; var changesetsNeeded=[];
var headNum = pad.getHeadRevisionNumber(); var headNum = pad.getHeadRevisionNumber();
if (endNum > headNum) if (endNum > headNum+1)
endNum = headNum; endNum = headNum+1;
if (startNum < 0) if (startNum < 0)
startNum = 0; startNum = 0;
//create a array for all changesets, we will //create a array for all changesets, we will