}
}
else {
// limit, try to get the the 'limit' newest versions
SortedRangeSet union = localRange.union(remoteRange);
RangeIterator iterator = union.reverseIterator();
while (iterator.hasNext() && limit > 0) {
long version = iterator.next();
if (!localRange.contains(version)) {
replicateVersion(master, customer, name, repository, version);
}