1

I have a git repository that has tons of binary files/build artifacts in it. I'm trying to remove them using reposurgeon. Initially, it choked and died when reading the state of the directory. I was able to hack the source a bit and get past that.

But now when I'm trying to rebuild the result, I get it badly:

reposurgeon% rebuild
reposurgeon: exporting......(15.53 sec) done.
reposurgeon: fatal exception in popen_or_die.
Traceback (most recent call last):
  File "../reposurgeon-3.0/reposurgeon", line 9119, in <module>
    interactive()
  File "../reposurgeon-3.0/reposurgeon", line 9108, in interactive
    interpreter.cmdloop()
  File "/usr/lib/python2.7/cmd.py", line 142, in cmdloop
    stop = self.onecmd(line)
  File "../reposurgeon-3.0/reposurgeon", line 6105, in onecmd
    cmd.Cmd.onecmd(self, line)
  File "/usr/lib/python2.7/cmd.py", line 221, in onecmd
    return func(arg)
  File "../reposurgeon-3.0/reposurgeon", line 7506, in do_rebuild
    rebuild_repo(self.chosen(), parse.line, parse.options, self.preferred)
  File "../reposurgeon-3.0/reposurgeon", line 5540, in rebuild_repo
    progress=verbose>0)
  File "../reposurgeon-3.0/reposurgeon", line 5540, in rebuild_repo
    progress=verbose>0)
  File "../reposurgeon-3.0/reposurgeon", line 4600, in fast_export
    fp.write(event.dump(target, options=options, realized=realized))
  File "../reposurgeon-3.0/reposurgeon", line 1777, in dump
    parts.extend(op.dump(vcs) + "\n" for op in self.fileops)
  File "../reposurgeon-3.0/reposurgeon", line 1777, in <genexpr>
    parts.extend(op.dump(vcs) + "\n" for op in self.fileops)
  File "../reposurgeon-3.0/reposurgeon", line 1288, in dump
    if len(self.path.split()) > 1:
AttributeError: 'NoneType' object has no attribute 'split'
fatal: Cannot determine the current working directory: No such file or directory

error: can't write crash report .git/fast_import_crash_2923: No such file or dir
ectory
error: git-fast-import died of signal 11

Any clue how to work around or fix this?

Wayne Werner
  • 49,299
  • 29
  • 200
  • 290
  • Do you still need the brances/tags that contain spaces? if not you could [remove the tags containing spaces completely.](http://stackoverflow.com/questions/22705942/how-do-i-remove-an-svn-tag-completely-that-contains-spaces?lq=1) – rubo77 Mar 30 '14 at 18:59
  • It's not an issue with the tags (though that might be, too) - the issue is that I have something like `/path to/some folder/andFile.txt` – Wayne Werner Mar 31 '14 at 03:01
  • So you think your problems are spaces in **filenames or paths** that are checked in into your repository? – rubo77 Mar 31 '14 at 11:25
  • The error message said that `self` is null in that loop. Maybe only once at the end? Can you paste that lines around the error in paste in gist? – rubo77 Mar 31 '14 at 11:29
  • @rubo77 it's actually the `path` that's `NoneType`. I believe [this is the line in question](https://gitorious.org/reposurgeon/reposurgeon/source/d6b528e7763e4eaa4f5bc541f33d7e0ee725e218:reposurgeon#L1351) (though apparently it's moved since then) – Wayne Werner Mar 31 '14 at 12:26
  • 1
    @WayneWerner: for starters we have reposurgeon 3.20 available right now. If you solved it, perhaps you remember how you did and can answer your question. Still, have you tried splitting out the `git-fast-import` part? You can also take the detour of importing from and exporting to `git-fast-import` instead of letting reposurgeon do all the handling. – 0xC0000022L Mar 18 '15 at 08:23
  • @0xC0000022L that's a good question. Oh, right, I remember now! Yeah, I used a function... I forget which one, but it allowed me to do a wholesale file rename. I used that to swap spaces in the paths. It's been a long time since I touched the repos - I failed in getting things merged up, the history of these repos is so very very bad. I'll try the new version, though. – Wayne Werner Mar 18 '15 at 11:39

0 Answers0