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

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.


    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 ;)


    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.


    I was able to work around the problem of git svn not working for repositories with spaces in them by patching git-svn.

    I updated the url_path function to:

    sub url_path { 
      my ($self, $path) = @_; 
    
      my $url = $self->{url} . '/' . $self->repo_path($path); 
      if ($self->{url} =~ m#^https?://#) { 
        $url =~ s!([^~a-zA-Z0-9_./-])!uc sprintf("%%%02x",ord($1))!eg; 
        $url =~ s!^(https?)%3A//!$1://!; 
      } 
      $url 
    } 
    

    This ensures that the spaces in the url are encoded correctly.

    It seems to work for me, but hasn't been tested thoroughly.

    链接地址: http://www.djcxy.com/p/49904.html

    上一篇: 实体框架(CTP5,Fluent API)。 重命名导航属性的列

    下一篇: 如何解决“文件未找到”上git svn dcommit?