public void updateCheckoutFrom(PrivateDatabase otherDb) throws IOException {
		if (!isCheckOutCopy) {
			throw new IOException("Database is not a checkout copy");
		}
		synchronized (syncObject) {

			int newVersion = currentVersion + 1;
			File otherBufFile = otherDb.bfMgr.getBufferFile(otherDb.currentVersion);
			File otherChangeFile = new File(otherDb.dbDir, CUMULATIVE_CHANGE_FILENAME);
			File otherMapFile = new File(otherDb.dbDir, CUMULATIVE_MODMAP_FILENAME);
			File newBufFile = bfMgr.getBufferFile(newVersion);
			File changeFile = new File(dbDir, CUMULATIVE_CHANGE_FILENAME);
			File mapFile = new File(dbDir, CUMULATIVE_MODMAP_FILENAME);
			File backupChangeFile = new File(dbDir, CUMULATIVE_CHANGE_FILENAME + ".bak");
			File backupMapFile = new File(dbDir, CUMULATIVE_MODMAP_FILENAME + ".bak");

			backupMapFile.delete();
			backupChangeFile.delete();

			if (!otherBufFile.exists()) {
				throw new IOException("Update file not found");
			}
			if (newBufFile.exists() || !otherBufFile.renameTo(newBufFile)) {
				throw new IOException("Concurrent database modification error (1)");
			}

			boolean success = false;
			try {
				if (mapFile.exists() && !mapFile.renameTo(backupMapFile)) {
					throw new IOException("Concurrent database modification error (2)");
				}
				if (changeFile.exists() && !changeFile.renameTo(backupChangeFile)) {
					throw new IOException("Concurrent database modification error (3)");
				}
				if (!otherMapFile.renameTo(mapFile) || !otherChangeFile.renameTo(changeFile)) {
					throw new IOException("Concurrent database modification error (4)");
				}
				currentVersion = newVersion;
				lastModified = newBufFile.lastModified();
				success = true;
			}
			finally {
				if (!success) {
					newBufFile.delete();
					mapFile.delete();
					backupMapFile.renameTo(mapFile);
					changeFile.delete();
					backupChangeFile.renameTo(changeFile);
				}
				else {
					backupChangeFile.delete();
					backupMapFile.delete();
				}
			}
		}
	}
Move the content of the otherDb into this database.
The otherDb will no longer exist if this method is successful.
If already open for update, a save should not be done or the database
may become corrupted.  All existing handles should be closed and reopened
when this method is complete.
@param otherDb the other database.
@throws IOException if an IO error occurs.  An attempt will be made to restore
this database to its original state, however the otherDb will not be repaired
and may become unusable.
Ghidra/Framework/FileSystem/src/main/java/ghidra/framework/store/db/PrivateDatabase.java