0

I have a bzr repository called misc. Naturally, it got clogged with lots of subdirectories which now deserve a repo of their own.

How do I detach a subdirectory, say misc/docs, into a new repo called doc?

I have tried:

bzr split misc/docs

But got :

bzr: ERROR: To use this feature you must upgrade your branch at   
     file:///home/adam/bzr/misc/ to a format which supports rich roots.

The repo is pushed into an external server, so I can delete and re-branch at will.

Thanks,

Adam

bialix
  • 20,053
  • 8
  • 46
  • 63
Adam Matan
  • 128,757
  • 147
  • 397
  • 562
  • The error message about rich roots means you need to upgrade your branch/repository to rich-root-packs or 2a format via `upgrade` command: `bzr upgrade --format=2a` – bialix Mar 16 '10 at 08:54

1 Answers1

2

Take a look at bzr-fastimport plugin. It has the command fast-import-filter which allows you to "filter" part of your tree. So usual workflow would be:

bzr fast-export > out.fi
bzr fast-import-filter -i mysubdir out.fi > new.fi
bzr fast-import new.fi
bialix
  • 20,053
  • 8
  • 46
  • 63