Issue running git-svn-mirror script on code

John Ralls jralls at ceridwen.us
Mon Jan 21 11:19:53 EST 2013


On Jan 21, 2013, at 6:11 AM, Derek Atkins <warlord at MIT.EDU> wrote:

> Hey all,
> 
> Geert and I were working over the weekend to try to set up an svn->git
> mirror on code.  Alas, I seem to have an issue that I don't know how to
> fix.
> 
> I did:
> 
>  git clone <url>
>  git svn init --stdlayout file:///repo/gnucash-docs
>  git-update
>  git-svn-mirror update .
> 
> After doing a bunch of stuff I get this output:
> 
> To <git clone URL>
> ! [rejected]        svn/1.8 -> 1.8 (non-fast-forward)
> ! [rejected]        svn/2.0 -> 2.0 (non-fast-forward)
> ! [rejected]        svn/2.2 -> 2.2 (non-fast-forward)
> ! [rejected]        svn/2.4 -> 2.4 (non-fast-forward)
> ! [rejected]        svn/lentity -> lentity (non-fast-forward)
> ! [rejected]        svn/trunk -> trunk (non-fast-forward)
> error: failed to push some refs to 'ssh://git@code.gnucash.org/gnucash-docs.git'
> To prevent you from losing history, non-fast-forward updates were rejected
> Merge the remote changes (e.g. 'git pull') before pushing again.  See the
> 'Note about fast-forwards' section of 'git push --help' for details.
> push origin: command returned error: 1
> 
> I get this in all the repositories.  I thought I was following all the
> instructions in the wiki, so I don't understand what might be wrong.
> I'll also note that I had to manually add the [svn2git] section in the
> config, as well as the [svn] section, if that makes a difference?  I
> also had to manually change the fetch and pull lines in both the remote
> "origin" and svn-remote sections.
> 
> I'll also note that in one repo I removed the [branch "trunk"] section,
> as it wasn't in the example on the wiki.  But that caused git-update to
> fail with:
> 
> You asked to pull from the remote 'origin', but did not specify
> a branch. Because this is not the default configured remote
> for your current branch, you must specify a branch on the command line.
> pull --rebase origin: command returned error: 1
> 
> So I am stuck...

Yes, the [svn2git] and [svn] sections are normally set up by git-svn-mirror when starting from scratch. 
Yes, you should delete any [branch] sections from the mirror's config, and yes, once you do that you can't run git update (or git pull or fetch, for that matter) anymore. All input comes from git svn.

Is the receiving bare repo inited and the URL correct? Is this the first push to that repo?

Regards,
John Ralls




More information about the gnucash-devel mailing list