bzr checkout doesn't seem to use the shared repository data

John Arbash Meinel john at arbash-meinel.com
Thu Apr 5 22:28:36 BST 2007


Matthieu Moy wrote:
> Hi,
> 
> I'm writting a nightly-snapshot script for a project hosted on
> sourceforge. I have a local copy of the repository, but I prefer
> making sure that the snapshot is made from the branches published on
> sourceforge. That said, having a local copy, I should be able to get
> good performances and avoid too much trafic to sourceforge.
> 
> Here's what I did:
> 
> $ bzr init-repo repo
> $ cd repo/
> 
> # just to get the revisions in the repo
> $ mkdir tmp
> $ cd tmp/
> $ bzr branch /local/copy/
> $ cd ../
> 
> $ bzr checkout http://project.sourceforge.net/location/
> 
> The bad surprise is that checkout seems to be re-downloading
> everything from sourceforge.
> 
> My use-case is not so common, and I probably should re-think my
> scripts to actually do a checkout from a local repository, but it
> might be nice to teach "checkout" to use the data in its local
> repository in priority.
> 

A repository is only used for branches contained inside of it. It sounds
like you are asking /tmp/foo to use ~/repo for data.

If instead you did "cd ~/repo; bzr checkout
http://project.sf.net/location", it should work just fine.

One reason we can't use the "local" repository is that you could have
lots of them. (On my machine I have about 5 or so, since I generally
split them up by projects).

Further, we don't really track where repositories are. We figure it out
when we need it (mostly because you can move things around without
telling us, and we should handle that gracefully).

If you really need things checked out into /tmp you could do a few things...

# Create a repo in /tmp, and re-use it.
$ bzr init-repo /tmp/repo
$ cd /tmp/repo
$ bzr checkout http://project.sf.net/location

Alternatively,

# Copy the local branch, and then overwrite it from upstream
$ bzr branch /local/copy /tmp
$ cd /tmp/copy
$ bzr pull --overwite http://project.sf.net/location


John
=:->



More information about the bazaar mailing list