Mercurial > jhg
diff src/org/tmatesoft/hg/core/HgMergeCommand.java @ 708:4ffc17c0b534
Merge: tests for resolver and complex scenario. Enable commit for merged revisions. Reuse file revisions if nothing changed
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Tue, 20 Aug 2013 18:41:34 +0200 |
parents | 42b88709e41d |
children |
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/core/HgMergeCommand.java Fri Aug 16 19:22:59 2013 +0200 +++ b/src/org/tmatesoft/hg/core/HgMergeCommand.java Tue Aug 20 18:41:34 2013 +0200 @@ -279,12 +279,11 @@ } /** - * Base mediator implementation, with regular resolution. - * Subclasses shall implement {@link #resolve(HgFileRevision, HgFileRevision, HgFileRevision, Resolver)} and - * may optionally provide extra logic (e.g. ask user) for other cases. + * Base mediator implementation, with regular resolution (and "don't delete anything" approach in mind). + * Subclasses shall override methods to provide alternative implementation or to add extra logic (e.g. ask user). */ @Experimental(reason="Provisional API. Work in progress") - public abstract static class MediatorBase implements Mediator { + public static class MediatorBase implements Mediator { /** * Implementation keeps this revision */ @@ -329,6 +328,13 @@ public void fastForwardB(HgFileRevision base, HgFileRevision second, Resolver resolver) throws HgCallbackTargetException { resolver.use(second); } + + /** + * Implementation marks file as unresolved + */ + public void resolve(HgFileRevision base, HgFileRevision first, HgFileRevision second, Resolver resolver) throws HgCallbackTargetException { + resolver.unresolved(); + } } private static class ResolverImpl implements Resolver {