[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jgit-dev] Exception during merge

Dear List,

I wrote a method that merges the changes from a fork to its parent. It works in most of the cases. However, my last merge caused an exception.
java.io.IOException: Multiple merge bases for:
  b6b53e47a19f4cecb95ed36579eb316640ac33f7
  b457ad70f5cf3428f21b376157a114c5be89c7f1 found:
  4c940d4f9691755be828cc63cd72dfdd3c4ecb92
  a9fda23e1c046464291f3922e9eb3c92bcdc89ee
at org.eclipse.jgit.merge.Merger.getBaseCommit(Merger.java:214)
at org.eclipse.jgit.merge.Merger.mergeBase(Merger.java:179)
at org.eclipse.jgit.merge.ThreeWayMerger.mergeBase(ThreeWayMerger.java:146)
at org.eclipse.jgit.merge.ResolveMerger.mergeImpl(ResolveMerger.java:186)
at org.eclipse.jgit.merge.Merger.merge(Merger.java:156)
at org.eclipse.jgit.merge.ThreeWayMerger.merge(ThreeWayMerger.java:133)
at org.eclipse.jgit.merge.ThreeWayMerger.merge(ThreeWayMerger.java:126)


 I found a discussion about the so called criss-cross merges: http://groups.google.com/group/repo-discuss/browse_thread/thread/e1dcedb5436c17ea It turned out, that in the failing case I also tried to make a criss-cross merge (pull from parent to fork; some chages to fork; merge back fork to parent). As Shawn wrote in the discussion JGit doesn't support executing these kind of merges. But this was two years ago, so I'd like to aks you if this problem were fixed? If not, do you know about any workaround? We'd like to support a workflow that can lead to many criss-cross merges. Is there a way to merge them using JGit? (for example creating the merge base by merging the multiple bases, or using an oother MErger implementation)

Thanks in advance,
Ákos Tajti