Mercurial > jhg
comparison src/org/tmatesoft/hg/core/HgChangesetHandler.java @ 514:5dcb4581c8ef
Report renames when following file history tree with HgFileRenameHandlerMixin
| author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
|---|---|
| date | Mon, 17 Dec 2012 19:06:07 +0100 |
| parents | 31a89587eb04 |
| children | 6526d8adbc0f |
comparison
equal
deleted
inserted
replaced
| 513:a41d955dc360 | 514:5dcb4581c8ef |
|---|---|
| 15 * contact TMate Software at support@hg4j.com | 15 * contact TMate Software at support@hg4j.com |
| 16 */ | 16 */ |
| 17 package org.tmatesoft.hg.core; | 17 package org.tmatesoft.hg.core; |
| 18 | 18 |
| 19 import org.tmatesoft.hg.internal.Callback; | 19 import org.tmatesoft.hg.internal.Callback; |
| 20 import org.tmatesoft.hg.util.Adaptable; | |
| 20 import org.tmatesoft.hg.util.Path; | 21 import org.tmatesoft.hg.util.Path; |
| 21 | 22 |
| 22 /** | 23 /** |
| 23 * Callback to process {@link HgChangeset changesets}. | 24 * Callback to process {@link HgChangeset changesets}. |
| 24 * | 25 * |
| 35 void cset(HgChangeset changeset) throws HgCallbackTargetException; | 36 void cset(HgChangeset changeset) throws HgCallbackTargetException; |
| 36 | 37 |
| 37 | 38 |
| 38 /** | 39 /** |
| 39 * When {@link HgLogCommand} is executed against file, handler passed to {@link HgLogCommand#execute(HgChangesetHandler)} may optionally | 40 * When {@link HgLogCommand} is executed against file, handler passed to {@link HgLogCommand#execute(HgChangesetHandler)} may optionally |
| 40 * implement this interface to get information about file renames. Method {@link #copy(HgFileRevision, HgFileRevision)} would | 41 * implement this interface (or make it available through {@link Adaptable#getAdapter(Class)} to get information about file renames. |
| 41 * get invoked prior any changeset of the original file (if file history being followed) is reported via {@link #cset(HgChangeset)}. | 42 * Method {@link #copy(HgFileRevision, HgFileRevision)} would get invoked prior any changeset of the original file |
| 43 * (if file history being followed) is reported via {@link #cset(HgChangeset)}. | |
| 42 * | 44 * |
| 43 * For {@link HgLogCommand#file(Path, boolean)} with renamed file path and follow argument set to false, | 45 * For {@link HgLogCommand#file(Path, boolean)} with renamed file path and follow argument set to false, |
| 44 * {@link #copy(HgFileRevision, HgFileRevision)} would be invoked for the first copy/rename in the history of the file, but not | 46 * {@link #copy(HgFileRevision, HgFileRevision)} would be invoked for the first copy/rename in the history of the file, but not |
| 45 * followed by any changesets. | 47 * followed by any changesets. |
| 48 * | |
| 49 * @see HgFileRenameHandlerMixin | |
| 46 */ | 50 */ |
| 47 @Callback | 51 @Callback |
| 48 public interface WithCopyHistory extends HgChangesetHandler { | 52 public interface WithCopyHistory extends HgChangesetHandler, HgFileRenameHandlerMixin { |
| 49 // XXX perhaps, should distinguish copy from rename? And what about merged revisions and following them? | |
| 50 | |
| 51 /** | |
| 52 * @throws HgCallbackTargetException wrapper object for any exception user code may produce | |
| 53 */ | |
| 54 void copy(HgFileRevision from, HgFileRevision to) throws HgCallbackTargetException; | |
| 55 } | 53 } |
| 56 } | 54 } |
