User question : does bzr have an equivalent to "tla archive-mirror"?

John Arbash Meinel john at arbash-meinel.com
Sun Dec 11 02:50:43 GMT 2005


Erik de Castro Lopo wrote:
> Hi all,
> 
> I'm new to Bzr but I've been using GNU Arch for the last 2+ years.
> 
> I do a lot of work on a laptop and one of the things I liked about
> Arch was "tla archive-mirror" command which allowed me to backup all 
> of my currently working code to my desktop machine. 
> For those not familiar with Arch, Arch worked around a local 
> repository separate from the working directories. For each local 
> repository a mirror could be defined and the "tla archive-mirror"
> command would push all commits since the last run of the command
> from the local repo to the mirror. In addition, if worst came to
> worst and the original repo was lost, editing a single file on
> the mirror would convert the mirror into a regular non-mirror
> archive. My laptop currently holds 30 odd projects, many with two
> or more branches. The nice thing about this being automated was
> that the tool always did the right thing.

Well, with bzr, any branch is always valid as a non-mirror, without
editing that file. :) And without breaking anything. (In arch, if you
ever committed the same name on 2 locations, you could have *serious*
problems with corrupted archives).

> 
> For bzr, there currently does not seem to be anything which matches
> this feature. Bzr does not have a local repository but rather consists
> of multiple branches. The "bzr push" command can push a single branch,
> but not all branches on the local machine.
> 
> I brought this up on #bzr and ddaa had a number of suggestions for
> getting close to the Arch functionality. (Hopefully he can correct
> me if I get anything wrong here).
> 
>   0) Keep all the projects under Bzr control in a single directory
>      and rsync. This is suboptimal because unless I am extremely
>      meticulous about keeping the .rsyncignore files up to date, I 
>      end up rsyncing all sorts of junk which I don't need.
> 
>   1) Keep a separate clean copy of each branch that only contains 
>      files under revision control and rsync that.
> 
>   2) Keep all Bzr projects in a single directory and write a script
>      which does a "bzr push" for each directory in the Bzr directory.

I've already done this last one. It is my "update-mirrors" plugin,
available from:

http://bzr.arbash-meinel.com/plugins/update-mirrors

Now, this probably goes the wrong way (it pulls from remote, not pushes
to them).

But basically, it just crawls from a supplied root directory (you
certainly could specify /), and for any bzr branch it finds, it runs
"bzr pull".

I use it to track other people's branches (plus it prints out a list of
new revisions, which cron emails to me).

It would be relatively simple to have it also 'get_push_location', and
if not None, it would do the appropriate push.

> 
> Ddaa, does that about cover the possibilities? Does anyone else have
> any suggestsions? Is this a feature that might go into bzr at some
> point in the future?

Well, at some point in the future, we are probably bringing back
archives (repositories), so it is more likely to reintroduce archive
mirroring commands.
Right now, we just have a bunch of loosely connected standalone
branches, so there isn't somewhere which knows where all the revisions
that need to be mirrored exist.

> 
> Cheers,
> Erik

I hope this helps,
John
=:->
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 256 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20051210/72981ea6/attachment.pgp 


More information about the bazaar mailing list