Re: BZR local server?repo?

From: Henrik Nordström <henrik_at_henriknordstrom.net>
Date: Thu, 23 Jan 2014 10:38:26 +0100

tor 2014-01-23 klockan 09:53 +0200 skrev Eliezer Croitoru:
> Since I do have a local server I want to have an up-to-date bzr replica.
> I can just use checkout or whatever but I want it to be be updated etc.
>
> I am no bzr expert so any help about the subject is more then welcome.

What I do is that I set up a shared bzr repository that collects the
branches I want to monitor/backup, then have a cron job to update
branches in there from their source repositories.

    bzr init-repo --no-trees /path/to/shared/repo
    cd /path/to/shared/repo
    bzr branch remote_url local_branch_name
    bzr branch ... [repeat per barach to mirror]

then a cron job that runs

    bzr pull --overwrite

in each branch to keep them updated

The reason for --overwrite is to handle if/when history of the master
repo is tweaked... This is optional, and without --overwrite you will
need to manually recover the mirroring in such events, which is also a
good thing as it alerts when something bad is done to the mirrored
repository history.

The reason for --no-trees is to be able to also push working branches to
the same repository for backup purposes. And don't really need checked
out copies of the sources of each branch on the server

If server side checkouts is needed then it's easily created separately

   bzr checkout --lightweight /path/to/shared/repo/branch

--lightweight is entierly optional, and depends on what you want to use
the checkout for.

Regards
Henrik
Received on Thu Jan 23 2014 - 09:38:32 MST

This archive was generated by hypermail 2.2.0 : Thu Jan 23 2014 - 12:00:14 MST