/** * Constructs a NotesMergeConflictException for the specified base, ours and * theirs versions of the root note tree. * * @param base * version of the root note tree * @param ours * version of the root note tree * @param theirs * version of the root note tree */ public NotesMergeConflictException(NonNoteEntry base, NonNoteEntry ours, NonNoteEntry theirs) { super(MessageFormat.format( JGitText.get().mergeConflictOnNonNoteEntries, name(base), name(ours), name(theirs))); }
/** * Construct a NotesMergeConflictException for the specified base, ours and * theirs note versions. * * @param base * note version * @param ours * note version * @param theirs * note version */ public NotesMergeConflictException(Note base, Note ours, Note theirs) { super(MessageFormat.format(JGitText.get().mergeConflictOnNotes, noteOn(base, ours, theirs), noteData(base), noteData(ours), noteData(theirs))); }
private NonNoteEntry mergeNonNotes(NonNoteEntry baseList, NonNoteEntry oursList, NonNoteEntry theirsList) throws IOException { if (baseList == null && oursList == null && theirsList == null) return null; ObjectId baseId = write(baseList); ObjectId oursId = write(oursList); ObjectId theirsId = write(theirsList); inserter.flush(); Merger m = nonNotesMergeStrategy.newMerger(db, true); if (m instanceof ThreeWayMerger) ((ThreeWayMerger) m).setBase(baseId); if (!m.merge(oursId, theirsId)) throw new NotesMergeConflictException(baseList, oursList, theirsList); ObjectId resultTreeId = m.getResultTreeId(); AbbreviatedObjectId none = AbbreviatedObjectId.fromString(""); //$NON-NLS-1$ return NoteParser.parse(none, resultTreeId, reader).nonNotes; }
private NonNoteEntry mergeNonNotes(NonNoteEntry baseList, NonNoteEntry oursList, NonNoteEntry theirsList) throws IOException { if (baseList == null && oursList == null && theirsList == null) return null; ObjectId baseId = write(baseList); ObjectId oursId = write(oursList); ObjectId theirsId = write(theirsList); inserter.flush(); Merger m = nonNotesMergeStrategy.newMerger(db, true); if (m instanceof ThreeWayMerger) ((ThreeWayMerger) m).setBase(baseId); if (!m.merge(oursId, theirsId)) throw new NotesMergeConflictException(baseList, oursList, theirsList); ObjectId resultTreeId = m.getResultTreeId(); AbbreviatedObjectId none = AbbreviatedObjectId.fromString(""); //$NON-NLS-1$ return NoteParser.parse(none, resultTreeId, reader).nonNotes; }
/** * Construct a NotesMergeConflictException for the specified base, ours and * theirs note versions. * * @param base * note version * @param ours * note version * @param theirs * note version */ public NotesMergeConflictException(Note base, Note ours, Note theirs) { super(MessageFormat.format(JGitText.get().mergeConflictOnNotes, noteOn(base, ours, theirs), noteData(base), noteData(ours), noteData(theirs))); }
/** * Constructs a NotesMergeConflictException for the specified base, ours and * theirs versions of the root note tree. * * @param base * version of the root note tree * @param ours * version of the root note tree * @param theirs * version of the root note tree */ public NotesMergeConflictException(NonNoteEntry base, NonNoteEntry ours, NonNoteEntry theirs) { super(MessageFormat.format( JGitText.get().mergeConflictOnNonNoteEntries, name(base), name(ours), name(theirs))); }
private NonNoteEntry mergeNonNotes(NonNoteEntry baseList, NonNoteEntry oursList, NonNoteEntry theirsList) throws IOException { if (baseList == null && oursList == null && theirsList == null) return null; ObjectId baseId = write(baseList); ObjectId oursId = write(oursList); ObjectId theirsId = write(theirsList); inserter.flush(); Merger m = nonNotesMergeStrategy.newMerger(db, true); if (m instanceof ThreeWayMerger) ((ThreeWayMerger) m).setBase(baseId); if (!m.merge(oursId, theirsId)) throw new NotesMergeConflictException(baseList, oursList, theirsList); ObjectId resultTreeId = m.getResultTreeId(); AbbreviatedObjectId none = AbbreviatedObjectId.fromString(""); //$NON-NLS-1$ return NoteParser.parse(none, resultTreeId, reader).nonNotes; }
/** * Construct a NotesMergeConflictException for the specified base, ours and * theirs note versions. * * @param base * note version * @param ours * note version * @param theirs * note version */ public NotesMergeConflictException(Note base, Note ours, Note theirs) { super(MessageFormat.format(JGitText.get().mergeConflictOnNotes, noteOn(base, ours, theirs), noteData(base), noteData(ours), noteData(theirs))); }
/** * Constructs a NotesMergeConflictException for the specified base, ours and * theirs versions of the root note tree. * * @param base * version of the root note tree * @param ours * version of the root note tree * @param theirs * version of the root note tree */ public NotesMergeConflictException(NonNoteEntry base, NonNoteEntry ours, NonNoteEntry theirs) { super(MessageFormat.format( JGitText.get().mergeConflictOnNonNoteEntries, name(base), name(ours), name(theirs))); }