Search code examples
exportbazaar

How to export a sub-directory from a bzr branch?


Bazaar User Reference export section contains:

Purpose: Export current or past revision to a destination directory or archive.
Usage:   bzr export DEST [BRANCH_OR_SUBDIR]

This command:

bzr export --format=dir . lp:stevedore

Creates the entire tree from the lp:stevedore branch without the .bzr directory.

Can export be used to export just the src/server sub-directory from branch lp:stevedore?

bzr export --format=dir . lp:stevedore/src/server

Produces:

bzr: ERROR: Permission denied: "Cannot create 'src'. Only Bazaar branches are allowed."

Solution

  • This works when exporting a directory from a local branch. I was able to reproduce this and it seems to be a bug: https://bugs.launchpad.net/bzr/+bug/403857