[Bioc-devel] Bioconductor Git/GitHub Mirrors

Siddhartha Bagaria sidb at google.com
Tue Jul 14 22:34:11 CEST 2015


[cc]: bioc-devel for discussion with wider community.

Hello Jim!

This is related to using the new git mirror setup with pre-existing github
repos (not forks of the mirror).

I tried following the thread on
https://stat.ethz.ch/pipermail/bioc-devel/2015-June/007725.html but it
looks like the problem was not clearly reproduced, and a solution was not
reached. I will briefly describe the problem here but am inclined to
discuss possible solutions further in person during the upcoming conference
if you will be there.

The problem with an already existing github repo in the new setup is that
the master branch of that repo will have its own commit history, which will
be different from the svn commit history (no common ancestor). As a result,
merging the entire master branch into the newly created devel branch will
try to merge all the commits from master since the beginning. Because there
is no common ancestor, all the new edits will appear as merge-conflicts.
One can manually resolve these conflicts but the process is cumbersome and
error-prone.

One way of skipping to manually resolve all the conflicts is merging the
commits from devel into master first with strategy "ours", so that master
gets the commit logs from devel but the content in master is unchanged (to
avoid addressing conflicts). After this, a merge back into devel will work
without conflicts. However, there is a problem with both these merge
approaches.

After a resolved merge (through manual resolution of conflicts, or through
pre-merging histories), the commit histories between devel and master
branches will be in sync, but the commit history in devel will now have
extra entries from master interleaved with its previously existing entries.
This would mean that now the devel branch and the svn repo do not have a
common history. 'git svn' will get confused by these interleaved commits
and will complain "Unable to determine upstream SVN information from HEAD
history". So a merge does not work with this setup.

The easiest solution so far is to cherry-pick the new commits from master
and only merge those with the devel branch, so that svn and git continue to
share a common history up until the cherry-picks. While this works
smoothly, this is error-prone again as a commit can be missed when manually
cherry-picking.

It seems like one solution would be a one-time ability to sync the commit
history of SVN repo with the commit history of the original github repo.
This way, all three repos will have common ancestors. Other solutions which
I have not studied in depth include:
http://stackoverflow.com/questions/3864934/how-do-i-re-integrate-a-svn-and-git-repository-without-a-common-history

Let me know if you would like a reproducible example. I am happy to discuss
more.

Cheers!

Sid

	[[alternative HTML version deleted]]



More information about the Bioc-devel mailing list