When does "bzr push" also update the target working tree?

Asked by besy

When I create two local branches (NTFS file system) and push from one to the other, the working tree of the destination is automatically updated. This can result in conflicts, e.g. if there are uncommited changes to files in the target branch.

As far as I know, "bzr push" doesn't update the target working tree by default when using SSH or some other protocols. Otherwise, a plugin like https://launchpad.net/bzr-push-and-update would be useless.

So my question is: When does "bzr push" also update the target working tree and when not?

The help isn't very specific about this: "bzr help push" (Bazaar version 2.0.3) reports: "The target branch will not have its working tree populated because this is both expensive, and is not supported on remote file systems. Some smart servers or protocols *may* put the working tree in place in the future."

Another question: Is it possible to prevent that a push performs an automatic update on the target working tree (e.g. when using local branches)?

Question information

Language:
English Edit question
Status:
Solved
For:
Bazaar Edit question
Assignee:
No assignee Edit question
Solved by:
besy
Solved:
Last query:
Last reply:
Revision history for this message
John A Meinel (jameinel) said :
#1

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

B. Sygnat wrote:
> New question #108161 on Bazaar:
> https://answers.launchpad.net/bzr/+question/108161
>
> When I create two local branches (NTFS file system) and push from one to the other, the working tree of the destination is automatically updated. This can result in conflicts, e.g. if there are uncommited changes to files in the target branch.
>
> As far as I know, "bzr push" doesn't update the target working tree by default when using SSH or some other protocols. Otherwise, a plugin like https://launchpad.net/bzr-push-and-update would be useless.
>
> So my question is: When does "bzr push" also update the target working tree and when not?
>
> The help isn't very specific about this: "bzr help push" (Bazaar version 2.0.3) reports: "The target branch will not have its working tree populated because this is both expensive, and is not supported on remote file systems. Some smart servers or protocols *may* put the working tree in place in the future."
>
> Another question: Is it possible to prevent that a push performs an automatic update on the target working tree (e.g. when using local branches)?
>

It updates the WT when it appears to be local. And a network mounted
filesystem looks local. (it has a drive letter / it appears under '/')

I don't think there is any way to disable it (other than pushing over
ssh, etc.)

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkvQu+oACgkQJdeBCYSNAAO9iwCgnSjEl/VZNshC4i6ieJjH+kPc
j4oAn1huj58lQi4j2VZ7ES3pEhCNuuPz
=De2K
-----END PGP SIGNATURE-----

Revision history for this message
besy (besy) said :
#2

Thank you for your answer. The help should be specific about when "bzr push" updates the working tree and when it doesn't. Even better would be a way to control how "bzr push" affects the working tree.

Another related question: "bzr pull" does always update the working tree, doesn't it?

Revision history for this message
Neil Martinsen-Burrell (nmb) said :
#3

On 2010-04-25 09:42 , B. Sygnat wrote:
> Thank you for your answer. The help should be specific about when "bzr
> push" updates the working tree and when it doesn't. Even better would be
> a way to control how "bzr push" affects the working tree.

Can you file a bug at https://bugs.launchpad.net/bzr asking for the
improved documentation? If you include a description of the situation
in which it would be best to *not* update a local working tree on push,
then that request can be tracked as well.

> Another related question: "bzr pull" does always update the working
> tree, doesn't it?

If there is a working tree, then bzr pull updates it.

Revision history for this message
besy (besy) said :
#4

Thanks for the answers. I wrote a bug report: https://bugs.launchpad.net/bzr/+bug/585509