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

[PATCH v2 00/18] remote-bzr: massive changes

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
May 1, 2013, 01:09 UTC
Message-ID
<1367370610-14250-1-git-send-email-felipe.contreras@gmail.com>
Hi,

This is the same as last series, except that I dropped a couple of conflicting patches, and added one test.

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.

Felipe Contreras (18):
  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: 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
 contrib/remote-helpers/git-remote-bzr | 305 ++++++++++++++++++++++++----------
 contrib/remote-helpers/test-bzr.sh    |  72 ++++++++
 2 files changed, 293 insertions(+), 84 deletions(-)
-- 
1.8.3.rc0.399.gc96a135
Next: Felipe Contreras
Message 1 of 25 in “remote-bzr: massive changes”
  1. 00/18 remote-bzr: massive changesFelipe Contreras, May 1, 2013
  2. 01/18 remote-bzr: cleanup CustomTreeFelipe Contreras, May 1, 2013
  3. 02/18 remote-bzr: delay blob fetching until the very endFelipe Contreras, May 1, 2013
  4. 03/18 remote-bzr: fix order of locking in CustomTreeFelipe Contreras, May 1, 2013
  5. 04/18 remote-bzr: always try to update the worktreeFelipe Contreras, May 1, 2013
  6. 05/18 remote-bzr: add support to push mergesFelipe Contreras, May 1, 2013
  7. 06/18 remote-bzr: fixes for branch divergeFelipe Contreras, May 1, 2013
  8. 07/18 remote-bzr: fix partially pushed mergeFelipe Contreras, May 1, 2013
  9. 08/18 remote-bzr: use branch variable when appropriateFelipe Contreras, May 1, 2013
  10. 09/18 remote-bzr: add support for bzr reposFelipe Contreras, May 1, 2013
  11. 10/18 remote-bzr: fix branch namesFelipe Contreras, May 1, 2013
  12. 11/18 remote-bzr: add support for shared repoFelipe Contreras, May 1, 2013
  13. 12/18 remote-bzr: improve author sanitazionFelipe Contreras, May 1, 2013
  14. 13/18 remote-bzr: add custom method to find branchesFelipe Contreras, May 1, 2013
  15. 14/18 remote-bzr: add option to specify branchesFelipe Contreras, May 1, 2013
  16. 15/18 remote-bzr: improve progress reportingFelipe Contreras, May 1, 2013
  17. 16/18 remote-bzr: iterate revisions properlyFelipe Contreras, May 1, 2013
  18. 17/18 remote-bzr: delay peer branch usageFelipe Contreras, May 1, 2013
  19. 18/18 remote-bzr: access branches only when neededFelipe Contreras, May 1, 2013
  20. Junio C HamanoMay 1, 2013
  21. Felipe ContrerasMay 1, 2013
  22. Junio C HamanoMay 1, 2013
  23. Felipe ContrerasMay 1, 2013
  24. Junio C HamanoMay 1, 2013
  25. Ted ZlatanovJan 3, 2014

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.