diff --git a/github-svn-mirror.sh b/github-svn-mirror.sh index 497d26b..05b7f12 100755 --- a/github-svn-mirror.sh +++ b/github-svn-mirror.sh @@ -66,6 +66,8 @@ while [ $revision_to_merge -le $git_head_revision ]; do echo "Merging r$revision_to_merge ($commit_hash)" svn merge --accept theirs-full --ignore-ancestry -c $revision_to_merge $git_location $svn_location || { report "Could not merge r$revision_to_merge ($commit_hash) from git repository to svn repository" ; exit 1; } svn commit $svn_location -m "$commit_msg" || { report "Could not commit r$revision_to_merge ($commit_hash) to svn repository" ; exit 1; } + # update after commit to avoid svn: E195020: Cannot merge into mixed-revision working copy; try updating first + svn update $svn_location || report "Could not update svn after committing r$revision_to_merge ($commit_hash) to svn repository" ; exit 1; } fi let revision_to_merge=$revision_to_merge+1