How to recreate working tree in branch that was pushed over sftp?

Martin Pool mbp at
Mon Aug 14 05:39:25 BST 2006

On 11 Aug 2006, Alexander Belchenko <bialix at> wrote:
> Aaron Bentley пишет:
> Alexander Belchenko wrote:
> >>I push one branch from one machine (win32) to another (Linux) over sftp.
> >>Push works correct. Branch was pushed first time (on target machine this
> >>branch did not exist before).
> >>
> >>Because push does not update (and create) working tree I try to recreate
> >>it on Linux machine by 'update' and 'revert' commands. Both attempts
> >>fails with explanation that there is no WorkingTree in .bzr/checkout.
> >
> >You can run 'bzr checkout .' to put a working tree there.
> Thank you. It's works, but slightly unclear at first sight.

I agree, it is rather unclear.  How should we improve it?

The basic feature is that you can have directories which contain only a
branch and not a working tree.  This is useful in a few ways:

 - Branches updated over sftp don't create or update a working tree.

 - For something used only as a central repository, having the working trees
   would be a waste of time & space.

 - People might want to get rid of the working tree but keep the branch,
   e.g. if they're low on disk space.

I think generally the default ought to be to create them where possible.


1- create a README file in a directory with no working tree explaining
   what's there

2- the message from push should explicitly point you to the checkout

3- the error about "there's no working tree here" should tell you how to
   make one

4- update and revert should possibly build a working tree if there is
   not one there; they're plausible things to try

Somewhat separate from Alexander's question, perhaps we should revisit
handling of trees in repositories.  I keep all my working trees inside a
repository.  Perhaps we should add --checkout, --no-checkout
(or --tree, --no-tree) options to branch, and remove the hidden setting
in the repository that controls this.


More information about the bazaar mailing list