Hello Harold,
may I ask you to send to us the logs from GIT_REPO/subgit/logs/ directory (svnmirror.log file corresponding to that error and time period)?
From the first glance it looks like a normal out-of-date error and if this is really is so (the log should give the answers), the solution is simple: run
{code}
git pull --rebase
{code}
command and then retry pushing:
{code}
git push
{code}
Probably we should have these instructions included into the error message.
I’ll give you some more details about why the error happens. When you run “git push”, SVN Mirror add-on starts a new SVN revision creation transaction, something like this:
{code}
openRoot //i.e. begin SVN revision creation transaction
…
… //describe some changes to be made in that new SVN revsion to be created
…
closeDir
// <------ at this moment it checks SVN whether the transaction is not out-of-date
closeEdit //i.e. commit the transaction (or abortEdit to rollback the transaction)
{code}
You can see these openRoot/…/closeDir/closeEdit commands in the log. Before committing the transaction it checks that the transaction is not out-of-date, i.e. if there’re no other revisions created in the same SVN branch in this period. And in your case there’s one: trunk@46130. In this case instead of committing the transaction with “closeEdit” command it rolls it back with “abortEdit” command and reports an error (the one you see).
So this is not something extraordinary, probably the error message is just misleading, we should make it more clear.
There’s one more possible situation:
{code}
openRoot //i.e. begin SVN revision creation transaction
…
… //describe some changes to be made in that new SVN revsion to be created
…
closeDir
// <------ at this moment it checks SVN whether the transaction is not out-of-date
// <------ but at this moment a new SVN revision appears
closeEdit //i.e. commit the transaction, because the check didn’t find any external change
// <----- perform one more check here
{code}
i.e. a new external revision appeared after the check. There’re 2 possibities:
- if that new external revision changes at least one file changed in this transaction (the condition is a bit more complicated than that, but for the majority of the cases it’s like this), then SVN server automatically refuses our transaction and SVN Mirror add-on shows an out-of-date error and proposes to run “git pull --rebase”; I’m sure you saw that many times;
- but if that new external revision changes different set of files, the SVN server creates the new revision on the top of the external revision(!).
In the latter case, SVN Mirror add-on rejects “git push” despite the fact that the new SVN revision was created. In this case you have to run “git pull --rebase”. After this command you’ll have your commit effectively pushed.
This is because SVN Mirror add-on then translates the new SVN revision it just created back to Git. It will be effectively the same commit like the one you tried to push except that it is now created on the top of the externally created revision, not on the top of the original commit you have locally. When you run “git pull --rebase”, Git will realize that your local (“rejected”) commit has the same changes as that commit translated from SVN and will make ‘origin/master’ point to ‘master’, as if your push is successful.
I hope my explanation is clear, feel free to ask any questions if no.
In either case whenever you have an out-of-date error, the rule of thumb: run
{code}
git pull --rebase
{code}
and retry pushing if you still have local commits.