git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 00/20] remote-bzr: massive changes

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
Apr 26, 2013, 01:07 UTC
Message-ID
<1366938488-25425-1-git-send-email-felipe.contreras@gmail.com>
Hi,

After being contacted by the emacs developers and others who are stuck with Bazaar, which at this point seems to be utterly abandoned, I realized the current implementation is too crude.

Bazaar branches are very simplistic, and our support for them is the same; we need to create one remote per branch. This works nicely if you work on small projects with few branches, but doesn't scale.

Big projects like emacs take a lot of space, and creating a remote per branch is unrealistic, because each remote will have the whole Bazaar repository copied, wasting space, and time each time a remote (for a bzr branch) is set up.

Moreoever, a developer needs to constantly reset the master branch to the commit he/she wants to push before pushing, since the transport-helper infraestructure doesn't support pushing with refspecs (xwidget:master).

That is of course, if pushing actually worked (which in many cases doesn't).
In short, our support for real-world projects suck.
These patches fix all the issues I encountrered.
 1) First of all, there are several improvements for pushing. Before, we failed
    when trying to push a merge, now, even tricky merges work.
 
 2) Secondly, bzr branches are tied to a transport, so they time out if not
    used for a period of time, and importing/exporting huge chunks of a
    repository do take some time. So now they are only opened when they are
    about to be used.
 3) Then the big one; now bzr repositories are supported. They are very simple:
    basically an object store with no notion of branches, so to find the
    branches we need to traverse a directory (sometimes) remote, to find them.
    This is how Bazaar does it, ableit very slowly. Naturally, a lot of code
    had to be changed to support more than one branch.
 4) In addition, now remotes share all the objects, so adding a new remote
    doesn't imply fetchng a bunch of duplicated objects. They are just re-used
    automagically.
 5) Since the bzr objects are shared now, it only makes sense to share the
    remote-bzr marks, so we don't have to fast-import them again.
 6) The code was also reorganized to keep referenced as few objects as
    possible, since Bazaar seems to be need *a ton* of memory for them.

Finally, after all these changes I was finally able to clone the whole emacs repository, all 130685 commits, and 56 branches without running out of memory in my modest laptop.

Since the purpose of remote-bzr is to actually be usable for the poor souls stucks in DSCMs that are not git, these changes are a must. I propose they be merged for the next major version of git (v1.8.3) if no issues are found. They changes pass all the tests, and work on various repositories I've tried. I'll ask the emacs developers to give them a try, and let's see how it goes.

Cheers.
Felipe Contreras (20):
  remote-bzr: cleanup CustomTree
  remote-bzr: delay blob fetching until the very end
  remote-bzr: fix order of locking in CustomTree
  remote-bzr: always try to update the worktree
  remote-bzr: add support to push merges
  remote-bzr: fixes for branch diverge
  remote-bzr: fix partially pushed merge
  remote-bzr: use branch variable when appropriate
  remote-bzr: add support for bzr repos
  remote-bzr: fix branch names
  remote-bzr: add support for shared repo
  remote-bzr: split marks file
  remote-bzr: improve author sanitazion
  remote-bzr: add custom method to find branches
  remote-bzr: add option to specify branches
  remote-bzr: improve progress reporting
  remote-bzr: iterate revisions properly
  remote-bzr: delay peer branch usage
  remote-bzr: access branches only when needed
  remote-bzr: export HEAD
 contrib/remote-helpers/git-remote-bzr | 365 +++++++++++++++++++++++++---------
 contrib/remote-helpers/test-bzr.sh    |  36 ++++
 2 files changed, 302 insertions(+), 99 deletions(-)
-- 
1.8.2.1.884.g3532a8d
Next: Felipe Contreras
Message 1 of 29 in “remote-bzr: massive changes”
  1. 00/20 remote-bzr: massive changesFelipe Contreras, Apr 26, 2013
  2. 01/20 remote-bzr: cleanup CustomTreeFelipe Contreras, Apr 26, 2013
  3. 02/20 remote-bzr: delay blob fetching until the very endFelipe Contreras, Apr 26, 2013
  4. 03/20 remote-bzr: fix order of locking in CustomTreeFelipe Contreras, Apr 26, 2013
  5. 04/20 remote-bzr: always try to update the worktreeFelipe Contreras, Apr 26, 2013
  6. 05/20 remote-bzr: add support to push mergesFelipe Contreras, Apr 26, 2013
  7. 06/20 remote-bzr: fixes for branch divergeFelipe Contreras, Apr 26, 2013
  8. 07/20 remote-bzr: fix partially pushed mergeFelipe Contreras, Apr 26, 2013
  9. 08/20 remote-bzr: use branch variable when appropriateFelipe Contreras, Apr 26, 2013
  10. 09/20 remote-bzr: add support for bzr reposFelipe Contreras, Apr 26, 2013
  11. 10/20 remote-bzr: fix branch namesFelipe Contreras, Apr 26, 2013
  12. 11/20 remote-bzr: add support for shared repoFelipe Contreras, Apr 26, 2013
  13. 12/20 remote-bzr: split marks fileFelipe Contreras, Apr 26, 2013
  14. Felipe ContrerasApr 26, 2013
  15. Junio C HamanoApr 27, 2013
  16. Felipe ContrerasApr 27, 2013
  17. Junio C HamanoApr 28, 2013
  18. Felipe ContrerasApr 29, 2013
  19. 13/20 remote-bzr: improve author sanitazionFelipe Contreras, Apr 26, 2013
  20. 14/20 remote-bzr: add custom method to find branchesFelipe Contreras, Apr 26, 2013
  21. 15/20 remote-bzr: add option to specify branchesFelipe Contreras, Apr 26, 2013
  22. 16/20 remote-bzr: improve progress reportingFelipe Contreras, Apr 26, 2013
  23. 17/20 remote-bzr: iterate revisions properlyFelipe Contreras, Apr 26, 2013
  24. 18/20 remote-bzr: delay peer branch usageFelipe Contreras, Apr 26, 2013
  25. 19/20 remote-bzr: access branches only when neededFelipe Contreras, Apr 26, 2013
  26. 20/20 remote-bzr: export HEADFelipe Contreras, Apr 26, 2013
  27. Felipe ContrerasApr 26, 2013
  28. Junio C HamanoApr 26, 2013
  29. Felipe ContrerasApr 26, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.