Reputation: 633
I am in the process of migrating an active SVN repository to git using git-svn. The git repository I've created is an exact mirror of the SVN repository, no changes on the git side, developers still commit to SVN. I use this script to keep the git repository up to date:
git svn fetch
for branch in `git branch --list --format="%(refname:short)"`; do
git checkout $branch;
git svn rebase
done
git push --all
Everything works for trunk and some of the SVN branches, but it seems some other SVN branches confuse git-svn. For example:
$ git svn rebase
warning: skipped previously applied commit 5920441b5
hint: use --reapply-cherry-picks to include skipped commits
hint: Disable this message with "git config advice.skippedCherryPicks false"
Auto-merging Tools/ReplaceTool.cpp
CONFLICT (content): Merge conflict in Tools/ReplaceTool.cpp
CONFLICT (modify/delete): tools_exe/TInfoForm.dfm deleted in HEAD and modified in 655ae4030 (Merged revision(s) 8035 from branches/tools-6.1:). Version 655ae4030 (Merged revision(s) 8035 from branches/tools-6.1:) of tools_exe/TInfoForm.dfm left in tree.
Auto-merging tools_exe/TWaitForm.dfm
error: could not apply 655ae4030... Merged revision(s) 8035 from branches/tools-6.1:
hint: Resolve all conflicts manually, mark them as resolved with
hint: "git add/rm <conflicted_files>", then run "git rebase --continue".
hint: You can instead skip this commit: run "git rebase --skip".
hint: To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not apply 655ae4030... Merged revision(s) 8035 from branches/tools-6.1:
rebase refs/remotes/origin/trunk: command returned error: 1
I am not quite sure how to proceed. Without changes to the git repository, the rebase operation should not have generated conflicts in the first place, therefore I don't think conflict resolution will solve the problem. Besides, the conflicts are rather large. Skipping seems dangerous to me.
I am not sure about the details of how git-svn handles SVN branches, but I suspect that some of the merging operations done in SVN repository are challenging to migrate, e.g. an SVN merge from one branch to another. Also I noticed when I first ran git-svn fetch, it reported some ignored cherry-picks. Does that cause problems?
Looking for suggestions on how to recover.
Related topics:
Upvotes: 0
Views: 21