[Bioc-devel] Git-SVN bridge: Alternative to get commit history?

Henrik Bengtsson hb at biostat.ucsf.edu
Tue Sep 23 00:58:39 CEST 2014


On Sun, Sep 21, 2014 at 1:35 PM, Dan Tenenbaum <dtenenba at fhcrc.org> wrote:
>
>
> On September 21, 2014 1:07:29 PM PDT, Henrik Bengtsson <hb at biostat.ucsf.edu> wrote:
>>A few questions about the Bioconductor Git-SVN bridge:
>>
>>Q1. Is it safe to add, delete, add, delete, add, ... a bridge over and
>>over for the same package and GitHub repository?  Not that I want to
>>do it, but I wonder if I had to, will I break something?
>
> I don't know why you'd want to. It will add a lot of cruft to the commit logs but should be safe.

Thanks for the confirmation; not that I planned to, but I guess below
I just did so with a fresh GitHub repository.  I also wanted to make
sure that if I tried I didn't end up having to get back asking for you
guys to do fixes by hand.

>
>>Q2. Can you change the "SVN / Git wins unconditionally" setting for an
>>existing bridge, or do you just delete it and the recreate it?
>
> That setting only applies to resolving conflicts during the initial bridge creation.

My bad: The https://gitsvn.bioconductor.org/newproject page does say
"How do you want to handle resolving conflicts _when_ creating the
bridge?".

While at the page https://gitsvn.bioconductor.org/newproject:  there
one is asked to enter "Your email address:".   It's not clear what
this address is for.  Will this be the email address reported in the
Git commits?  I entered one of my registered GitHub addresses, and
this far so good.


>
>
>>Q3. Commit history: In the past I've migrated other Subversion
>>repositories of mine to Git using 'git svn ...' (actually
>>https://github.com/nirvdrum/svn2git). This was not too complicated
>>since my Subversion repos were well behaving (e.g. had no branches).
>>This allowed me to keep the complete commit history.  I can do the
>>same to pull down the complete Bioc Subversion package history to a
>>Git repository.
>>(a) My question is now, could I put this on GitHub containing the
>>complete history and start off with this one when I setup the Bioc
>>Git-SVN bridge?
>
> No.  See the first FAQ at
> http://www.bioconductor.org/developers/how-to/git-svn/

That FAQ says:

"Can I see old commit history?

After creating a bridge, you can't see old svn commit information from
prior to bridge creation if you're using git. (You can still see it
with svn).

Conversely, in svn, you can't see Git commit messages from before the
bridge was created. You can still see them in git.

Once the bridge is created, you'll see subsequent commit messages from
both git and svn, whether you are using git or svn.

This may change in the future."

My would be that second answer, "You can still see them in git", would
be covered by my (a) approach above, but I wanted to make so I
wouldn't mess with anything.   Contrary from your "No", from this FAQ
it sounds as if it works.  ...and since I'm stubborn, I gave it a try
now knowing that I won't mess things up trying to setup different
combinations of bridges (i.e. dropping and adding a new one).  So...

SUCCESS:
I pulled down the SVN history of aroma.light into a local Git
repository, which I then pushed to a GitHub repository that I then
bridged to Bioconductor (using "svn wins" to avoid any havoc on the
Bioc SVN repository).  I have verified that the bridge works in both
directions.  More importantly, the Git repository hold the complete
history, cf.

https://github.com/HenrikBengtsson/aroma.light/commits/master

and so does the Bioconductor SVN, e.g.

[HB-X201]{hb}: svn log -l 2 https://hedgehog.fhcrc.org/bioconductor/trunk/madm
an/Rpacks/aroma.light
------------------------------------------------------------------------
r94400 | h.bengtsson | 2014-09-22 15:44:00 -0700 (Mon, 22 Sep 2014) | 14 lines

Commit made by the Bioconductor Git-SVN bridge.
Consists of 1 commit.

Commit information:

Commit id: 404621f17b942bc8fe0edb535a2516898b1f4734

    Ping ping from Git

Committed by: hb
Author Name: hb
Commit date: 2014-09-22 15:42:59 -0700
Author date: 2014-09-22 15:42:59 -0700

------------------------------------------------------------------------
r94399 | h.bengtsson | 2014-09-22 15:41:35 -0700 (Mon, 22 Sep 2014) | 1 line

# ping ping.
------------------------------------------------------------------------


Just to make sure, the above seems to work.  Is it that you are aware
of this approach but have found it not to work - in a way that I'm
about to discover - or should I just tap myself on the shoulder and
assume I can stick with this approach?

Thanks,

Henrik

>
> Dan
>
>>(b) Would that work and/or would it confuse the bridging?
>>(c) If ok, should I use "SVN wins unconditionally" or will that just
>>overwrite the whole Git repository?
>>
>>I'm planning to work off Git, so most updates should go in the
>>GitHub-to-BioC direction.
>>
>>Thanks
>>
>>Henrik
>>
>>_______________________________________________
>>Bioc-devel at r-project.org mailing list
>>https://stat.ethz.ch/mailman/listinfo/bioc-devel
>



More information about the Bioc-devel mailing list