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

I am trying to make git svn dcommit , however one directory continues to fail on me and therefore stops my commit and continues this error:

There is no element in the file system: File not found: transaction "43999-6", path / path / to / folder "in / usr / local / git / libexec / git -core / git - svn line 572

I tried to add the folder back, but I keep getting this error. can i remove the commit from the tree to get around this? Not sure what else to do here.

change
Some of the following questions do not fully answer my question, but they seem to be in the right direction:

The last question seemed to be what I wanted, but with the size of my repo (the last time, I spent a whole working day to check all this), and the small amount of work that I would have lost just doing a hard reset (which, in ultimately, it seemed to do the trick), I went for the hard reset option.

+7
source share
5 answers

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

Update

This is probably due to the fact that git-svn does not play well with spaces in URLs. I often have to rename project paths to get them working with git-svn. Of course, this is not an acceptable solution for projects in which other people actually work. For those to whom I just have to resort to using svn to move files. This is a huge problem.

+1
source

svn reset - hard doesn't work for me

the reason for this is that when dcommit is executed in svn it seems that the commit that deleted the file will be executed 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 commit before the problem, and then merge all forced commits to master (except the erroneous one), and then repeat deleting the file. maybe a more elegant solution ...

side notes: git svn. svn renames / moves files correctly. It (either tortoise + mysgit, or jgit / egit) does this automatically all the time;)

+1
source

I managed to solve the git svn problem, which does not work for repositories with spaces in them, fixing 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 URLs are encoded correctly.

This seems to work for me, but not fully verified.

+1
source

I believe the problem should be fixed in Git> = 1.8.0

You should consider updating it.

Homepage: https://github.com/git/git

+1
source

I know this is an old question, but I recently had this exact problem and wanted to share how I fixed this problem. Admittedly, this is not a good decision, but it allowed me to complete my commission. I have done the following:

  • Added folder / file with complaint to svn using svn.
  • My source code came from git to svn (git svn dcommit --rmdir)
  • Deleted the folder / file in git and passed it to svn.

This meant that I had 2 more small commits, one to add, and then another to delete the stub folder / file, but after that everything worked again as expected. I know this is not a good solution, and it does not address the root of the problem, but at least it allowed me to pass my code. Hope this can help someone else in this situation quickly fix the situation.

0
source

All Articles