Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to fix "file not found" on git svn dcommit?

Tags:

git-svn

I'm trying to do git svn dcommit, however, one directory continues to fail on me and therefore stops my commit and continue to get this error:

Filesystem has no item: File not found: transaction '43999-6', path '/path/to/folder' at /usr/local/git/libexec/git-core/git-svn line 572

I tried adding the folder back in but i continue to get that error. can I remove a commit from the tree to bypass this? Not sure what else to do here.

edit
some of the following don't fully answer my question, but they seem to be in the right direction:

  • issue about tracking and not detaching the HEAD
  • issue about rebasing
  • issue about recovering commits

The last issue seems to be what I wanted, but with the size of my repo (last time, took me around a whole work day to checkout the entire thing), and the little amount of work I would have lost by just doing a hard reset (which ultimately seemed to do the trick), I went for the hard reset option.

like image 558
hellatan Avatar asked Jan 12 '11 01:01

hellatan


2 Answers

svn reset --hard didn't work for me

the reason of this is that when doing a dcommit to svn, it seems like the commit that deleted the file appears to be done in both git and svn at the same time but the link is lost.

The solution that worked for me was to reset master to the commit before the problem, then merge all sucessive commit back to master (except the faulty one), then redo the file deletion. there may be a more elegant solution...

side note: git svn DOES svn rename/move files correctly. It (either tortoisegit+mysgit or jgit/egit) does it automagically all the time ;)

like image 95
cogito Avatar answered Jan 03 '23 14:01

cogito


I don't think git-svn actually supports renaming files. I get this error every time I try to rename something. I always end up having to rename it with svn and then rebase with git-svn.

Update

This is likely due to the fact that git-svn doesn't play nicely with spaces in URLs. I often have to rename project paths in order to get them to work with git-svn. Of course, this isn't an acceptable solution for projects that actually have other people working on them. For those I simply have to resort to using svn to move files. It's a huge hassle.

like image 22
Jim Mitchener Avatar answered Jan 03 '23 14:01

Jim Mitchener