simple use case advice

Eric Siegerman lists08-bzr at davor.org
Fri Oct 1 06:02:23 BST 2010


On Fri, 2010-10-01 at 13:15 +0900, Stephen J. Turnbull wrote:
> An alternative to branching with bzr is rsyncing (or other recursive
> copy) the branch.  AFAIK bzr can't tell the difference.

This is mostly true.  The important restriction is that, if the
source branch uses a shared repository, the destination must also
be physically under the shared-repo directory, since for that
particular resource, bzr searches up the directory tree.  That
is:
    rsync -a shared-repo/a/src shared-repo/b/c/dst
will work, but:
    rsync -a shared-repo/a/src somewhere-else/dst
will not.

"bzr branch", on the other hand, can do the right thing in either
case.  For standalone branches, of course, this problem doesn't
arise, since all necessary revision data lives within the branch's
own .bzr directory.

Other minor differences are:
  - "bzr branch" will point the destination's "parent" link at
    the source branch; obviously, rsync won't.  You can adjust it
    yourself, however, either via "bzr pull --remember src" or by
    manually editing the link; in recent formats, including 2a,
    it's in .bzr/branch/branch.conf, which is a text file.

  - "bzr branch" can adjust the relative pathnames within
    .bzr/branch/branch.conf (and other files too?), if the
    destination isn't a sister directory of the source.  But
    again, any breakage here can be cleaned up manually after the
    fact.

HTH,
  - Eric





More information about the bazaar mailing list