-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Resuming import deletes commits made to git repository not from the import itself #69
Comments
I expect that it is overwriting your repository. What you could try is to create a new rule on your second run which doesn't write the commits to master, instead it writes them to a new branch:
Then, you could merge the second-run branch onto master after you have done your second svn2git run.
|
Thanks for the suggestion. Unfortunately, even when writing to a different branch, it wiped out my non-Subversion commits on master during the execution of svn2git. I also tried the following:
When I inspected the bare repository, the pvcs branch was gone along with its commit, as if I'd never done it. And this with my svn2git configuration never referencing the pvcs branch. Is there any way to tell svn2git to leave existing (non-Subversion-related) branches alone? Thanks again! |
I don't understand git fast import very well, but I see in the source it uses the --force option and there's no way to disable that. Might my plan of putting all my PVCS code on a separate branch during the migration work if I didn't have --force in there? |
Sigh, nevermind my last two comments. Doing git log --all | grep pvcs, looking for my branch name, didn't work because piping the log output doesn't include the branch names on the commit hash lines. Odds. Anyway, my branch and commit are still there, just not in the place in the log history that I expect them to be. But I think that's probably ok. No replies needed for now, as I'll explore my approach of loading my PVCS history into its own branch. |
I am trying to export a Subversion repository that contains multiple releases of a product into a new git repository. Along the way I am also export code from a different system (Serena PVCS) by hand into this same repository. My goal has been to do the following:
I do the manual commits by cloning the bare repository svn2git created into a new folder. I check out master, add all my code from PVCS, commit, and push back into the bare repository.
However, when I run svn2git the second time to load the next batch of revisions, it actually completely wipes out my manual commits in the bare repository, as if they had never existed. They don't show up in the git log within the bare repository. When I "git pull" in my local copy I created for adding the code from PVCS, it reports divergence of the remote branch and does a commit for a merge.
Each time I run svn2git it seems to wipe out my commits that didn't come from subversion.
Am I doing the process incorrectly, or is this just not possible, to run svn2git into what is essentially an existing repository that has code from other commits?
The text was updated successfully, but these errors were encountered: