How to add binary files via git-svn

November 24, 2008 at 1:28 am | Posted in KDevelop | 8 Comments

Hi,

I just had a horrendous experience with git-svn. I added a few new binary files via git add+git commit, then did some more work and commits in a git-svn’ed kdevplatform checkout. After all was done, I wanted to dcommit everything back into the svn repository and svn then complained when the commit with the binary files was supposed to happen. (and for some time I lost all the work coming after that, luckily I found out how to retrieve at least the diffs)

Apparently one needs to do something special here to add binary files, unfortunately my search so far hasn’t been successful. Does anybody know how to do that properly, so I can git-svn dcommit the whole thing?

8 Comments

  1. I remember that the exact same problem happened to one of us Amarok devs the other day. I’d be interested in a solution too.

  2. I used tailor to import my git project to KDE svn, you might want to check it out

  3. Same thing here. Whenever I need to commit binary files, I checkout the dir in a temporary dir via straight svn and commit the binary files there.

  4. Weird, I’ve never had that problem with binary files. Maybe I’ve been lucky enough to not touch binaries in my git-svn travels. As for the failed dcommit, I’ve gotten in the habit of tagging just before running dcommit and then deleting the tag after.

  5. My solution was to add them in a real svn checkout.

    AFAIK the bug has been fixed in a newer version of git-svn

  6. Hm, no such problem here. Check the root of kdevplatform🙂
    Maybe you had a problem with broken history? I remember that git-svn dcommit doesn’t like to commit things that are older, that svn HEAD. So if you did some work, rebased your local-svn (maybe master), merged with your work you might have some problems.
    git-svn version 1.6.0.2 (svn 1.5.0)

  7. How did you add the binary file? Just git add ?

    In my case I had a text file and a directory with subdirs with binary files added/comitted at the same time. Then later I did a git-svn rebase and then the dcommit.

    I’ll try to do another test tonight. And please don’t forget to remove the binary file again😉

  8. Just “git add”, “git commit” and git “svn dcommit”🙂 I guess your problem is related to some issues with dcommitting multiple commits (after merging into another branch) and then rebasing.
    Anywhere min 2 of us use git-svn: Alexander and I, so you can find solid backup🙂


Sorry, the comment form is closed at this time.

Create a free website or blog at WordPress.com.
Entries and comments feeds.

%d bloggers like this: