Recommanded way to branch a big git reposotiry ?

Asked by Hibou57 (Yannick Duchêne)

Hi all,

I enjoy Bazaar and Bazaar explorer a lot, except I am getting into trouble trying to branch a big GIT repository, which is the GCC repository. See for details.

I get an error from Explorer, but don't mind, as it seems it may work from the command line, except it could not terminate for me: too long and too much resource consuming.

As a seasoned user of SVN and and even less seasoned user of Mercurial, I am not very versed at control version, so I may miss a trick.

Bzr-git is long to fetch all revisions, and with an average of one second per revision a repository with thousands revision is long to branch.

Is there a way to get the repository without full conversion ? As an example, this repository has revision as old as 20 years old. I am unlikely to fetch such an old revision, so bzr-git could import all data and deltas without converting all revision. If ever it happens I wish, it could convert the required part of the revisions history only at the moment I need it.

See what I mean ? Is there a way to do so ?

Question information

English Edit question
Bazaar Git Plugin Edit question
No assignee Edit question
Solved by:
Jelmer Vernooij
Last query:
Last reply:
Revision history for this message
Best Jelmer Vernooij (jelmer) said :

You should be able to use the Launchpad import of gcc import at the moment, which also uses bzr-git:

In the mean time, the bug is the best place for communication about this issue.

Revision history for this message
Hibou57 (Yannick Duchêne) (yannick-duchene) said :

Great, I was too thinking some Bazaar mirror of famous GIT repository would be nice... this already exist so, fine.

I was not sure if this was welcome to ask about this question in the bug report. Sorry for that mistake.

Revision history for this message
Hibou57 (Yannick Duchêne) (yannick-duchene) said :

Notes to people who may read this thread.

Don't do “bzr branch lp:~vcs-imports/gcc/git-mirror”, as the above link point to a page displaying the URI lp:~vcs-imports/gcc/git-mirror. Doing so, you will get an error at the end of import, about an adresse which could not be resolve.

Instead, do “bzr branch lp:dcc”, as stated in

Duration: about 1 hour and 20 minutes. Slower than GIT, but fast enough. Don't break your mind with an irrelevant comparison, formally speaking, a program is fast enough when it terminates within reasonable amount of time, and this is subjectively fast enough I believe. Somewhere at the end of the process, bzr does not provide any feedback and one CPU is 100% busy, all for about near 20 minutes. Although the absence of any feed-back for be somewhat frightening, bzr is not crash at that time, so wait enough and don't kill the process on the erroneous assumption it may have entered a kind of infinite loop. After than hole, it goes on with feedbacks.

Memory consumption: 800M. So you should have at least 1G RAM (common nowadays) and a minimum amount of swap.

Disk usage: after process completion, the final repository size is 900M. Smaller than the similar GIT repository. Sorry, I did not really checked disk usage during the process, but if I'm not wrong, I have reason to believe it did not go beyond 4G, and possibly less (you may think its a lot of disk, but keep in mind this is a big repository, not the kind of thing you often meet).

TBH, a drawback: if you installed Bazaar for Nautilus integration, each time you enter the repository, the directory windows freezes for a rather long time (about more than a minute). So avoid entering exploring big repository from within Nautilus, and use either a console or open-file browser which come with your favorite text editor (providing the open-file browser does not display overlay icons, otherwise, it will probably freeze for some time too).

Summary: the overall experience is all fine, and Bazaar proves its maturity here.

Suggestion: suggest the maintainers of the original GIT repository, to give the link to this Bazaar mirror, to the intent of Bazaar users, and avoid them the nightmare of branching from GIT (I may drop them a mail later).

Revision history for this message
Hibou57 (Yannick Duchêne) (yannick-duchene) said :

Thanks Jelmer Vernooij, that solved my question.