tikhomirov@514: /* tikhomirov@628: * Copyright (c) 2012-2013 TMate Software Ltd tikhomirov@514: * tikhomirov@514: * This program is free software; you can redistribute it and/or modify tikhomirov@514: * it under the terms of the GNU General Public License as published by tikhomirov@514: * the Free Software Foundation; version 2 of the License. tikhomirov@514: * tikhomirov@514: * This program is distributed in the hope that it will be useful, tikhomirov@514: * but WITHOUT ANY WARRANTY; without even the implied warranty of tikhomirov@514: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the tikhomirov@514: * GNU General Public License for more details. tikhomirov@514: * tikhomirov@514: * For information on how to redistribute this software under tikhomirov@514: * the terms of a license other than GNU General Public License tikhomirov@514: * contact TMate Software at support@hg4j.com tikhomirov@514: */ tikhomirov@514: package org.tmatesoft.hg.core; tikhomirov@514: tikhomirov@628: import org.tmatesoft.hg.repo.HgRuntimeException; tikhomirov@514: import org.tmatesoft.hg.util.Adaptable; tikhomirov@514: tikhomirov@514: /** tikhomirov@514: * Addition to file history handlers (like {@link HgChangesetHandler} and {@link HgChangesetTreeHandler}) tikhomirov@514: * to receive notification about rename in the history of the file being walked. tikhomirov@514: * tikhomirov@514: * This mix-in shall be available from the host handler through the {@link Adaptable} mechanism, see tikhomirov@514: * {@link Adaptable.Factory#getAdapter(Object, Class, Object)}. Hence, implementing tikhomirov@514: * this interface in addition to host's would be the easiest way to achieve that. tikhomirov@514: * tikhomirov@514: * @author Artem Tikhomirov tikhomirov@514: * @author TMate Software Ltd. tikhomirov@514: */ tikhomirov@514: public interface HgFileRenameHandlerMixin { tikhomirov@514: // XXX perhaps, should distinguish copy from rename? And what about merged revisions and following them? tikhomirov@514: tikhomirov@514: /** tikhomirov@514: * @throws HgCallbackTargetException wrapper object for any exception user code may produce tikhomirov@628: * @throws HgRuntimeException propagates library issues. Runtime exception tikhomirov@514: */ tikhomirov@628: void copy(HgFileRevision from, HgFileRevision to) throws HgCallbackTargetException, HgRuntimeException; tikhomirov@514: }