diff --git a/xapian-core/backends/brass/brass_database.cc b/xapian-core/backends/brass/brass_database.cc
index ed821b5..6ad4caa 100644
a
|
b
|
BrassDatabase::set_revision_number(brass_revision_number_t new_revision)
|
409 | 409 | + changes_name + " to write"; |
410 | 410 | throw Xapian::DatabaseError(message, errno); |
411 | 411 | } |
412 | | } |
| 412 | |
| 413 | // while change sets less than N - max_changesets exist, delete them |
| 414 | int rev = old_revision - max_changesets; |
| 415 | if (rev > 0) { |
| 416 | while(io_unlink(db_dir + "/changes" + str(rev--))) ; |
| 417 | } |
| 418 | } |
413 | 419 | } |
414 | 420 | |
415 | 421 | try { |
diff --git a/xapian-core/backends/chert/chert_database.cc b/xapian-core/backends/chert/chert_database.cc
index 451ece6..91e8507 100644
a
|
b
|
ChertDatabase::set_revision_number(chert_revision_number_t new_revision)
|
405 | 405 | "/changes" + str(old_revision), |
406 | 406 | changes_name); |
407 | 407 | } |
| 408 | |
| 409 | // while change sets less than N - max_changesets exist, delete them |
| 410 | int rev = old_revision - max_changesets; |
| 411 | if (rev > 0) { |
| 412 | while(io_unlink(db_dir + "/changes" + str(rev--))) ; |
| 413 | } |
408 | 414 | } |
409 | 415 | |
410 | 416 | try { |
diff --git a/xapian-core/backends/flint/flint_database.cc b/xapian-core/backends/flint/flint_database.cc
index d2717f1..5a6099a 100644
a
|
b
|
FlintDatabase::set_revision_number(flint_revision_number_t new_revision)
|
434 | 434 | changes_fd = create_changeset_file(db_dir, |
435 | 435 | "/changes" + str(old_revision), |
436 | 436 | changes_name); |
437 | | } |
| 437 | |
| 438 | // while change sets less than N - max_changesets exist, delete them |
| 439 | int rev = old_revision - max_changesets; |
| 440 | if (rev > 0) { |
| 441 | while(io_unlink(db_dir + "/changes" + str(rev--))) ; |
| 442 | } |
| 443 | } |
438 | 444 | } |
439 | 445 | |
440 | 446 | try { |