want a hook fired for all wt changes

Bug #485494 reported by Brian de Alwis
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Low
Unassigned
Bazaar Externals plugin
Confirmed
Wishlist
Eugene Tarasenko

Bug Description

I tried doing a 'pull' in a lightweight checkout with .bzrmeta/externals defined. My parent branch is my master branch and found on my local disk. The pull did a checkout of the externals in the *parent* branch, not in the lightweight checkout.

The problem is that the 'base' attribute of a branch object for a light-weight checkout is the bound-location. So Externals.root is being mis-set.

Unfortunately I don't know how to get the location of the working tree.

Revision history for this message
Eugene Tarasenko (etarasenko) wrote :

When use command 'bzr co --lightweight' then bazaar not call any hooks - not post_pull, not post_change_branch_tip.

Changed in bzr-externals:
status: New → Won't Fix
Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 485494] Re: bzr-externals does not do the right thing for lightweight checkouts

Neither of those events (pulling or branch tip changing) occur when a
checkout --lightweight is done.

So this isn't a bug in bzr from that regard.

Perhaps you need a new hook point?

-Rob

Revision history for this message
Eugene Tarasenko (etarasenko) wrote : Re: bzr-externals does not do the right thing for lightweight checkouts

Probably that it is necessary new hook but command checkout fire post_change_branch_tip and post_pull hooks why here not to make also?

Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 485494] Re: bzr-externals does not do the right thing for lightweight checkouts

On Fri, 2009-11-20 at 08:04 +0000, Eugene Tarasenko wrote:
> Probably that it is necessary new hook but command checkout fire
> post_change_branch_tip and post_pull hooks why here not to make also?

Because those events don't happen.

-Rob

Revision history for this message
Eugene Tarasenko (etarasenko) wrote : Re: bzr-externals does not do the right thing for lightweight checkouts

Ok, I need any hook on 'bzr co --lightweight'.

Revision history for this message
Brian de Alwis (slyguy) wrote : Re: [Bug 485494] Re: bzr-externals does not do the right thing for lightweight checkouts

Sorry, I wasn't clear: in this case, I was doing a pull from within a
lightweight checkout.

The problem in this case is that the brach base is not the location of
the working tree. A lightweight checkout is simply a working tree
whose branch was elsewhere (I hadn't realized this until now; I had
thought they were much more invoked and different). The externals
should be checked out into the working tree, but are being checked out
into the branch.

I came across this as doing an update from within a lightweight
checkout did not update the externals. It's perfectly legit to do a
pull from a lightweight checkout, isn't it?

Perhaps there should be an explicit update-externals command?
Likewise, it could be desirable to do a pull of the main branch
without updating the externals; "pull --ignore-externals"?

Brian.

Revision history for this message
John A Meinel (jameinel) wrote :

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

Brian de Alwis wrote:
> Sorry, I wasn't clear: in this case, I was doing a pull from within a
> lightweight checkout.
>
> The problem in this case is that the brach base is not the location of
> the working tree. A lightweight checkout is simply a working tree
> whose branch was elsewhere (I hadn't realized this until now; I had
> thought they were much more invoked and different). The externals
> should be checked out into the working tree, but are being checked out
> into the branch.
>
> I came across this as doing an update from within a lightweight
> checkout did not update the externals. It's perfectly legit to do a
> pull from a lightweight checkout, isn't it?
>
> Perhaps there should be an explicit update-externals command?
> Likewise, it could be desirable to do a pull of the main branch
> without updating the externals; "pull --ignore-externals"?
>
> Brian.
>

It sounds more like externals needs a working-tree level hook that fires
whenever something occurs that it would want to update the working tree.
This happens a lot more often than just pull and update. (revert, for
example, should probably have some sort of meaning for externals, too.)

John
=:->

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

iEYEARECAAYFAksGtwsACgkQJdeBCYSNAAPJ9wCfYkHZNccBFfqripkR5k1uvana
7REAoI6g8wBvnYTTwloLeWAEgJRSw3ob
=LO7/
-----END PGP SIGNATURE-----

Revision history for this message
Eugene Tarasenko (etarasenko) wrote : Re: bzr-externals does not do the right thing for lightweight checkouts

2009/11/20 John A Meinel <email address hidden>
> It sounds more like externals needs a working-tree level hook that fires
> whenever something occurs that it would want to update the working tree.
> This happens a lot more often than just pull and update. (revert, for
> example, should probably have some sort of meaning for externals, too.)

It much better than to get a separate command

Brian de Alwis wrote:
> Perhaps there should be an explicit update-externals command?
> Likewise, it could be desirable to do a pull of the main branch
> without updating the externals; "pull --ignore-externals"?

You can use bzr pull --no-plugins

Martin Pool (mbp)
summary: - bzr-externals does not do the right thing for lightweight checkouts
+ want a hook fired for all wt changes
Changed in bzr:
importance: Undecided → Low
status: New → Confirmed
tags: added: hooks
Changed in bzr-externals:
importance: Undecided → Wishlist
assignee: nobody → Eugene Tarasenko (eugene-tarasenko)
status: Won't Fix → Confirmed
Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.