public
Description: Simple tool to help track git and svn vendor branches in a git repository
Home | Edit | New

Troubleshooting

MacPorts git-svn note

If you’re mirroring a remote SVN repository, make sure you have git-svn available. Try

which git-svn
to see if it’s there. If you’re using MacPorts, it currently does not include git-svn by default; you must install Git with the +svn variant, like so:

sudo port install git-core +svn

Note: Many people have experienced trouble running the above command to install git-svn. For most cases, the fix is to first install the subversion perl bindings that git-svn uses.

sudo port install subversion-perlbindings

If braid appears to get stuck on adding or updating a remote (most likely when using HTTP)

This is most likely due to an issue with git fetch. It is described in this post on the git list

The gist of it is that git fetch slows down if you have a lot of revisions in your repository. There are three things that can limit the speed of a git fetch:

  1. remote cpu
  2. bandwitdh
  3. local cpu

Braid has implemented a caching mechanism to get around the first two limitations. However, when adding a lot of remotes, there might still be a bit of slowdown. Currently, i have over 11k revisions and I notice no slowdown, so this slowdown might never happen.

To check how many revisions you have in your repository right now, use:

git rev-list —all | wc -l

If that number is very different from the number of actual commits you have in your repository, you might gain some speed by cloning again from your remote to get rid of all those extra revisions. However, you’ll get them back when you run braid update anyway.

Another option is to try using git:// or svn:// URLs instead of http:// ones, if possible. To do this, you can change the ones found in your .braids file, manually remove the braid-generated remotes from .git/config, remove ~/.braid/cache and run the following two commands:

braid setup brad update # should not stall anymore

A git repo with about 10000 revisions worked like a charm after the change to git://, while with http:// it stalled for about half an hour before I killed it.(Cristi Măgherușan)

Another, more radical option, and most likely one you’ll never need, is to just use another repository to add the braid remotes. This is like killing a mosquito with a tank and is listed here “just in case”:

cd repo cd ../ git clone repo repotmp cd repotmp braid add … git log # check it worked, etc cd ../repo git pull ../repotmp master
Last edited by cristim, Tue Jun 30 03:26:50 -0700 2009
Home | Edit | New
Versions: