Detecting out of date checkouts, plus bind without arguments
Robert Collins
robertc at robertcollins.net
Mon Jun 26 10:07:18 BST 2006
On Tue, 2006-06-20 at 12:22 +0200, Adeodato Simó wrote:
> Hello!
>
> I have a simple question, see below for the full story. I'd like to
> reliably detect when a branch has its working tree out of date, and
> needs `bzr update`. I'm doing it like this, but I'd like a word about if
> this will always work, or not. Thanks in advance.
bzr info tells you when you are out of date - when update is needed.
> The story: I have in my desktop a number of branches under ~/code
> (normal branches, no repository involved), which I regularly rsync to my
> webserver. Then, in my laptop, I have a checkout of each of those
> branches, so that each commit in the laptop goes to the desktop as well
> (unless there's no network, and I play with unbind and bind afterwards).
Why do you unbind and bind? When you are offline you can just do 'bzr
commit --local'.
> The issue is, of course, that the working trees in the desktop branches
> don't get updated after receiving a commit from the laptop, so I've
> included in my rsync-script a snippet like the above to make sure that
> the webserver has not only the repository up to date, but the working
> tree as well (so that people browising it do get the latest version).
>
> That's it.
You can just put 'bzr update' in cron - when there is nothing to do,
nothing will happen.
> P.S.: I don't know if it has been proposed before, but would you think
> it'd make sense for `bzr bind $foo` to record $foo as the default bind
> location (a-la-pull), so that `bzr unbind; bzr bind` works and is a
> noop? I guess you can see the usefulness of it in a scenario like the
> above, when the location to bind to is always the same (a pretty common
> scenario, I'd say?)
I'm -1 on this concept: When we put bound branches into the mainline, it
was considered that having yet *more* local state to track was not a
good thing - thats why there is --local options to some commands, to
allow you do perform offline work without losing what branch you are
bound to.
Cheers,
Rob
--
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060626/eb2d8b35/attachment.pgp
More information about the bazaar
mailing list