Slow "bzr branch" on Savannah

Eric Siegerman lists08-bzr at davor.org
Sat Feb 19 17:35:01 UTC 2011


On Sat, 2011-02-19 at 17:15 +0200, Eli Zaretskii wrote:
> does "bzr branch --bind" bind to the _exact_ URL used, including
> the "nosmart+" part?

Yes.

> If so, then users should be advised to not use
> the --bind switch on the initial "bzr branch" command, and then issue
> a separate "bzr bind" command with the URL without the "nosmart+"
> part.

That'll work.  I'd suggest also doing a "bzr pull --remember"
from the nosmart-less URL, to adjust the parent-branch pointer
(this is unlikely to bring down any new revisions, of course).

In all, it would look like:
    bzr branch nosmart+bzr://{source} {local-branch}
    cd {local-branch}
    bzr pull --remember bzr://{source}
    bzr bind bzr://{source}

You only need the "--remember" on the first pull; after that, it
should be omitted.  (If that is, one even uses "bzr pull" on a
bound branch; I've never used those, so I'm very fuzzy on the
workflow involved...)


FYI, you can test this kind of thing locally, since it's a
functionality test, not a timing test:
    mkdir /tmp/test
    cd /tmp/test
    # Make an "upstream" branch
    bzr init upstream
    cd upstream
    # Add a file or two and commit

    # Serve it via bzr://
    bzr serve --directory /tmp/test&

    # Test branching from your new server
    cd /tmp/test
    bzr branch --bind nosmart+bzr://localhost/upstream downstream

The "bzr serve" command starts a bzr server on (by default) port
4155, which:
 1. serves only the directory tree rooted at /tmp/test
 2. serves it read-only
 3. is pretty short-lived, as long as you remember to kill the
    server process when you're done

So even if you don't trust "bzr serve"'s security [1], the risk
seems minimal.  Plus there's:
 4. Your firewall probably blocks inbound port 4155 anyway

A corollary of (1) is that, when you access this server, the path
part of the bzr://localhost/ URL is relative to /tmp/test.

[1] I have no informed opinion on "bzr serve"'s security, so
    wearing my paranoid-sysadmin hat, my *un*informed opinion is
    to distrust it by default :-/

  - Eric





More information about the bazaar mailing list