export on a checkout

Asked by Colin Hebert on 2011-11-28

Hello,

I'm currently working on HomeBrew (https://github.com/mxcl/homebrew) which is using bazaar to download the code source of some projects.

To do so, a few commands are used ( https://github.com/mxcl/homebrew/blob/master/Library/Homebrew/download_strategy.rb#L476 ):

 - On the first installation a "bzr checkout --lightweight" is done
 - If this installation isn't the first one, "bzr update" is called
 - Once the last version of the source code is obtained, "bzr export" is called to copy the code source in a temporary folder to be compiled/modified/etc.

During the third step, the export seems to connect to the original repository and re-download everything instead of copying the content of the previously obtained content.

As far as I know (and I really don't know much on bazaar), it's due to the fact a checkout is done instead of a branch. I might be wrong, but using bzr branch fixes partially this issue.

So, is it normal that with a checkout an export can't be done without involving remote connections? And how this problem should be solved, having a lightweight checkout (the whole history isn't needed) which is updatable and easily exportable ?

I could simply copy the content manually, but the export command seems to be exactly what is needed.

Thank you.

Question information

Language:
English Edit question
Status:
Answered
For:
Bazaar Edit question
Assignee:
No assignee Edit question
Last query:
2011-11-28
Last reply:
2011-11-29
Martin Pool (mbp) said : #1

Hi,

> As far as I know (and I really don't know much on bazaar), it's due to the fact a checkout is done instead of a branch. I might be wrong, but using bzr branch fixes partially this issue.

Using a real branch (and pull to update it) should entirely fix the
problem, since all the history will be local.

> So, is it normal that with a checkout an export can't be done without involving remote connections?

It's normal because the export command normally reads the contents of
files from the repository. However, when you already have a tree, it
could usefully read unmodified files straight out of the tree, which
could be faster, and would be faster in this case. Until that's
implemented I suggest you just copy the checkout and delet the .bzr
directory.

--
Martin

Can you help with this problem?

Provide an answer of your own, or ask Colin Hebert for more information if necessary.

To post a message you must log in.