A git mirror for Gnucash's Subversion Repository
jralls at ceridwen.us
Sun Feb 20 19:28:41 EST 2011
On Feb 20, 2011, at 12:46 PM, Christian Stimming wrote:
> Am Sonntag, 20. Februar 2011 schrieb John Ralls:
>> On Feb 18, 2011, at 9:03 PM, John Ralls wrote:
>>> I'll try again differently tomorrow, but at the moment I wonder if this
>>> is going to be automatable.
>> Well, I started over with a clean git svn mirror and tried pushing/pulling
>> the feature branch all the way through to the svn mirror, then merged with
>> the detached head, switched to the tracking branch, git svn rebased, and
>> pushed, then pulled the result into the original working checkout and into
>> a second "uninvolved" checkout. I did this twice to make sure that the
>> links wouldn't get messed up. They didn't. So the Loeliger method works,
>> but it requires a lot of hand work (creating new feature branches and
>> merging them, then deleting them when no longer needed).
> Huh. To be honest, I was able to follow your explanation only up to some
> extent, but not in its full length... Indeed this sounds like a lot of hand
> work. I think this already begs for being avoided...
>> I'll test out the Nicolaisen method next.
> Yes, at least I've already understood the method description in the original
> blog posts, so I think this should work with much less hand-work. But I'm
> curious to hear your next results here.
I was afraid that explanation was a bit murky.
In order to make the Loeliger method work without corrupting the git repository that it came from, a feature branch has to be pushed back to Github and then pulled to the repository handling git svn. Since there's no "git pull --all" to always grab every branch, that requires human intervention, as does merging the feature branch into the detached head. Merging anywhere else created double commits because the trip through subversion munges the commit unless you turn off metadata.
I think the Nicolaisen method will work; after a couple of false starts, it worked through the few scenarios I tried. It turns out to be really important to do the update-ref after each pull, so I've written a perl script to do that, suitable for use in a git alias, to use instead of git pull.
I've also got a perl program to set up and update (including the push) a repo; I'm just smoothing that up and writing the pod.
I'll put both of them up in the Gnucash/git-helper-scripts repo that Yawar created, then I'll start in on the wiki page.
I'm pulling a clean clone of gnucash's subversion (with metadata this time). I want to fix up the merge-back commits to have two parents, and to add in a .gitignore duplicating the svn ignore properties before I blow out the Github repository and replace it.
More information about the gnucash-devel