Repositories inside repositories

Ben Finney bignose+hates-spam at benfinney.id.au
Wed Sep 6 01:58:34 BST 2006


Ben Finney <bignose+hates-spam at benfinney.id.au> writes:

>   - Update parent repository with newly-acquired branches
>     $ bzr update-repository /srv/bzr/

Discussion on #bzr led to the comment that a 'bzr absorb-branch' or
'bzr absorb-branches' could address this.

The differences would be:

  - Move branches into repo
    $ mv ~/Projects/{spam,eggs,beans} /srv/bzr/

  - Absorb individual branches
    $ bzr absorb-branch /srv/bzr/spam/
    $ bzr absorb-branch /srv/bzr/eggs/
    $ bzr absorb-branch /srv/bzr/beans/

versus

  - Move branches into repo
    $ mv ~/Projects/{spam,eggs,beans} /srv/bzr/

  - Absorb any standalone branches inside repo
    $ bzr absorb-branches /srv/bzr/

This latter would also meet the need of:

  - Create branches intermittently
    $ bzr init ~/Projects/spam/
    $ bzr init ~/Projects/eggs/
    $ bzr init ~/Projects/beans/

  - Later decide that the top directory should be a repo
    $ bzr init-repo ~/Projects/
    $ bzr absorb-branches ~/Projects/

The result of a 'bzr absorb-branches R' would be that the repository
'R' contains all revision data found in standalone branches inside
'R', effectively resulting in the same situation as if the branches
had been explicitly branched one by one into the repo, but in a single
operation without needing to remember which branches to operate on.

-- 
 \        "When I was crossing the border into Canada, they asked if I |
  `\     had any firearms with me. I said, 'Well, what do you need?'"  |
_o__)                                                 -- Steven Wright |
Ben Finney





More information about the bazaar mailing list