Add :replace option and related pb/revision routines.