[MERGE] Fix warning on working trees during push

Matthieu Moy Matthieu.Moy at imag.fr
Sun Jan 15 12:44:55 GMT 2006


jblack at merconline.com (James Blackwell) writes:

> As people are aware, bzr currently complains about pushing working trees.
> This is consistantly interpreted as attempting to push has broken
> completely.
>
> bzr: WARNING: Unable to update the working tree of:
> sftp://sivan@mercury.linuxguru.net/%2Fhome/sivan/public_html/home-user-backup/
>
> This changes the warning to: 
>
> bzr: WARNING: Working trees are no longer updated. 

IMO, bzr not updating the working tree is a major problem, which
should be solved instead of being hidden.

I'll give a simple example : I'm working on two machines, say W (work)
and H (home). H is a personal machine that can't easily be accessed
from outside (so push from H to W is more conveinient than pull from W
to H). Now, consider the following scenario:

1. I work on W, do some local modifications, and forget to commit.
2. I go back home, bzr pull, hack locally, commit.
3. I push to W.
4. I go back to work.

Now, my working tree on W contains some local modifications (the ones
I forgot to commit). However, "bzr status" or "bzr diff" show me
something completely different: the local modifications, plus all the
work done at home. I have no easy way to distinguish the local
modifications and the work done at home. Basically, the modifications
I forgot to commit are lost.

There are tons of variants of this scenario, like

1. I go back home, bzr pull, hack locally, commit.
2. I push to W.
3. I go back to work.
4. I forget to "bzr revert"
5. I hack locally

The precise reason why I like revision control systems to work on
multiple machines is that it avoids data loss when you forget to
commit (have you ever worked on multiple machines with email + tar.gz
as the only transport mechanism? :-) ).

I think bzr should not create the working tree if it doesn't exist
already, but if the local tree exists, it should definitely be updated
(what's the point in having a working tree, if it's not kept up to
date with the RCS data anyway?).

-- 
Matthieu




More information about the bazaar mailing list