Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ignore revision on git-svn fetch?

Tags:

git

svn

git-svn

I am trying to move one of my Subversion repositories to Git and am running into an interesting error... In the middle of the git-svn fetch step, I receive the following error:

r9 = d0eff6b2d1eda7fcced16227dbc613732e956f0b (refs/remotes/git-svn)
RA layer request failed: PROPFIND request failed on '/baytn/baytn/trunk': PROPFI
ND of '/baytn/baytn/trunk': 500 Internal Server Error (https://1three.svn.codeba
sehq.com) at C:\Program Files\Git/libexec/git-core/git-svn line 5047

When I go look at the revision history for the SVN repository I see that Revision #9 was an empty commit, how this happened, I am not sure.

Is there any way for me to get around this error?

Best regards,
Andrew

like image 470
Andrew Ellis Avatar asked Jul 20 '10 22:07

Andrew Ellis


People also ask

What does git SVN fetch do?

This retrieves all the changes from the SVN repository and applies them on top of your local commits in your current branch. This works like, you know, a rebase between two branches :) You can also use git svn fetch to retrieve the changes from the SVN repository but without applying them to your local branch.

Can I use git and SVN at the same time?

You can clone a subversion repository to your machine using git svn clone <SVN repo URL> . The code will be available as a git repository. You can do your work there and make local commits as you please. There is a command line option to get a "shallow" checkout rather than the entire repository which is often useful.

What is a SubGit?

SubGit is a tool for migrating Subversion(SVN) to Git.

What is the difference between git and SVN?

The difference between Git and SVN version control systems is that Git is a distributed version control system, whereas SVN is a centralized version control system. Git uses multiple repositories including a centralized repository and server, as well as some local repositories.


2 Answers

If you do a git svn fetch to get all revisions and it fails on revision 9, you can just continue with:

git svn fetch -r 10:HEAD

If I know there is a revision that will be an issue, it can be skipped this way (assuming revision 9 is the problem):

git svn fetch -r 0:8
git svn fetch -r 10:HEAD
like image 114
Chris Bain Avatar answered Oct 04 '22 02:10

Chris Bain


You can filter your commits:

with git:

  • http://git-scm.com/docs/git-filter-branch

with svn:

  • undo commit: http://markphip.blogspot.com/2007/01/how-to-undo-commit-in-subversion.html
  • Filter: http://svnbook.red-bean.com/en/1.4/svn.reposadmin.maint.html
like image 39
Andreas Rehm Avatar answered Oct 04 '22 02:10

Andreas Rehm